1
2
3
4
5
6
7
8
# ! [ cfg_attr ( feature = "rt" , feature ( global_asm ) ) ] # ! [ cfg_attr ( feature = "rt" , feature ( macro_reexport ) ) ] # ! [ cfg_attr ( feature = "rt" , feature ( used ) ) ] # ! [ doc = "Peripheral access API for NRF52 microcontrollers (generated using svd2rust v0.12.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.12.0/svd2rust/#peripheral-api" ] # ! [ allow ( private_no_mangle_statics ) ] # ! [ deny ( missing_docs ) ] # ! [ deny ( warnings ) ] # ! [ allow ( non_camel_case_types ) ] # ! [ feature ( const_fn ) ] # ! [ no_std ] extern crate cortex_m ; # [ macro_reexport ( default_handler , exception ) ] # [ 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 = 3 ; pub use interrupt :: Interrupt ; # [ doc ( hidden ) ] pub mod interrupt { use bare_metal :: Nr ; # [ cfg ( all ( target_arch = "arm" , feature = "rt" ) ) ] global_asm ! ( "
                    .thumb_func
                    DH_TRAMPOLINE:
                        b DEFAULT_HANDLER
                    " ) ; # [ doc = r" Hack to compile on x86" ] # [ cfg ( all ( target_arch = "x86_64" , feature = "rt" ) ) ] global_asm ! ( "
                    DH_TRAMPOLINE:
                        jmp DEFAULT_HANDLER
                    " ) ; # [ cfg ( feature = "rt" ) ] global_asm ! ( "\n.weak POWER_CLOCK\nPOWER_CLOCK = DH_TRAMPOLINE\n.weak RADIO\nRADIO = DH_TRAMPOLINE\n.weak UARTE0_UART0\nUARTE0_UART0 = DH_TRAMPOLINE\n.weak SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0\nSPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = DH_TRAMPOLINE\n.weak SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1\nSPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = DH_TRAMPOLINE\n.weak NFCT\nNFCT = DH_TRAMPOLINE\n.weak GPIOTE\nGPIOTE = DH_TRAMPOLINE\n.weak SAADC\nSAADC = DH_TRAMPOLINE\n.weak TIMER0\nTIMER0 = DH_TRAMPOLINE\n.weak TIMER1\nTIMER1 = DH_TRAMPOLINE\n.weak TIMER2\nTIMER2 = DH_TRAMPOLINE\n.weak RTC0\nRTC0 = DH_TRAMPOLINE\n.weak TEMP\nTEMP = DH_TRAMPOLINE\n.weak RNG\nRNG = DH_TRAMPOLINE\n.weak ECB\nECB = DH_TRAMPOLINE\n.weak CCM_AAR\nCCM_AAR = DH_TRAMPOLINE\n.weak WDT\nWDT = DH_TRAMPOLINE\n.weak RTC1\nRTC1 = DH_TRAMPOLINE\n.weak QDEC\nQDEC = DH_TRAMPOLINE\n.weak COMP_LPCOMP\nCOMP_LPCOMP = DH_TRAMPOLINE\n.weak SWI0_EGU0\nSWI0_EGU0 = DH_TRAMPOLINE\n.weak SWI1_EGU1\nSWI1_EGU1 = DH_TRAMPOLINE\n.weak SWI2_EGU2\nSWI2_EGU2 = DH_TRAMPOLINE\n.weak SWI3_EGU3\nSWI3_EGU3 = DH_TRAMPOLINE\n.weak SWI4_EGU4\nSWI4_EGU4 = DH_TRAMPOLINE\n.weak SWI5_EGU5\nSWI5_EGU5 = DH_TRAMPOLINE\n.weak TIMER3\nTIMER3 = DH_TRAMPOLINE\n.weak TIMER4\nTIMER4 = DH_TRAMPOLINE\n.weak PWM0\nPWM0 = DH_TRAMPOLINE\n.weak PDM\nPDM = DH_TRAMPOLINE\n.weak MWU\nMWU = DH_TRAMPOLINE\n.weak PWM1\nPWM1 = DH_TRAMPOLINE\n.weak PWM2\nPWM2 = DH_TRAMPOLINE\n.weak SPIM2_SPIS2_SPI2\nSPIM2_SPIS2_SPI2 = DH_TRAMPOLINE\n.weak RTC2\nRTC2 = DH_TRAMPOLINE\n.weak I2S\nI2S = DH_TRAMPOLINE\n.weak FPU\nFPU = DH_TRAMPOLINE" ) ; # [ cfg ( feature = "rt" ) ] extern "C" { fn POWER_CLOCK ( ) ; fn RADIO ( ) ; fn UARTE0_UART0 ( ) ; fn SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 ( ) ; fn SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 ( ) ; fn NFCT ( ) ; fn GPIOTE ( ) ; fn SAADC ( ) ; fn TIMER0 ( ) ; fn TIMER1 ( ) ; fn TIMER2 ( ) ; fn RTC0 ( ) ; fn TEMP ( ) ; fn RNG ( ) ; fn ECB ( ) ; fn CCM_AAR ( ) ; fn WDT ( ) ; fn RTC1 ( ) ; fn QDEC ( ) ; fn COMP_LPCOMP ( ) ; fn SWI0_EGU0 ( ) ; fn SWI1_EGU1 ( ) ; fn SWI2_EGU2 ( ) ; fn SWI3_EGU3 ( ) ; fn SWI4_EGU4 ( ) ; fn SWI5_EGU5 ( ) ; fn TIMER3 ( ) ; fn TIMER4 ( ) ; fn PWM0 ( ) ; fn PDM ( ) ; fn MWU ( ) ; fn PWM1 ( ) ; fn PWM2 ( ) ; fn SPIM2_SPIS2_SPI2 ( ) ; fn RTC2 ( ) ; fn I2S ( ) ; fn FPU ( ) ; } # [ allow ( private_no_mangle_statics ) ] # [ cfg ( feature = "rt" ) ] # [ doc ( hidden ) ] # [ link_section = ".vector_table.interrupts" ] # [ no_mangle ] # [ used ] pub static INTERRUPTS : [ Option < unsafe extern "C" fn ( ) > ; 39 ] = [ Some ( POWER_CLOCK ) , Some ( RADIO ) , Some ( UARTE0_UART0 ) , Some ( SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 ) , Some ( SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 ) , Some ( NFCT ) , Some ( GPIOTE ) , Some ( SAADC ) , Some ( TIMER0 ) , Some ( TIMER1 ) , Some ( TIMER2 ) , Some ( RTC0 ) , Some ( TEMP ) , Some ( RNG ) , Some ( ECB ) , Some ( CCM_AAR ) , Some ( WDT ) , Some ( RTC1 ) , Some ( QDEC ) , Some ( COMP_LPCOMP ) , Some ( SWI0_EGU0 ) , Some ( SWI1_EGU1 ) , Some ( SWI2_EGU2 ) , Some ( SWI3_EGU3 ) , Some ( SWI4_EGU4 ) , Some ( SWI5_EGU5 ) , Some ( TIMER3 ) , Some ( TIMER4 ) , Some ( PWM0 ) , Some ( PDM ) , None , None , Some ( MWU ) , Some ( PWM1 ) , Some ( PWM2 ) , Some ( SPIM2_SPIS2_SPI2 ) , Some ( RTC2 ) , Some ( I2S ) , Some ( FPU ) , ] ; # [ doc = r" Enumeration of all the interrupts" ] pub enum Interrupt { # [ doc = "0 - POWER_CLOCK" ] POWER_CLOCK , # [ doc = "1 - RADIO" ] RADIO , # [ doc = "2 - UARTE0_UART0" ] UARTE0_UART0 , # [ doc = "3 - SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0" ] SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 , # [ doc = "4 - SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1" ] SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 , # [ doc = "5 - NFCT" ] NFCT , # [ doc = "6 - GPIOTE" ] GPIOTE , # [ doc = "7 - SAADC" ] SAADC , # [ doc = "8 - TIMER0" ] TIMER0 , # [ doc = "9 - TIMER1" ] TIMER1 , # [ doc = "10 - TIMER2" ] TIMER2 , # [ doc = "11 - RTC0" ] RTC0 , # [ doc = "12 - TEMP" ] TEMP , # [ doc = "13 - RNG" ] RNG , # [ doc = "14 - ECB" ] ECB , # [ doc = "15 - CCM_AAR" ] CCM_AAR , # [ doc = "16 - WDT" ] WDT , # [ doc = "17 - RTC1" ] RTC1 , # [ doc = "18 - QDEC" ] QDEC , # [ doc = "19 - COMP_LPCOMP" ] COMP_LPCOMP , # [ doc = "20 - SWI0_EGU0" ] SWI0_EGU0 , # [ doc = "21 - SWI1_EGU1" ] SWI1_EGU1 , # [ doc = "22 - SWI2_EGU2" ] SWI2_EGU2 , # [ doc = "23 - SWI3_EGU3" ] SWI3_EGU3 , # [ doc = "24 - SWI4_EGU4" ] SWI4_EGU4 , # [ doc = "25 - SWI5_EGU5" ] SWI5_EGU5 , # [ doc = "26 - TIMER3" ] TIMER3 , # [ doc = "27 - TIMER4" ] TIMER4 , # [ doc = "28 - PWM0" ] PWM0 , # [ doc = "29 - PDM" ] PDM , # [ doc = "32 - MWU" ] MWU , # [ doc = "33 - PWM1" ] PWM1 , # [ doc = "34 - PWM2" ] PWM2 , # [ doc = "35 - SPIM2_SPIS2_SPI2" ] SPIM2_SPIS2_SPI2 , # [ doc = "36 - RTC2" ] RTC2 , # [ doc = "37 - I2S" ] I2S , # [ doc = "38 - FPU" ] FPU , } unsafe impl Nr for Interrupt { # [ inline ] fn nr ( & self ) -> u8 { match * self { Interrupt :: POWER_CLOCK => 0 , Interrupt :: RADIO => 1 , Interrupt :: UARTE0_UART0 => 2 , Interrupt :: SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 => 3 , Interrupt :: SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 => 4 , Interrupt :: NFCT => 5 , Interrupt :: GPIOTE => 6 , Interrupt :: SAADC => 7 , Interrupt :: TIMER0 => 8 , Interrupt :: TIMER1 => 9 , Interrupt :: TIMER2 => 10 , Interrupt :: RTC0 => 11 , Interrupt :: TEMP => 12 , Interrupt :: RNG => 13 , Interrupt :: ECB => 14 , Interrupt :: CCM_AAR => 15 , Interrupt :: WDT => 16 , Interrupt :: RTC1 => 17 , Interrupt :: QDEC => 18 , Interrupt :: COMP_LPCOMP => 19 , Interrupt :: SWI0_EGU0 => 20 , Interrupt :: SWI1_EGU1 => 21 , Interrupt :: SWI2_EGU2 => 22 , Interrupt :: SWI3_EGU3 => 23 , Interrupt :: SWI4_EGU4 => 24 , Interrupt :: SWI5_EGU5 => 25 , Interrupt :: TIMER3 => 26 , Interrupt :: TIMER4 => 27 , Interrupt :: PWM0 => 28 , Interrupt :: PDM => 29 , Interrupt :: MWU => 32 , Interrupt :: PWM1 => 33 , Interrupt :: PWM2 => 34 , Interrupt :: SPIM2_SPIS2_SPI2 => 35 , Interrupt :: RTC2 => 36 , Interrupt :: I2S => 37 , Interrupt :: FPU => 38 , } } } # [ cfg ( feature = "rt" ) ] # [ macro_export ] macro_rules ! interrupt { ( $ NAME : ident , $ path : path , locals : { $ ( $ lvar : ident : $ lty : ty = $ lval : expr ; ) * } ) => { # [ allow ( non_snake_case ) ] mod $ NAME { pub struct Locals { $ ( pub $ lvar : $ lty , ) * } } # [ allow ( non_snake_case ) ] # [ no_mangle ] pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; static mut LOCALS : self :: $ NAME :: Locals = self :: $ NAME :: Locals { $ ( $ lvar : $ lval , ) * } ; let f : fn ( & mut self :: $ NAME :: Locals ) = $ path ; f ( unsafe { & mut LOCALS } ) ; } } ; ( $ NAME : ident , $ path : path ) => { # [ allow ( non_snake_case ) ] # [ no_mangle ] pub extern "C" fn $ NAME ( ) { let _ = $ crate :: interrupt :: Interrupt :: $ NAME ; let f : fn ( ) = $ path ; f ( ) ; } } } } pub use cortex_m :: peripheral :: Peripherals as CorePeripherals ; pub use cortex_m :: peripheral :: CPUID ; pub use cortex_m :: peripheral :: DCB ; pub use cortex_m :: peripheral :: DWT ; pub use cortex_m :: peripheral :: MPU ; pub use cortex_m :: peripheral :: NVIC ; pub use cortex_m :: peripheral :: SCB ; pub use cortex_m :: peripheral :: SYST ; # [ doc = "Factory Information Configuration Registers" ] pub struct FICR { _marker : PhantomData < * const ( ) > } unsafe impl Send for FICR { } impl FICR { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const ficr :: RegisterBlock { 0x1000_0000 as * const _ } } impl Deref for FICR { type Target = ficr :: RegisterBlock ; fn deref ( & self ) -> & ficr :: RegisterBlock { unsafe { & * FICR :: ptr ( ) } } } # [ doc = "Factory Information Configuration Registers" ] pub mod ficr { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 16usize ] , # [ doc = "0x10 - Code memory page size" ] pub codepagesize : CODEPAGESIZE , # [ doc = "0x14 - Code memory size" ] pub codesize : CODESIZE , _reserved1 : [ u8 ; 72usize ] , # [ doc = "0x60 - Description collection[0]: Device identifier" ] pub deviceid : [ DEVICEID ; 2 ] , _reserved2 : [ u8 ; 24usize ] , # [ doc = "0x80 - Description collection[0]: Encryption Root, word 0" ] pub er : [ ER ; 4 ] , # [ doc = "0x90 - Description collection[0]: Identity Root, word 0" ] pub ir : [ IR ; 4 ] , # [ doc = "0xa0 - Device address type" ] pub deviceaddrtype : DEVICEADDRTYPE , # [ doc = "0xa4 - Description collection[0]: Device address 0" ] pub deviceaddr : [ DEVICEADDR ; 2 ] , } # [ doc = "Code memory page size" ] pub struct CODEPAGESIZE { register : VolatileCell < u32 > } # [ doc = "Code memory page size" ] pub mod codepagesize { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: CODEPAGESIZE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct CODEPAGESIZER { bits : u32 , } impl CODEPAGESIZER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Code memory page size" ] # [ inline ] pub fn codepagesize ( & self ) -> CODEPAGESIZER { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CODEPAGESIZER { bits } } } } # [ doc = "Code memory size" ] pub struct CODESIZE { register : VolatileCell < u32 > } # [ doc = "Code memory size" ] pub mod codesize { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: CODESIZE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct CODESIZER { bits : u32 , } impl CODESIZER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Code memory size in number of pages" ] # [ inline ] pub fn codesize ( & self ) -> CODESIZER { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CODESIZER { bits } } } } # [ doc = "Description collection[0]: Device identifier" ] pub struct DEVICEID { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Device identifier" ] pub mod deviceid { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: DEVICEID { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct DEVICEIDR { bits : u32 , } impl DEVICEIDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - 64 bit unique device identifier" ] # [ inline ] pub fn deviceid ( & self ) -> DEVICEIDR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; DEVICEIDR { bits } } } } # [ doc = "Description collection[0]: Encryption Root, word 0" ] pub struct ER { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Encryption Root, word 0" ] pub mod er { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: ER { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct ERR { bits : u32 , } impl ERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Encryption Root, word n" ] # [ inline ] pub fn er ( & self ) -> ERR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ERR { bits } } } } # [ doc = "Description collection[0]: Identity Root, word 0" ] pub struct IR { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Identity Root, word 0" ] pub mod ir { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: IR { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct IRR { bits : u32 , } impl IRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Identity Root, word n" ] # [ inline ] pub fn ir ( & self ) -> IRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; IRR { bits } } } } # [ doc = "Device address type" ] pub struct DEVICEADDRTYPE { register : VolatileCell < u32 > } # [ doc = "Device address type" ] pub mod deviceaddrtype { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: DEVICEADDRTYPE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `DEVICEADDRTYPE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVICEADDRTYPER { # [ doc = "Public address" ] PUBLIC , # [ doc = "Random address" ] RANDOM } impl DEVICEADDRTYPER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DEVICEADDRTYPER :: PUBLIC => false , DEVICEADDRTYPER :: RANDOM => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DEVICEADDRTYPER { match value { false => DEVICEADDRTYPER :: PUBLIC , true => DEVICEADDRTYPER :: RANDOM , } } # [ doc = "Checks if the value of the field is `PUBLIC`" ] # [ inline ] pub fn is_public ( & self ) -> bool { * self == DEVICEADDRTYPER :: PUBLIC } # [ doc = "Checks if the value of the field is `RANDOM`" ] # [ inline ] pub fn is_random ( & self ) -> bool { * self == DEVICEADDRTYPER :: RANDOM } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Device address type" ] # [ inline ] pub fn deviceaddrtype ( & self ) -> DEVICEADDRTYPER { DEVICEADDRTYPER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Description collection[0]: Device address 0" ] pub struct DEVICEADDR { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Device address 0" ] pub mod deviceaddr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: DEVICEADDR { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct DEVICEADDRR { bits : u32 , } impl DEVICEADDRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - 48 bit device address" ] # [ inline ] pub fn deviceaddr ( & self ) -> DEVICEADDRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; DEVICEADDRR { bits } } } } } # [ doc = "User Information Configuration Registers" ] pub struct UICR { _marker : PhantomData < * const ( ) > } unsafe impl Send for UICR { } impl UICR { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const uicr :: RegisterBlock { 0x1000_1000 as * const _ } } impl Deref for UICR { type Target = uicr :: RegisterBlock ; fn deref ( & self ) -> & uicr :: RegisterBlock { unsafe { & * UICR :: ptr ( ) } } } # [ doc = "User Information Configuration Registers" ] pub mod uicr { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Unspecified" ] pub unused0 : UNUSED0 , # [ doc = "0x04 - Unspecified" ] pub unused1 : UNUSED1 , # [ doc = "0x08 - Unspecified" ] pub unused2 : UNUSED2 , _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x10 - Unspecified" ] pub unused3 : UNUSED3 , # [ doc = "0x14 - Description collection[0]: Reserved for Nordic firmware design" ] pub nrffw : [ NRFFW ; 15 ] , # [ doc = "0x50 - Description collection[0]: Reserved for Nordic hardware design" ] pub nrfhw : [ NRFHW ; 12 ] , # [ doc = "0x80 - Description collection[0]: Reserved for customer" ] pub customer : [ CUSTOMER ; 32 ] , _reserved1 : [ u8 ; 256usize ] , # [ doc = "0x200 - Description collection[0]: Mapping of the nRESET function (see POWER chapter for details)" ] pub pselreset : [ PSELRESET ; 2 ] , # [ doc = "0x208 - Access Port protection" ] pub approtect : APPROTECT , # [ doc = "0x20c - Setting of pins dedicated to NFC functionality: NFC antenna or GPIO" ] pub nfcpins : NFCPINS , } # [ doc = "Unspecified" ] pub struct UNUSED0 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Unspecified" ] pub struct UNUSED1 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Unspecified" ] pub struct UNUSED2 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Unspecified" ] pub struct UNUSED3 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused3 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED3 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Reserved for Nordic firmware design" ] pub struct NRFFW { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Reserved for Nordic firmware design" ] pub mod nrffw { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NRFFW { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NRFFWR { bits : u32 , } impl NRFFWR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _NRFFWW < 'a > { w : & 'a mut W , } impl < 'a > _NRFFWW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Reserved for Nordic firmware design" ] # [ inline ] pub fn nrffw ( & self ) -> NRFFWR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; NRFFWR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Reserved for Nordic firmware design" ] # [ inline ] pub fn nrffw ( & mut self ) -> _NRFFWW { _NRFFWW { w : self } } } } # [ doc = "Description collection[0]: Reserved for Nordic hardware design" ] pub struct NRFHW { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Reserved for Nordic hardware design" ] pub mod nrfhw { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NRFHW { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NRFHWR { bits : u32 , } impl NRFHWR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _NRFHWW < 'a > { w : & 'a mut W , } impl < 'a > _NRFHWW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Reserved for Nordic hardware design" ] # [ inline ] pub fn nrfhw ( & self ) -> NRFHWR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; NRFHWR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Reserved for Nordic hardware design" ] # [ inline ] pub fn nrfhw ( & mut self ) -> _NRFHWW { _NRFHWW { w : self } } } } # [ doc = "Description collection[0]: Reserved for customer" ] pub struct CUSTOMER { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Reserved for customer" ] pub mod customer { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CUSTOMER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CUSTOMERR { bits : u32 , } impl CUSTOMERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CUSTOMERW < 'a > { w : & 'a mut W , } impl < 'a > _CUSTOMERW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Reserved for customer" ] # [ inline ] pub fn customer ( & self ) -> CUSTOMERR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CUSTOMERR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Reserved for customer" ] # [ inline ] pub fn customer ( & mut self ) -> _CUSTOMERW { _CUSTOMERW { w : self } } } } # [ doc = "Description collection[0]: Mapping of the nRESET function (see POWER chapter for details)" ] pub struct PSELRESET { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Mapping of the nRESET function (see POWER chapter for details)" ] pub mod pselreset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELRESET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct PINR { bits : u8 , } impl PINR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `CONNECT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CONNECTR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = "Connect" ] CONNECTED } impl CONNECTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CONNECTR :: DISCONNECTED => true , CONNECTR :: CONNECTED => false } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CONNECTR { match value { true => CONNECTR :: DISCONNECTED , false => CONNECTR :: CONNECTED , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == CONNECTR :: DISCONNECTED } # [ doc = "Checks if the value of the field is `CONNECTED`" ] # [ inline ] pub fn is_connected ( & self ) -> bool { * self == CONNECTR :: CONNECTED } } # [ doc = r" Proxy" ] pub struct _PINW < 'a > { w : & 'a mut W , } impl < 'a > _PINW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CONNECT`" ] pub enum CONNECTW { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = "Connect" ] CONNECTED } impl CONNECTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CONNECTW :: DISCONNECTED => true , CONNECTW :: CONNECTED => false } } } # [ doc = r" Proxy" ] pub struct _CONNECTW < 'a > { w : & 'a mut W , } impl < 'a > _CONNECTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CONNECTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( CONNECTW :: DISCONNECTED ) } # [ doc = "Connect" ] # [ inline ] pub fn connected ( self ) -> & 'a mut W { self . variant ( CONNECTW :: CONNECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:4 - GPIO number P0.n onto which Reset is exposed" ] # [ inline ] pub fn pin ( & self ) -> PINR { let bits = { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; PINR { bits } } # [ doc = "Bit 31 - Connection" ] # [ inline ] pub fn connect ( & self ) -> CONNECTR { CONNECTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:4 - GPIO number P0.n onto which Reset is exposed" ] # [ inline ] pub fn pin ( & mut self ) -> _PINW { _PINW { w : self } } # [ doc = "Bit 31 - Connection" ] # [ inline ] pub fn connect ( & mut self ) -> _CONNECTW { _CONNECTW { w : self } } } } # [ doc = "Access Port protection" ] pub struct APPROTECT { register : VolatileCell < u32 > } # [ doc = "Access Port protection" ] pub mod approtect { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: APPROTECT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PALL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PALLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl PALLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PALLR :: DISABLED => 0xff , PALLR :: ENABLED => 0 , PALLR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PALLR { match value { 255 => PALLR :: DISABLED , 0 => PALLR :: ENABLED , i => PALLR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PALLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PALLR :: ENABLED } } # [ doc = "Values that can be written to the field `PALL`" ] pub enum PALLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PALLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PALLW :: DISABLED => 255 , PALLW :: ENABLED => 0 } } } # [ doc = r" Proxy" ] pub struct _PALLW < 'a > { w : & 'a mut W , } impl < 'a > _PALLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PALLW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PALLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PALLW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection." ] # [ inline ] pub fn pall ( & self ) -> PALLR { PALLR :: _from ( { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection." ] # [ inline ] pub fn pall ( & mut self ) -> _PALLW { _PALLW { w : self } } } } # [ doc = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO" ] pub struct NFCPINS { register : VolatileCell < u32 > } # [ doc = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO" ] pub mod nfcpins { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NFCPINS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PROTECT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PROTECTR { # [ doc = "Operation as GPIO pins. Same protection as normal GPIO pins" ] DISABLED , # [ doc = "Operation as NFC antenna pins. Configures the protection for NFC operation" ] NFC } impl PROTECTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PROTECTR :: DISABLED => false , PROTECTR :: NFC => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PROTECTR { match value { false => PROTECTR :: DISABLED , true => PROTECTR :: NFC , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PROTECTR :: DISABLED } # [ doc = "Checks if the value of the field is `NFC`" ] # [ inline ] pub fn is_nfc ( & self ) -> bool { * self == PROTECTR :: NFC } } # [ doc = "Values that can be written to the field `PROTECT`" ] pub enum PROTECTW { # [ doc = "Operation as GPIO pins. Same protection as normal GPIO pins" ] DISABLED , # [ doc = "Operation as NFC antenna pins. Configures the protection for NFC operation" ] NFC } impl PROTECTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PROTECTW :: DISABLED => false , PROTECTW :: NFC => true } } } # [ doc = r" Proxy" ] pub struct _PROTECTW < 'a > { w : & 'a mut W , } impl < 'a > _PROTECTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PROTECTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Operation as GPIO pins. Same protection as normal GPIO pins" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PROTECTW :: DISABLED ) } # [ doc = "Operation as NFC antenna pins. Configures the protection for NFC operation" ] # [ inline ] pub fn nfc ( self ) -> & 'a mut W { self . variant ( PROTECTW :: NFC ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Setting of pins dedicated to NFC functionality" ] # [ inline ] pub fn protect ( & self ) -> PROTECTR { PROTECTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Setting of pins dedicated to NFC functionality" ] # [ inline ] pub fn protect ( & mut self ) -> _PROTECTW { _PROTECTW { w : self } } } } } # [ doc = "Block Protect" ] pub struct BPROT { _marker : PhantomData < * const ( ) > } unsafe impl Send for BPROT { } impl BPROT { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const bprot :: RegisterBlock { 0x4000_0000 as * const _ } } impl Deref for BPROT { type Target = bprot :: RegisterBlock ; fn deref ( & self ) -> & bprot :: RegisterBlock { unsafe { & * BPROT :: ptr ( ) } } } # [ doc = "Block Protect" ] pub mod bprot { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 1536usize ] , # [ doc = "0x600 - Block protect configuration register 0" ] pub config0 : CONFIG0 , # [ doc = "0x604 - Block protect configuration register 1" ] pub config1 : CONFIG1 , # [ doc = "0x608 - Disable protection mechanism in debug interface mode" ] pub disableindebug : DISABLEINDEBUG , # [ doc = "0x60c - Unspecified" ] pub unused0 : UNUSED0 , # [ doc = "0x610 - Block protect configuration register 2" ] pub config2 : CONFIG2 , # [ doc = "0x614 - Block protect configuration register 3" ] pub config3 : CONFIG3 , } # [ doc = "Block protect configuration register 0" ] pub struct CONFIG0 { register : VolatileCell < u32 > } # [ doc = "Block protect configuration register 0" ] pub mod config0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0R :: DISABLED => false , REGION0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0R { match value { false => REGION0R :: DISABLED , true => REGION0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0R :: ENABLED } } # [ doc = "Possible values of the field `REGION1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1R :: DISABLED => false , REGION1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1R { match value { false => REGION1R :: DISABLED , true => REGION1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1R :: ENABLED } } # [ doc = "Possible values of the field `REGION2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2R :: DISABLED => false , REGION2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2R { match value { false => REGION2R :: DISABLED , true => REGION2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2R :: ENABLED } } # [ doc = "Possible values of the field `REGION3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3R :: DISABLED => false , REGION3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3R { match value { false => REGION3R :: DISABLED , true => REGION3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3R :: ENABLED } } # [ doc = "Possible values of the field `REGION4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION4R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION4R :: DISABLED => false , REGION4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION4R { match value { false => REGION4R :: DISABLED , true => REGION4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION4R :: ENABLED } } # [ doc = "Possible values of the field `REGION5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION5R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION5R :: DISABLED => false , REGION5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION5R { match value { false => REGION5R :: DISABLED , true => REGION5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION5R :: ENABLED } } # [ doc = "Possible values of the field `REGION6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION6R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION6R :: DISABLED => false , REGION6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION6R { match value { false => REGION6R :: DISABLED , true => REGION6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION6R :: ENABLED } } # [ doc = "Possible values of the field `REGION7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION7R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION7R :: DISABLED => false , REGION7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION7R { match value { false => REGION7R :: DISABLED , true => REGION7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION7R :: ENABLED } } # [ doc = "Possible values of the field `REGION8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION8R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION8R :: DISABLED => false , REGION8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION8R { match value { false => REGION8R :: DISABLED , true => REGION8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION8R :: ENABLED } } # [ doc = "Possible values of the field `REGION9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION9R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION9R :: DISABLED => false , REGION9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION9R { match value { false => REGION9R :: DISABLED , true => REGION9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION9R :: ENABLED } } # [ doc = "Possible values of the field `REGION10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION10R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION10R :: DISABLED => false , REGION10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION10R { match value { false => REGION10R :: DISABLED , true => REGION10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION10R :: ENABLED } } # [ doc = "Possible values of the field `REGION11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION11R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION11R :: DISABLED => false , REGION11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION11R { match value { false => REGION11R :: DISABLED , true => REGION11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION11R :: ENABLED } } # [ doc = "Possible values of the field `REGION12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION12R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION12R :: DISABLED => false , REGION12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION12R { match value { false => REGION12R :: DISABLED , true => REGION12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION12R :: ENABLED } } # [ doc = "Possible values of the field `REGION13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION13R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION13R :: DISABLED => false , REGION13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION13R { match value { false => REGION13R :: DISABLED , true => REGION13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION13R :: ENABLED } } # [ doc = "Possible values of the field `REGION14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION14R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION14R :: DISABLED => false , REGION14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION14R { match value { false => REGION14R :: DISABLED , true => REGION14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION14R :: ENABLED } } # [ doc = "Possible values of the field `REGION15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION15R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION15R :: DISABLED => false , REGION15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION15R { match value { false => REGION15R :: DISABLED , true => REGION15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION15R :: ENABLED } } # [ doc = "Possible values of the field `REGION16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION16R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION16R :: DISABLED => false , REGION16R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION16R { match value { false => REGION16R :: DISABLED , true => REGION16R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION16R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION16R :: ENABLED } } # [ doc = "Possible values of the field `REGION17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION17R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION17R :: DISABLED => false , REGION17R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION17R { match value { false => REGION17R :: DISABLED , true => REGION17R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION17R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION17R :: ENABLED } } # [ doc = "Possible values of the field `REGION18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION18R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION18R :: DISABLED => false , REGION18R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION18R { match value { false => REGION18R :: DISABLED , true => REGION18R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION18R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION18R :: ENABLED } } # [ doc = "Possible values of the field `REGION19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION19R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION19R :: DISABLED => false , REGION19R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION19R { match value { false => REGION19R :: DISABLED , true => REGION19R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION19R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION19R :: ENABLED } } # [ doc = "Possible values of the field `REGION20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION20R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION20R :: DISABLED => false , REGION20R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION20R { match value { false => REGION20R :: DISABLED , true => REGION20R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION20R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION20R :: ENABLED } } # [ doc = "Possible values of the field `REGION21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION21R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION21R :: DISABLED => false , REGION21R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION21R { match value { false => REGION21R :: DISABLED , true => REGION21R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION21R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION21R :: ENABLED } } # [ doc = "Possible values of the field `REGION22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION22R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION22R :: DISABLED => false , REGION22R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION22R { match value { false => REGION22R :: DISABLED , true => REGION22R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION22R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION22R :: ENABLED } } # [ doc = "Possible values of the field `REGION23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION23R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION23R :: DISABLED => false , REGION23R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION23R { match value { false => REGION23R :: DISABLED , true => REGION23R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION23R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION23R :: ENABLED } } # [ doc = "Possible values of the field `REGION24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION24R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION24R :: DISABLED => false , REGION24R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION24R { match value { false => REGION24R :: DISABLED , true => REGION24R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION24R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION24R :: ENABLED } } # [ doc = "Possible values of the field `REGION25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION25R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION25R :: DISABLED => false , REGION25R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION25R { match value { false => REGION25R :: DISABLED , true => REGION25R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION25R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION25R :: ENABLED } } # [ doc = "Possible values of the field `REGION26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION26R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION26R :: DISABLED => false , REGION26R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION26R { match value { false => REGION26R :: DISABLED , true => REGION26R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION26R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION26R :: ENABLED } } # [ doc = "Possible values of the field `REGION27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION27R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION27R :: DISABLED => false , REGION27R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION27R { match value { false => REGION27R :: DISABLED , true => REGION27R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION27R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION27R :: ENABLED } } # [ doc = "Possible values of the field `REGION28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION28R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION28R :: DISABLED => false , REGION28R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION28R { match value { false => REGION28R :: DISABLED , true => REGION28R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION28R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION28R :: ENABLED } } # [ doc = "Possible values of the field `REGION29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION29R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION29R :: DISABLED => false , REGION29R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION29R { match value { false => REGION29R :: DISABLED , true => REGION29R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION29R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION29R :: ENABLED } } # [ doc = "Possible values of the field `REGION30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION30R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION30R :: DISABLED => false , REGION30R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION30R { match value { false => REGION30R :: DISABLED , true => REGION30R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION30R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION30R :: ENABLED } } # [ doc = "Possible values of the field `REGION31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION31R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION31R :: DISABLED => false , REGION31R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION31R { match value { false => REGION31R :: DISABLED , true => REGION31R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION31R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION31R :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0`" ] pub enum REGION0W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0W :: DISABLED => false , REGION0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION0W < 'a > { w : & 'a mut W , } impl < 'a > _REGION0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION0W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1`" ] pub enum REGION1W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1W :: DISABLED => false , REGION1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION1W < 'a > { w : & 'a mut W , } impl < 'a > _REGION1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION1W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2`" ] pub enum REGION2W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2W :: DISABLED => false , REGION2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION2W < 'a > { w : & 'a mut W , } impl < 'a > _REGION2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION2W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3`" ] pub enum REGION3W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3W :: DISABLED => false , REGION3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION3W < 'a > { w : & 'a mut W , } impl < 'a > _REGION3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION3W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION4`" ] pub enum REGION4W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION4W :: DISABLED => false , REGION4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION4W < 'a > { w : & 'a mut W , } impl < 'a > _REGION4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION4W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION5`" ] pub enum REGION5W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION5W :: DISABLED => false , REGION5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION5W < 'a > { w : & 'a mut W , } impl < 'a > _REGION5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION5W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION6`" ] pub enum REGION6W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION6W :: DISABLED => false , REGION6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION6W < 'a > { w : & 'a mut W , } impl < 'a > _REGION6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION6W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION7`" ] pub enum REGION7W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION7W :: DISABLED => false , REGION7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION7W < 'a > { w : & 'a mut W , } impl < 'a > _REGION7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION7W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION8`" ] pub enum REGION8W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION8W :: DISABLED => false , REGION8W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION8W < 'a > { w : & 'a mut W , } impl < 'a > _REGION8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION8W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION8W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION9`" ] pub enum REGION9W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION9W :: DISABLED => false , REGION9W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION9W < 'a > { w : & 'a mut W , } impl < 'a > _REGION9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION9W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION9W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION10`" ] pub enum REGION10W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION10W :: DISABLED => false , REGION10W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION10W < 'a > { w : & 'a mut W , } impl < 'a > _REGION10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION10W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION10W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION11`" ] pub enum REGION11W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION11W :: DISABLED => false , REGION11W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION11W < 'a > { w : & 'a mut W , } impl < 'a > _REGION11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION11W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION11W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION12`" ] pub enum REGION12W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION12W :: DISABLED => false , REGION12W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION12W < 'a > { w : & 'a mut W , } impl < 'a > _REGION12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION12W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION12W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION13`" ] pub enum REGION13W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION13W :: DISABLED => false , REGION13W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION13W < 'a > { w : & 'a mut W , } impl < 'a > _REGION13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION13W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION13W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION14`" ] pub enum REGION14W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION14W :: DISABLED => false , REGION14W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION14W < 'a > { w : & 'a mut W , } impl < 'a > _REGION14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION14W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION14W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION15`" ] pub enum REGION15W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION15W :: DISABLED => false , REGION15W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION15W < 'a > { w : & 'a mut W , } impl < 'a > _REGION15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION15W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION15W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION16`" ] pub enum REGION16W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION16W :: DISABLED => false , REGION16W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION16W < 'a > { w : & 'a mut W , } impl < 'a > _REGION16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION16W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION16W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION17`" ] pub enum REGION17W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION17W :: DISABLED => false , REGION17W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION17W < 'a > { w : & 'a mut W , } impl < 'a > _REGION17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION17W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION17W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION18`" ] pub enum REGION18W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION18W :: DISABLED => false , REGION18W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION18W < 'a > { w : & 'a mut W , } impl < 'a > _REGION18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION18W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION18W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION19`" ] pub enum REGION19W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION19W :: DISABLED => false , REGION19W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION19W < 'a > { w : & 'a mut W , } impl < 'a > _REGION19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION19W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION19W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION20`" ] pub enum REGION20W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION20W :: DISABLED => false , REGION20W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION20W < 'a > { w : & 'a mut W , } impl < 'a > _REGION20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION20W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION20W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION21`" ] pub enum REGION21W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION21W :: DISABLED => false , REGION21W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION21W < 'a > { w : & 'a mut W , } impl < 'a > _REGION21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION21W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION21W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION22`" ] pub enum REGION22W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION22W :: DISABLED => false , REGION22W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION22W < 'a > { w : & 'a mut W , } impl < 'a > _REGION22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION22W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION22W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION23`" ] pub enum REGION23W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION23W :: DISABLED => false , REGION23W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION23W < 'a > { w : & 'a mut W , } impl < 'a > _REGION23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION23W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION23W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION24`" ] pub enum REGION24W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION24W :: DISABLED => false , REGION24W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION24W < 'a > { w : & 'a mut W , } impl < 'a > _REGION24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION24W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION24W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION25`" ] pub enum REGION25W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION25W :: DISABLED => false , REGION25W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION25W < 'a > { w : & 'a mut W , } impl < 'a > _REGION25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION25W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION25W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION26`" ] pub enum REGION26W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION26W :: DISABLED => false , REGION26W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION26W < 'a > { w : & 'a mut W , } impl < 'a > _REGION26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION26W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION26W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION27`" ] pub enum REGION27W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION27W :: DISABLED => false , REGION27W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION27W < 'a > { w : & 'a mut W , } impl < 'a > _REGION27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION27W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION27W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION28`" ] pub enum REGION28W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION28W :: DISABLED => false , REGION28W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION28W < 'a > { w : & 'a mut W , } impl < 'a > _REGION28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION28W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION28W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION29`" ] pub enum REGION29W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION29W :: DISABLED => false , REGION29W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION29W < 'a > { w : & 'a mut W , } impl < 'a > _REGION29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION29W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION29W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION30`" ] pub enum REGION30W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION30W :: DISABLED => false , REGION30W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION30W < 'a > { w : & 'a mut W , } impl < 'a > _REGION30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION30W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION30W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION31`" ] pub enum REGION31W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enable" ] ENABLED } impl REGION31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION31W :: DISABLED => false , REGION31W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION31W < 'a > { w : & 'a mut W , } impl < 'a > _REGION31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION31W :: DISABLED ) } # [ doc = "Protection enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION31W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect." ] # [ inline ] pub fn region0 ( & self ) -> REGION0R { REGION0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect." ] # [ inline ] pub fn region1 ( & self ) -> REGION1R { REGION1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect." ] # [ inline ] pub fn region2 ( & self ) -> REGION2R { REGION2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect." ] # [ inline ] pub fn region3 ( & self ) -> REGION3R { REGION3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect." ] # [ inline ] pub fn region4 ( & self ) -> REGION4R { REGION4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect." ] # [ inline ] pub fn region5 ( & self ) -> REGION5R { REGION5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect." ] # [ inline ] pub fn region6 ( & self ) -> REGION6R { REGION6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect." ] # [ inline ] pub fn region7 ( & self ) -> REGION7R { REGION7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect." ] # [ inline ] pub fn region8 ( & self ) -> REGION8R { REGION8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect." ] # [ inline ] pub fn region9 ( & self ) -> REGION9R { REGION9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect." ] # [ inline ] pub fn region10 ( & self ) -> REGION10R { REGION10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect." ] # [ inline ] pub fn region11 ( & self ) -> REGION11R { REGION11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect." ] # [ inline ] pub fn region12 ( & self ) -> REGION12R { REGION12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect." ] # [ inline ] pub fn region13 ( & self ) -> REGION13R { REGION13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect." ] # [ inline ] pub fn region14 ( & self ) -> REGION14R { REGION14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect." ] # [ inline ] pub fn region15 ( & self ) -> REGION15R { REGION15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect." ] # [ inline ] pub fn region16 ( & self ) -> REGION16R { REGION16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect." ] # [ inline ] pub fn region17 ( & self ) -> REGION17R { REGION17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect." ] # [ inline ] pub fn region18 ( & self ) -> REGION18R { REGION18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect." ] # [ inline ] pub fn region19 ( & self ) -> REGION19R { REGION19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect." ] # [ inline ] pub fn region20 ( & self ) -> REGION20R { REGION20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect." ] # [ inline ] pub fn region21 ( & self ) -> REGION21R { REGION21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect." ] # [ inline ] pub fn region22 ( & self ) -> REGION22R { REGION22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect." ] # [ inline ] pub fn region23 ( & self ) -> REGION23R { REGION23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect." ] # [ inline ] pub fn region24 ( & self ) -> REGION24R { REGION24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect." ] # [ inline ] pub fn region25 ( & self ) -> REGION25R { REGION25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect." ] # [ inline ] pub fn region26 ( & self ) -> REGION26R { REGION26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect." ] # [ inline ] pub fn region27 ( & self ) -> REGION27R { REGION27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect." ] # [ inline ] pub fn region28 ( & self ) -> REGION28R { REGION28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect." ] # [ inline ] pub fn region29 ( & self ) -> REGION29R { REGION29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect." ] # [ inline ] pub fn region30 ( & self ) -> REGION30R { REGION30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect." ] # [ inline ] pub fn region31 ( & self ) -> REGION31R { REGION31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect." ] # [ inline ] pub fn region0 ( & mut self ) -> _REGION0W { _REGION0W { w : self } } # [ doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect." ] # [ inline ] pub fn region1 ( & mut self ) -> _REGION1W { _REGION1W { w : self } } # [ doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect." ] # [ inline ] pub fn region2 ( & mut self ) -> _REGION2W { _REGION2W { w : self } } # [ doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect." ] # [ inline ] pub fn region3 ( & mut self ) -> _REGION3W { _REGION3W { w : self } } # [ doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect." ] # [ inline ] pub fn region4 ( & mut self ) -> _REGION4W { _REGION4W { w : self } } # [ doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect." ] # [ inline ] pub fn region5 ( & mut self ) -> _REGION5W { _REGION5W { w : self } } # [ doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect." ] # [ inline ] pub fn region6 ( & mut self ) -> _REGION6W { _REGION6W { w : self } } # [ doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect." ] # [ inline ] pub fn region7 ( & mut self ) -> _REGION7W { _REGION7W { w : self } } # [ doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect." ] # [ inline ] pub fn region8 ( & mut self ) -> _REGION8W { _REGION8W { w : self } } # [ doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect." ] # [ inline ] pub fn region9 ( & mut self ) -> _REGION9W { _REGION9W { w : self } } # [ doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect." ] # [ inline ] pub fn region10 ( & mut self ) -> _REGION10W { _REGION10W { w : self } } # [ doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect." ] # [ inline ] pub fn region11 ( & mut self ) -> _REGION11W { _REGION11W { w : self } } # [ doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect." ] # [ inline ] pub fn region12 ( & mut self ) -> _REGION12W { _REGION12W { w : self } } # [ doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect." ] # [ inline ] pub fn region13 ( & mut self ) -> _REGION13W { _REGION13W { w : self } } # [ doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect." ] # [ inline ] pub fn region14 ( & mut self ) -> _REGION14W { _REGION14W { w : self } } # [ doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect." ] # [ inline ] pub fn region15 ( & mut self ) -> _REGION15W { _REGION15W { w : self } } # [ doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect." ] # [ inline ] pub fn region16 ( & mut self ) -> _REGION16W { _REGION16W { w : self } } # [ doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect." ] # [ inline ] pub fn region17 ( & mut self ) -> _REGION17W { _REGION17W { w : self } } # [ doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect." ] # [ inline ] pub fn region18 ( & mut self ) -> _REGION18W { _REGION18W { w : self } } # [ doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect." ] # [ inline ] pub fn region19 ( & mut self ) -> _REGION19W { _REGION19W { w : self } } # [ doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect." ] # [ inline ] pub fn region20 ( & mut self ) -> _REGION20W { _REGION20W { w : self } } # [ doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect." ] # [ inline ] pub fn region21 ( & mut self ) -> _REGION21W { _REGION21W { w : self } } # [ doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect." ] # [ inline ] pub fn region22 ( & mut self ) -> _REGION22W { _REGION22W { w : self } } # [ doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect." ] # [ inline ] pub fn region23 ( & mut self ) -> _REGION23W { _REGION23W { w : self } } # [ doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect." ] # [ inline ] pub fn region24 ( & mut self ) -> _REGION24W { _REGION24W { w : self } } # [ doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect." ] # [ inline ] pub fn region25 ( & mut self ) -> _REGION25W { _REGION25W { w : self } } # [ doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect." ] # [ inline ] pub fn region26 ( & mut self ) -> _REGION26W { _REGION26W { w : self } } # [ doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect." ] # [ inline ] pub fn region27 ( & mut self ) -> _REGION27W { _REGION27W { w : self } } # [ doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect." ] # [ inline ] pub fn region28 ( & mut self ) -> _REGION28W { _REGION28W { w : self } } # [ doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect." ] # [ inline ] pub fn region29 ( & mut self ) -> _REGION29W { _REGION29W { w : self } } # [ doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect." ] # [ inline ] pub fn region30 ( & mut self ) -> _REGION30W { _REGION30W { w : self } } # [ doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect." ] # [ inline ] pub fn region31 ( & mut self ) -> _REGION31W { _REGION31W { w : self } } } } # [ doc = "Block protect configuration register 1" ] pub struct CONFIG1 { register : VolatileCell < u32 > } # [ doc = "Block protect configuration register 1" ] pub mod config1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION32`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION32R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION32R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION32R :: DISABLED => false , REGION32R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION32R { match value { false => REGION32R :: DISABLED , true => REGION32R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION32R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION32R :: ENABLED } } # [ doc = "Possible values of the field `REGION33`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION33R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION33R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION33R :: DISABLED => false , REGION33R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION33R { match value { false => REGION33R :: DISABLED , true => REGION33R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION33R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION33R :: ENABLED } } # [ doc = "Possible values of the field `REGION34`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION34R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION34R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION34R :: DISABLED => false , REGION34R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION34R { match value { false => REGION34R :: DISABLED , true => REGION34R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION34R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION34R :: ENABLED } } # [ doc = "Possible values of the field `REGION35`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION35R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION35R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION35R :: DISABLED => false , REGION35R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION35R { match value { false => REGION35R :: DISABLED , true => REGION35R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION35R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION35R :: ENABLED } } # [ doc = "Possible values of the field `REGION36`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION36R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION36R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION36R :: DISABLED => false , REGION36R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION36R { match value { false => REGION36R :: DISABLED , true => REGION36R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION36R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION36R :: ENABLED } } # [ doc = "Possible values of the field `REGION37`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION37R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION37R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION37R :: DISABLED => false , REGION37R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION37R { match value { false => REGION37R :: DISABLED , true => REGION37R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION37R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION37R :: ENABLED } } # [ doc = "Possible values of the field `REGION38`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION38R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION38R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION38R :: DISABLED => false , REGION38R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION38R { match value { false => REGION38R :: DISABLED , true => REGION38R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION38R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION38R :: ENABLED } } # [ doc = "Possible values of the field `REGION39`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION39R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION39R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION39R :: DISABLED => false , REGION39R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION39R { match value { false => REGION39R :: DISABLED , true => REGION39R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION39R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION39R :: ENABLED } } # [ doc = "Possible values of the field `REGION40`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION40R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION40R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION40R :: DISABLED => false , REGION40R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION40R { match value { false => REGION40R :: DISABLED , true => REGION40R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION40R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION40R :: ENABLED } } # [ doc = "Possible values of the field `REGION41`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION41R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION41R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION41R :: DISABLED => false , REGION41R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION41R { match value { false => REGION41R :: DISABLED , true => REGION41R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION41R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION41R :: ENABLED } } # [ doc = "Possible values of the field `REGION42`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION42R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION42R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION42R :: DISABLED => false , REGION42R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION42R { match value { false => REGION42R :: DISABLED , true => REGION42R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION42R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION42R :: ENABLED } } # [ doc = "Possible values of the field `REGION43`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION43R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION43R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION43R :: DISABLED => false , REGION43R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION43R { match value { false => REGION43R :: DISABLED , true => REGION43R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION43R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION43R :: ENABLED } } # [ doc = "Possible values of the field `REGION44`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION44R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION44R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION44R :: DISABLED => false , REGION44R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION44R { match value { false => REGION44R :: DISABLED , true => REGION44R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION44R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION44R :: ENABLED } } # [ doc = "Possible values of the field `REGION45`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION45R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION45R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION45R :: DISABLED => false , REGION45R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION45R { match value { false => REGION45R :: DISABLED , true => REGION45R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION45R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION45R :: ENABLED } } # [ doc = "Possible values of the field `REGION46`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION46R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION46R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION46R :: DISABLED => false , REGION46R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION46R { match value { false => REGION46R :: DISABLED , true => REGION46R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION46R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION46R :: ENABLED } } # [ doc = "Possible values of the field `REGION47`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION47R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION47R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION47R :: DISABLED => false , REGION47R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION47R { match value { false => REGION47R :: DISABLED , true => REGION47R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION47R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION47R :: ENABLED } } # [ doc = "Possible values of the field `REGION48`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION48R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION48R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION48R :: DISABLED => false , REGION48R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION48R { match value { false => REGION48R :: DISABLED , true => REGION48R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION48R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION48R :: ENABLED } } # [ doc = "Possible values of the field `REGION49`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION49R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION49R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION49R :: DISABLED => false , REGION49R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION49R { match value { false => REGION49R :: DISABLED , true => REGION49R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION49R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION49R :: ENABLED } } # [ doc = "Possible values of the field `REGION50`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION50R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION50R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION50R :: DISABLED => false , REGION50R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION50R { match value { false => REGION50R :: DISABLED , true => REGION50R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION50R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION50R :: ENABLED } } # [ doc = "Possible values of the field `REGION51`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION51R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION51R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION51R :: DISABLED => false , REGION51R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION51R { match value { false => REGION51R :: DISABLED , true => REGION51R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION51R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION51R :: ENABLED } } # [ doc = "Possible values of the field `REGION52`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION52R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION52R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION52R :: DISABLED => false , REGION52R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION52R { match value { false => REGION52R :: DISABLED , true => REGION52R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION52R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION52R :: ENABLED } } # [ doc = "Possible values of the field `REGION53`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION53R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION53R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION53R :: DISABLED => false , REGION53R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION53R { match value { false => REGION53R :: DISABLED , true => REGION53R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION53R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION53R :: ENABLED } } # [ doc = "Possible values of the field `REGION54`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION54R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION54R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION54R :: DISABLED => false , REGION54R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION54R { match value { false => REGION54R :: DISABLED , true => REGION54R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION54R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION54R :: ENABLED } } # [ doc = "Possible values of the field `REGION55`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION55R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION55R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION55R :: DISABLED => false , REGION55R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION55R { match value { false => REGION55R :: DISABLED , true => REGION55R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION55R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION55R :: ENABLED } } # [ doc = "Possible values of the field `REGION56`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION56R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION56R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION56R :: DISABLED => false , REGION56R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION56R { match value { false => REGION56R :: DISABLED , true => REGION56R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION56R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION56R :: ENABLED } } # [ doc = "Possible values of the field `REGION57`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION57R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION57R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION57R :: DISABLED => false , REGION57R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION57R { match value { false => REGION57R :: DISABLED , true => REGION57R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION57R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION57R :: ENABLED } } # [ doc = "Possible values of the field `REGION58`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION58R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION58R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION58R :: DISABLED => false , REGION58R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION58R { match value { false => REGION58R :: DISABLED , true => REGION58R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION58R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION58R :: ENABLED } } # [ doc = "Possible values of the field `REGION59`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION59R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION59R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION59R :: DISABLED => false , REGION59R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION59R { match value { false => REGION59R :: DISABLED , true => REGION59R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION59R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION59R :: ENABLED } } # [ doc = "Possible values of the field `REGION60`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION60R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION60R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION60R :: DISABLED => false , REGION60R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION60R { match value { false => REGION60R :: DISABLED , true => REGION60R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION60R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION60R :: ENABLED } } # [ doc = "Possible values of the field `REGION61`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION61R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION61R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION61R :: DISABLED => false , REGION61R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION61R { match value { false => REGION61R :: DISABLED , true => REGION61R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION61R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION61R :: ENABLED } } # [ doc = "Possible values of the field `REGION62`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION62R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION62R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION62R :: DISABLED => false , REGION62R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION62R { match value { false => REGION62R :: DISABLED , true => REGION62R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION62R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION62R :: ENABLED } } # [ doc = "Possible values of the field `REGION63`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION63R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION63R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION63R :: DISABLED => false , REGION63R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION63R { match value { false => REGION63R :: DISABLED , true => REGION63R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION63R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION63R :: ENABLED } } # [ doc = "Values that can be written to the field `REGION32`" ] pub enum REGION32W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION32W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION32W :: DISABLED => false , REGION32W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION32W < 'a > { w : & 'a mut W , } impl < 'a > _REGION32W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION32W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION32W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION32W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION33`" ] pub enum REGION33W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION33W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION33W :: DISABLED => false , REGION33W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION33W < 'a > { w : & 'a mut W , } impl < 'a > _REGION33W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION33W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION33W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION33W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION34`" ] pub enum REGION34W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION34W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION34W :: DISABLED => false , REGION34W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION34W < 'a > { w : & 'a mut W , } impl < 'a > _REGION34W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION34W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION34W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION34W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION35`" ] pub enum REGION35W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION35W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION35W :: DISABLED => false , REGION35W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION35W < 'a > { w : & 'a mut W , } impl < 'a > _REGION35W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION35W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION35W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION35W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION36`" ] pub enum REGION36W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION36W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION36W :: DISABLED => false , REGION36W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION36W < 'a > { w : & 'a mut W , } impl < 'a > _REGION36W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION36W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION36W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION36W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION37`" ] pub enum REGION37W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION37W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION37W :: DISABLED => false , REGION37W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION37W < 'a > { w : & 'a mut W , } impl < 'a > _REGION37W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION37W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION37W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION37W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION38`" ] pub enum REGION38W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION38W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION38W :: DISABLED => false , REGION38W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION38W < 'a > { w : & 'a mut W , } impl < 'a > _REGION38W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION38W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION38W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION38W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION39`" ] pub enum REGION39W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION39W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION39W :: DISABLED => false , REGION39W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION39W < 'a > { w : & 'a mut W , } impl < 'a > _REGION39W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION39W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION39W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION39W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION40`" ] pub enum REGION40W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION40W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION40W :: DISABLED => false , REGION40W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION40W < 'a > { w : & 'a mut W , } impl < 'a > _REGION40W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION40W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION40W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION40W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION41`" ] pub enum REGION41W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION41W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION41W :: DISABLED => false , REGION41W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION41W < 'a > { w : & 'a mut W , } impl < 'a > _REGION41W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION41W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION41W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION41W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION42`" ] pub enum REGION42W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION42W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION42W :: DISABLED => false , REGION42W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION42W < 'a > { w : & 'a mut W , } impl < 'a > _REGION42W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION42W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION42W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION42W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION43`" ] pub enum REGION43W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION43W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION43W :: DISABLED => false , REGION43W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION43W < 'a > { w : & 'a mut W , } impl < 'a > _REGION43W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION43W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION43W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION43W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION44`" ] pub enum REGION44W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION44W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION44W :: DISABLED => false , REGION44W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION44W < 'a > { w : & 'a mut W , } impl < 'a > _REGION44W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION44W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION44W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION44W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION45`" ] pub enum REGION45W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION45W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION45W :: DISABLED => false , REGION45W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION45W < 'a > { w : & 'a mut W , } impl < 'a > _REGION45W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION45W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION45W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION45W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION46`" ] pub enum REGION46W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION46W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION46W :: DISABLED => false , REGION46W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION46W < 'a > { w : & 'a mut W , } impl < 'a > _REGION46W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION46W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION46W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION46W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION47`" ] pub enum REGION47W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION47W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION47W :: DISABLED => false , REGION47W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION47W < 'a > { w : & 'a mut W , } impl < 'a > _REGION47W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION47W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION47W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION47W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION48`" ] pub enum REGION48W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION48W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION48W :: DISABLED => false , REGION48W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION48W < 'a > { w : & 'a mut W , } impl < 'a > _REGION48W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION48W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION48W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION48W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION49`" ] pub enum REGION49W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION49W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION49W :: DISABLED => false , REGION49W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION49W < 'a > { w : & 'a mut W , } impl < 'a > _REGION49W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION49W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION49W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION49W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION50`" ] pub enum REGION50W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION50W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION50W :: DISABLED => false , REGION50W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION50W < 'a > { w : & 'a mut W , } impl < 'a > _REGION50W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION50W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION50W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION50W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION51`" ] pub enum REGION51W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION51W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION51W :: DISABLED => false , REGION51W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION51W < 'a > { w : & 'a mut W , } impl < 'a > _REGION51W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION51W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION51W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION51W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION52`" ] pub enum REGION52W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION52W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION52W :: DISABLED => false , REGION52W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION52W < 'a > { w : & 'a mut W , } impl < 'a > _REGION52W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION52W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION52W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION52W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION53`" ] pub enum REGION53W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION53W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION53W :: DISABLED => false , REGION53W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION53W < 'a > { w : & 'a mut W , } impl < 'a > _REGION53W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION53W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION53W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION53W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION54`" ] pub enum REGION54W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION54W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION54W :: DISABLED => false , REGION54W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION54W < 'a > { w : & 'a mut W , } impl < 'a > _REGION54W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION54W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION54W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION54W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION55`" ] pub enum REGION55W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION55W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION55W :: DISABLED => false , REGION55W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION55W < 'a > { w : & 'a mut W , } impl < 'a > _REGION55W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION55W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION55W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION55W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION56`" ] pub enum REGION56W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION56W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION56W :: DISABLED => false , REGION56W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION56W < 'a > { w : & 'a mut W , } impl < 'a > _REGION56W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION56W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION56W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION56W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION57`" ] pub enum REGION57W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION57W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION57W :: DISABLED => false , REGION57W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION57W < 'a > { w : & 'a mut W , } impl < 'a > _REGION57W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION57W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION57W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION57W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION58`" ] pub enum REGION58W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION58W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION58W :: DISABLED => false , REGION58W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION58W < 'a > { w : & 'a mut W , } impl < 'a > _REGION58W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION58W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION58W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION58W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION59`" ] pub enum REGION59W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION59W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION59W :: DISABLED => false , REGION59W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION59W < 'a > { w : & 'a mut W , } impl < 'a > _REGION59W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION59W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION59W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION59W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION60`" ] pub enum REGION60W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION60W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION60W :: DISABLED => false , REGION60W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION60W < 'a > { w : & 'a mut W , } impl < 'a > _REGION60W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION60W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION60W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION60W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION61`" ] pub enum REGION61W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION61W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION61W :: DISABLED => false , REGION61W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION61W < 'a > { w : & 'a mut W , } impl < 'a > _REGION61W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION61W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION61W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION61W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION62`" ] pub enum REGION62W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION62W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION62W :: DISABLED => false , REGION62W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION62W < 'a > { w : & 'a mut W , } impl < 'a > _REGION62W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION62W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION62W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION62W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION63`" ] pub enum REGION63W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION63W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION63W :: DISABLED => false , REGION63W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION63W < 'a > { w : & 'a mut W , } impl < 'a > _REGION63W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION63W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION63W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION63W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect." ] # [ inline ] pub fn region32 ( & self ) -> REGION32R { REGION32R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect." ] # [ inline ] pub fn region33 ( & self ) -> REGION33R { REGION33R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect." ] # [ inline ] pub fn region34 ( & self ) -> REGION34R { REGION34R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect." ] # [ inline ] pub fn region35 ( & self ) -> REGION35R { REGION35R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect." ] # [ inline ] pub fn region36 ( & self ) -> REGION36R { REGION36R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect." ] # [ inline ] pub fn region37 ( & self ) -> REGION37R { REGION37R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect." ] # [ inline ] pub fn region38 ( & self ) -> REGION38R { REGION38R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect." ] # [ inline ] pub fn region39 ( & self ) -> REGION39R { REGION39R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect." ] # [ inline ] pub fn region40 ( & self ) -> REGION40R { REGION40R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect." ] # [ inline ] pub fn region41 ( & self ) -> REGION41R { REGION41R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect." ] # [ inline ] pub fn region42 ( & self ) -> REGION42R { REGION42R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect." ] # [ inline ] pub fn region43 ( & self ) -> REGION43R { REGION43R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect." ] # [ inline ] pub fn region44 ( & self ) -> REGION44R { REGION44R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect." ] # [ inline ] pub fn region45 ( & self ) -> REGION45R { REGION45R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect." ] # [ inline ] pub fn region46 ( & self ) -> REGION46R { REGION46R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect." ] # [ inline ] pub fn region47 ( & self ) -> REGION47R { REGION47R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect." ] # [ inline ] pub fn region48 ( & self ) -> REGION48R { REGION48R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect." ] # [ inline ] pub fn region49 ( & self ) -> REGION49R { REGION49R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect." ] # [ inline ] pub fn region50 ( & self ) -> REGION50R { REGION50R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect." ] # [ inline ] pub fn region51 ( & self ) -> REGION51R { REGION51R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect." ] # [ inline ] pub fn region52 ( & self ) -> REGION52R { REGION52R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect." ] # [ inline ] pub fn region53 ( & self ) -> REGION53R { REGION53R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect." ] # [ inline ] pub fn region54 ( & self ) -> REGION54R { REGION54R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect." ] # [ inline ] pub fn region55 ( & self ) -> REGION55R { REGION55R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect." ] # [ inline ] pub fn region56 ( & self ) -> REGION56R { REGION56R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect." ] # [ inline ] pub fn region57 ( & self ) -> REGION57R { REGION57R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect." ] # [ inline ] pub fn region58 ( & self ) -> REGION58R { REGION58R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect." ] # [ inline ] pub fn region59 ( & self ) -> REGION59R { REGION59R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect." ] # [ inline ] pub fn region60 ( & self ) -> REGION60R { REGION60R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect." ] # [ inline ] pub fn region61 ( & self ) -> REGION61R { REGION61R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect." ] # [ inline ] pub fn region62 ( & self ) -> REGION62R { REGION62R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect." ] # [ inline ] pub fn region63 ( & self ) -> REGION63R { REGION63R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect." ] # [ inline ] pub fn region32 ( & mut self ) -> _REGION32W { _REGION32W { w : self } } # [ doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect." ] # [ inline ] pub fn region33 ( & mut self ) -> _REGION33W { _REGION33W { w : self } } # [ doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect." ] # [ inline ] pub fn region34 ( & mut self ) -> _REGION34W { _REGION34W { w : self } } # [ doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect." ] # [ inline ] pub fn region35 ( & mut self ) -> _REGION35W { _REGION35W { w : self } } # [ doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect." ] # [ inline ] pub fn region36 ( & mut self ) -> _REGION36W { _REGION36W { w : self } } # [ doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect." ] # [ inline ] pub fn region37 ( & mut self ) -> _REGION37W { _REGION37W { w : self } } # [ doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect." ] # [ inline ] pub fn region38 ( & mut self ) -> _REGION38W { _REGION38W { w : self } } # [ doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect." ] # [ inline ] pub fn region39 ( & mut self ) -> _REGION39W { _REGION39W { w : self } } # [ doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect." ] # [ inline ] pub fn region40 ( & mut self ) -> _REGION40W { _REGION40W { w : self } } # [ doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect." ] # [ inline ] pub fn region41 ( & mut self ) -> _REGION41W { _REGION41W { w : self } } # [ doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect." ] # [ inline ] pub fn region42 ( & mut self ) -> _REGION42W { _REGION42W { w : self } } # [ doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect." ] # [ inline ] pub fn region43 ( & mut self ) -> _REGION43W { _REGION43W { w : self } } # [ doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect." ] # [ inline ] pub fn region44 ( & mut self ) -> _REGION44W { _REGION44W { w : self } } # [ doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect." ] # [ inline ] pub fn region45 ( & mut self ) -> _REGION45W { _REGION45W { w : self } } # [ doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect." ] # [ inline ] pub fn region46 ( & mut self ) -> _REGION46W { _REGION46W { w : self } } # [ doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect." ] # [ inline ] pub fn region47 ( & mut self ) -> _REGION47W { _REGION47W { w : self } } # [ doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect." ] # [ inline ] pub fn region48 ( & mut self ) -> _REGION48W { _REGION48W { w : self } } # [ doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect." ] # [ inline ] pub fn region49 ( & mut self ) -> _REGION49W { _REGION49W { w : self } } # [ doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect." ] # [ inline ] pub fn region50 ( & mut self ) -> _REGION50W { _REGION50W { w : self } } # [ doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect." ] # [ inline ] pub fn region51 ( & mut self ) -> _REGION51W { _REGION51W { w : self } } # [ doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect." ] # [ inline ] pub fn region52 ( & mut self ) -> _REGION52W { _REGION52W { w : self } } # [ doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect." ] # [ inline ] pub fn region53 ( & mut self ) -> _REGION53W { _REGION53W { w : self } } # [ doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect." ] # [ inline ] pub fn region54 ( & mut self ) -> _REGION54W { _REGION54W { w : self } } # [ doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect." ] # [ inline ] pub fn region55 ( & mut self ) -> _REGION55W { _REGION55W { w : self } } # [ doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect." ] # [ inline ] pub fn region56 ( & mut self ) -> _REGION56W { _REGION56W { w : self } } # [ doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect." ] # [ inline ] pub fn region57 ( & mut self ) -> _REGION57W { _REGION57W { w : self } } # [ doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect." ] # [ inline ] pub fn region58 ( & mut self ) -> _REGION58W { _REGION58W { w : self } } # [ doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect." ] # [ inline ] pub fn region59 ( & mut self ) -> _REGION59W { _REGION59W { w : self } } # [ doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect." ] # [ inline ] pub fn region60 ( & mut self ) -> _REGION60W { _REGION60W { w : self } } # [ doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect." ] # [ inline ] pub fn region61 ( & mut self ) -> _REGION61W { _REGION61W { w : self } } # [ doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect." ] # [ inline ] pub fn region62 ( & mut self ) -> _REGION62W { _REGION62W { w : self } } # [ doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect." ] # [ inline ] pub fn region63 ( & mut self ) -> _REGION63W { _REGION63W { w : self } } } } # [ doc = "Disable protection mechanism in debug interface mode" ] pub struct DISABLEINDEBUG { register : VolatileCell < u32 > } # [ doc = "Disable protection mechanism in debug interface mode" ] pub mod disableindebug { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DISABLEINDEBUG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DISABLEINDEBUG`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLEINDEBUGR { # [ doc = "Disable in debug" ] DISABLED , # [ doc = "Enable in debug" ] ENABLED } impl DISABLEINDEBUGR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLEINDEBUGR :: DISABLED => true , DISABLEINDEBUGR :: ENABLED => false } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLEINDEBUGR { match value { true => DISABLEINDEBUGR :: DISABLED , false => DISABLEINDEBUGR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLEINDEBUGR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLEINDEBUGR :: ENABLED } } # [ doc = "Values that can be written to the field `DISABLEINDEBUG`" ] pub enum DISABLEINDEBUGW { # [ doc = "Disable in debug" ] DISABLED , # [ doc = "Enable in debug" ] ENABLED } impl DISABLEINDEBUGW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLEINDEBUGW :: DISABLED => true , DISABLEINDEBUGW :: ENABLED => false } } } # [ doc = r" Proxy" ] pub struct _DISABLEINDEBUGW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLEINDEBUGW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLEINDEBUGW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable in debug" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DISABLEINDEBUGW :: DISABLED ) } # [ doc = "Enable in debug" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DISABLEINDEBUGW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode." ] # [ inline ] pub fn disableindebug ( & self ) -> DISABLEINDEBUGR { DISABLEINDEBUGR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode." ] # [ inline ] pub fn disableindebug ( & mut self ) -> _DISABLEINDEBUGW { _DISABLEINDEBUGW { w : self } } } } # [ doc = "Unspecified" ] pub struct UNUSED0 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Block protect configuration register 2" ] pub struct CONFIG2 { register : VolatileCell < u32 > } # [ doc = "Block protect configuration register 2" ] pub mod config2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION64`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION64R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION64R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION64R :: DISABLED => false , REGION64R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION64R { match value { false => REGION64R :: DISABLED , true => REGION64R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION64R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION64R :: ENABLED } } # [ doc = "Possible values of the field `REGION65`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION65R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION65R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION65R :: DISABLED => false , REGION65R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION65R { match value { false => REGION65R :: DISABLED , true => REGION65R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION65R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION65R :: ENABLED } } # [ doc = "Possible values of the field `REGION66`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION66R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION66R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION66R :: DISABLED => false , REGION66R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION66R { match value { false => REGION66R :: DISABLED , true => REGION66R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION66R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION66R :: ENABLED } } # [ doc = "Possible values of the field `REGION67`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION67R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION67R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION67R :: DISABLED => false , REGION67R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION67R { match value { false => REGION67R :: DISABLED , true => REGION67R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION67R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION67R :: ENABLED } } # [ doc = "Possible values of the field `REGION68`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION68R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION68R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION68R :: DISABLED => false , REGION68R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION68R { match value { false => REGION68R :: DISABLED , true => REGION68R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION68R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION68R :: ENABLED } } # [ doc = "Possible values of the field `REGION69`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION69R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION69R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION69R :: DISABLED => false , REGION69R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION69R { match value { false => REGION69R :: DISABLED , true => REGION69R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION69R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION69R :: ENABLED } } # [ doc = "Possible values of the field `REGION70`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION70R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION70R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION70R :: DISABLED => false , REGION70R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION70R { match value { false => REGION70R :: DISABLED , true => REGION70R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION70R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION70R :: ENABLED } } # [ doc = "Possible values of the field `REGION71`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION71R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION71R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION71R :: DISABLED => false , REGION71R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION71R { match value { false => REGION71R :: DISABLED , true => REGION71R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION71R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION71R :: ENABLED } } # [ doc = "Possible values of the field `REGION72`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION72R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION72R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION72R :: DISABLED => false , REGION72R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION72R { match value { false => REGION72R :: DISABLED , true => REGION72R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION72R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION72R :: ENABLED } } # [ doc = "Possible values of the field `REGION73`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION73R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION73R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION73R :: DISABLED => false , REGION73R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION73R { match value { false => REGION73R :: DISABLED , true => REGION73R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION73R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION73R :: ENABLED } } # [ doc = "Possible values of the field `REGION74`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION74R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION74R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION74R :: DISABLED => false , REGION74R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION74R { match value { false => REGION74R :: DISABLED , true => REGION74R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION74R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION74R :: ENABLED } } # [ doc = "Possible values of the field `REGION75`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION75R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION75R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION75R :: DISABLED => false , REGION75R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION75R { match value { false => REGION75R :: DISABLED , true => REGION75R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION75R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION75R :: ENABLED } } # [ doc = "Possible values of the field `REGION76`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION76R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION76R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION76R :: DISABLED => false , REGION76R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION76R { match value { false => REGION76R :: DISABLED , true => REGION76R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION76R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION76R :: ENABLED } } # [ doc = "Possible values of the field `REGION77`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION77R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION77R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION77R :: DISABLED => false , REGION77R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION77R { match value { false => REGION77R :: DISABLED , true => REGION77R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION77R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION77R :: ENABLED } } # [ doc = "Possible values of the field `REGION78`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION78R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION78R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION78R :: DISABLED => false , REGION78R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION78R { match value { false => REGION78R :: DISABLED , true => REGION78R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION78R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION78R :: ENABLED } } # [ doc = "Possible values of the field `REGION79`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION79R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION79R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION79R :: DISABLED => false , REGION79R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION79R { match value { false => REGION79R :: DISABLED , true => REGION79R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION79R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION79R :: ENABLED } } # [ doc = "Possible values of the field `REGION80`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION80R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION80R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION80R :: DISABLED => false , REGION80R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION80R { match value { false => REGION80R :: DISABLED , true => REGION80R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION80R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION80R :: ENABLED } } # [ doc = "Possible values of the field `REGION81`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION81R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION81R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION81R :: DISABLED => false , REGION81R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION81R { match value { false => REGION81R :: DISABLED , true => REGION81R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION81R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION81R :: ENABLED } } # [ doc = "Possible values of the field `REGION82`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION82R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION82R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION82R :: DISABLED => false , REGION82R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION82R { match value { false => REGION82R :: DISABLED , true => REGION82R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION82R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION82R :: ENABLED } } # [ doc = "Possible values of the field `REGION83`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION83R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION83R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION83R :: DISABLED => false , REGION83R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION83R { match value { false => REGION83R :: DISABLED , true => REGION83R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION83R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION83R :: ENABLED } } # [ doc = "Possible values of the field `REGION84`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION84R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION84R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION84R :: DISABLED => false , REGION84R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION84R { match value { false => REGION84R :: DISABLED , true => REGION84R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION84R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION84R :: ENABLED } } # [ doc = "Possible values of the field `REGION85`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION85R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION85R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION85R :: DISABLED => false , REGION85R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION85R { match value { false => REGION85R :: DISABLED , true => REGION85R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION85R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION85R :: ENABLED } } # [ doc = "Possible values of the field `REGION86`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION86R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION86R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION86R :: DISABLED => false , REGION86R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION86R { match value { false => REGION86R :: DISABLED , true => REGION86R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION86R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION86R :: ENABLED } } # [ doc = "Possible values of the field `REGION87`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION87R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION87R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION87R :: DISABLED => false , REGION87R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION87R { match value { false => REGION87R :: DISABLED , true => REGION87R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION87R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION87R :: ENABLED } } # [ doc = "Possible values of the field `REGION88`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION88R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION88R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION88R :: DISABLED => false , REGION88R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION88R { match value { false => REGION88R :: DISABLED , true => REGION88R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION88R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION88R :: ENABLED } } # [ doc = "Possible values of the field `REGION89`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION89R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION89R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION89R :: DISABLED => false , REGION89R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION89R { match value { false => REGION89R :: DISABLED , true => REGION89R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION89R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION89R :: ENABLED } } # [ doc = "Possible values of the field `REGION90`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION90R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION90R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION90R :: DISABLED => false , REGION90R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION90R { match value { false => REGION90R :: DISABLED , true => REGION90R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION90R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION90R :: ENABLED } } # [ doc = "Possible values of the field `REGION91`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION91R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION91R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION91R :: DISABLED => false , REGION91R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION91R { match value { false => REGION91R :: DISABLED , true => REGION91R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION91R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION91R :: ENABLED } } # [ doc = "Possible values of the field `REGION92`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION92R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION92R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION92R :: DISABLED => false , REGION92R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION92R { match value { false => REGION92R :: DISABLED , true => REGION92R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION92R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION92R :: ENABLED } } # [ doc = "Possible values of the field `REGION93`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION93R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION93R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION93R :: DISABLED => false , REGION93R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION93R { match value { false => REGION93R :: DISABLED , true => REGION93R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION93R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION93R :: ENABLED } } # [ doc = "Possible values of the field `REGION94`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION94R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION94R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION94R :: DISABLED => false , REGION94R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION94R { match value { false => REGION94R :: DISABLED , true => REGION94R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION94R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION94R :: ENABLED } } # [ doc = "Possible values of the field `REGION95`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION95R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION95R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION95R :: DISABLED => false , REGION95R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION95R { match value { false => REGION95R :: DISABLED , true => REGION95R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION95R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION95R :: ENABLED } } # [ doc = "Values that can be written to the field `REGION64`" ] pub enum REGION64W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION64W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION64W :: DISABLED => false , REGION64W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION64W < 'a > { w : & 'a mut W , } impl < 'a > _REGION64W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION64W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION64W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION64W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION65`" ] pub enum REGION65W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION65W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION65W :: DISABLED => false , REGION65W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION65W < 'a > { w : & 'a mut W , } impl < 'a > _REGION65W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION65W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION65W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION65W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION66`" ] pub enum REGION66W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION66W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION66W :: DISABLED => false , REGION66W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION66W < 'a > { w : & 'a mut W , } impl < 'a > _REGION66W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION66W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION66W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION66W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION67`" ] pub enum REGION67W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION67W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION67W :: DISABLED => false , REGION67W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION67W < 'a > { w : & 'a mut W , } impl < 'a > _REGION67W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION67W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION67W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION67W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION68`" ] pub enum REGION68W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION68W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION68W :: DISABLED => false , REGION68W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION68W < 'a > { w : & 'a mut W , } impl < 'a > _REGION68W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION68W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION68W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION68W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION69`" ] pub enum REGION69W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION69W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION69W :: DISABLED => false , REGION69W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION69W < 'a > { w : & 'a mut W , } impl < 'a > _REGION69W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION69W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION69W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION69W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION70`" ] pub enum REGION70W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION70W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION70W :: DISABLED => false , REGION70W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION70W < 'a > { w : & 'a mut W , } impl < 'a > _REGION70W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION70W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION70W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION70W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION71`" ] pub enum REGION71W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION71W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION71W :: DISABLED => false , REGION71W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION71W < 'a > { w : & 'a mut W , } impl < 'a > _REGION71W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION71W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION71W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION71W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION72`" ] pub enum REGION72W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION72W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION72W :: DISABLED => false , REGION72W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION72W < 'a > { w : & 'a mut W , } impl < 'a > _REGION72W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION72W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION72W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION72W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION73`" ] pub enum REGION73W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION73W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION73W :: DISABLED => false , REGION73W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION73W < 'a > { w : & 'a mut W , } impl < 'a > _REGION73W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION73W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION73W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION73W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION74`" ] pub enum REGION74W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION74W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION74W :: DISABLED => false , REGION74W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION74W < 'a > { w : & 'a mut W , } impl < 'a > _REGION74W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION74W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION74W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION74W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION75`" ] pub enum REGION75W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION75W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION75W :: DISABLED => false , REGION75W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION75W < 'a > { w : & 'a mut W , } impl < 'a > _REGION75W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION75W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION75W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION75W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION76`" ] pub enum REGION76W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION76W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION76W :: DISABLED => false , REGION76W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION76W < 'a > { w : & 'a mut W , } impl < 'a > _REGION76W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION76W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION76W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION76W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION77`" ] pub enum REGION77W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION77W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION77W :: DISABLED => false , REGION77W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION77W < 'a > { w : & 'a mut W , } impl < 'a > _REGION77W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION77W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION77W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION77W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION78`" ] pub enum REGION78W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION78W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION78W :: DISABLED => false , REGION78W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION78W < 'a > { w : & 'a mut W , } impl < 'a > _REGION78W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION78W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION78W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION78W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION79`" ] pub enum REGION79W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION79W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION79W :: DISABLED => false , REGION79W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION79W < 'a > { w : & 'a mut W , } impl < 'a > _REGION79W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION79W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION79W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION79W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION80`" ] pub enum REGION80W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION80W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION80W :: DISABLED => false , REGION80W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION80W < 'a > { w : & 'a mut W , } impl < 'a > _REGION80W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION80W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION80W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION80W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION81`" ] pub enum REGION81W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION81W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION81W :: DISABLED => false , REGION81W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION81W < 'a > { w : & 'a mut W , } impl < 'a > _REGION81W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION81W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION81W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION81W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION82`" ] pub enum REGION82W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION82W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION82W :: DISABLED => false , REGION82W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION82W < 'a > { w : & 'a mut W , } impl < 'a > _REGION82W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION82W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION82W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION82W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION83`" ] pub enum REGION83W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION83W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION83W :: DISABLED => false , REGION83W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION83W < 'a > { w : & 'a mut W , } impl < 'a > _REGION83W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION83W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION83W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION83W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION84`" ] pub enum REGION84W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION84W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION84W :: DISABLED => false , REGION84W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION84W < 'a > { w : & 'a mut W , } impl < 'a > _REGION84W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION84W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION84W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION84W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION85`" ] pub enum REGION85W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION85W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION85W :: DISABLED => false , REGION85W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION85W < 'a > { w : & 'a mut W , } impl < 'a > _REGION85W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION85W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION85W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION85W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION86`" ] pub enum REGION86W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION86W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION86W :: DISABLED => false , REGION86W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION86W < 'a > { w : & 'a mut W , } impl < 'a > _REGION86W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION86W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION86W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION86W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION87`" ] pub enum REGION87W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION87W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION87W :: DISABLED => false , REGION87W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION87W < 'a > { w : & 'a mut W , } impl < 'a > _REGION87W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION87W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION87W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION87W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION88`" ] pub enum REGION88W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION88W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION88W :: DISABLED => false , REGION88W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION88W < 'a > { w : & 'a mut W , } impl < 'a > _REGION88W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION88W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION88W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION88W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION89`" ] pub enum REGION89W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION89W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION89W :: DISABLED => false , REGION89W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION89W < 'a > { w : & 'a mut W , } impl < 'a > _REGION89W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION89W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION89W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION89W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION90`" ] pub enum REGION90W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION90W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION90W :: DISABLED => false , REGION90W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION90W < 'a > { w : & 'a mut W , } impl < 'a > _REGION90W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION90W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION90W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION90W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION91`" ] pub enum REGION91W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION91W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION91W :: DISABLED => false , REGION91W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION91W < 'a > { w : & 'a mut W , } impl < 'a > _REGION91W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION91W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION91W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION91W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION92`" ] pub enum REGION92W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION92W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION92W :: DISABLED => false , REGION92W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION92W < 'a > { w : & 'a mut W , } impl < 'a > _REGION92W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION92W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION92W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION92W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION93`" ] pub enum REGION93W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION93W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION93W :: DISABLED => false , REGION93W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION93W < 'a > { w : & 'a mut W , } impl < 'a > _REGION93W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION93W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION93W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION93W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION94`" ] pub enum REGION94W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION94W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION94W :: DISABLED => false , REGION94W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION94W < 'a > { w : & 'a mut W , } impl < 'a > _REGION94W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION94W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION94W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION94W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION95`" ] pub enum REGION95W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION95W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION95W :: DISABLED => false , REGION95W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION95W < 'a > { w : & 'a mut W , } impl < 'a > _REGION95W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION95W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION95W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION95W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect." ] # [ inline ] pub fn region64 ( & self ) -> REGION64R { REGION64R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect." ] # [ inline ] pub fn region65 ( & self ) -> REGION65R { REGION65R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect." ] # [ inline ] pub fn region66 ( & self ) -> REGION66R { REGION66R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect." ] # [ inline ] pub fn region67 ( & self ) -> REGION67R { REGION67R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect." ] # [ inline ] pub fn region68 ( & self ) -> REGION68R { REGION68R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect." ] # [ inline ] pub fn region69 ( & self ) -> REGION69R { REGION69R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect." ] # [ inline ] pub fn region70 ( & self ) -> REGION70R { REGION70R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect." ] # [ inline ] pub fn region71 ( & self ) -> REGION71R { REGION71R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect." ] # [ inline ] pub fn region72 ( & self ) -> REGION72R { REGION72R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect." ] # [ inline ] pub fn region73 ( & self ) -> REGION73R { REGION73R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect." ] # [ inline ] pub fn region74 ( & self ) -> REGION74R { REGION74R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect." ] # [ inline ] pub fn region75 ( & self ) -> REGION75R { REGION75R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect." ] # [ inline ] pub fn region76 ( & self ) -> REGION76R { REGION76R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect." ] # [ inline ] pub fn region77 ( & self ) -> REGION77R { REGION77R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect." ] # [ inline ] pub fn region78 ( & self ) -> REGION78R { REGION78R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect." ] # [ inline ] pub fn region79 ( & self ) -> REGION79R { REGION79R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect." ] # [ inline ] pub fn region80 ( & self ) -> REGION80R { REGION80R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect." ] # [ inline ] pub fn region81 ( & self ) -> REGION81R { REGION81R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect." ] # [ inline ] pub fn region82 ( & self ) -> REGION82R { REGION82R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect." ] # [ inline ] pub fn region83 ( & self ) -> REGION83R { REGION83R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect." ] # [ inline ] pub fn region84 ( & self ) -> REGION84R { REGION84R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect." ] # [ inline ] pub fn region85 ( & self ) -> REGION85R { REGION85R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect." ] # [ inline ] pub fn region86 ( & self ) -> REGION86R { REGION86R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect." ] # [ inline ] pub fn region87 ( & self ) -> REGION87R { REGION87R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect." ] # [ inline ] pub fn region88 ( & self ) -> REGION88R { REGION88R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect." ] # [ inline ] pub fn region89 ( & self ) -> REGION89R { REGION89R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect." ] # [ inline ] pub fn region90 ( & self ) -> REGION90R { REGION90R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect." ] # [ inline ] pub fn region91 ( & self ) -> REGION91R { REGION91R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect." ] # [ inline ] pub fn region92 ( & self ) -> REGION92R { REGION92R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect." ] # [ inline ] pub fn region93 ( & self ) -> REGION93R { REGION93R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect." ] # [ inline ] pub fn region94 ( & self ) -> REGION94R { REGION94R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect." ] # [ inline ] pub fn region95 ( & self ) -> REGION95R { REGION95R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect." ] # [ inline ] pub fn region64 ( & mut self ) -> _REGION64W { _REGION64W { w : self } } # [ doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect." ] # [ inline ] pub fn region65 ( & mut self ) -> _REGION65W { _REGION65W { w : self } } # [ doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect." ] # [ inline ] pub fn region66 ( & mut self ) -> _REGION66W { _REGION66W { w : self } } # [ doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect." ] # [ inline ] pub fn region67 ( & mut self ) -> _REGION67W { _REGION67W { w : self } } # [ doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect." ] # [ inline ] pub fn region68 ( & mut self ) -> _REGION68W { _REGION68W { w : self } } # [ doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect." ] # [ inline ] pub fn region69 ( & mut self ) -> _REGION69W { _REGION69W { w : self } } # [ doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect." ] # [ inline ] pub fn region70 ( & mut self ) -> _REGION70W { _REGION70W { w : self } } # [ doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect." ] # [ inline ] pub fn region71 ( & mut self ) -> _REGION71W { _REGION71W { w : self } } # [ doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect." ] # [ inline ] pub fn region72 ( & mut self ) -> _REGION72W { _REGION72W { w : self } } # [ doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect." ] # [ inline ] pub fn region73 ( & mut self ) -> _REGION73W { _REGION73W { w : self } } # [ doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect." ] # [ inline ] pub fn region74 ( & mut self ) -> _REGION74W { _REGION74W { w : self } } # [ doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect." ] # [ inline ] pub fn region75 ( & mut self ) -> _REGION75W { _REGION75W { w : self } } # [ doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect." ] # [ inline ] pub fn region76 ( & mut self ) -> _REGION76W { _REGION76W { w : self } } # [ doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect." ] # [ inline ] pub fn region77 ( & mut self ) -> _REGION77W { _REGION77W { w : self } } # [ doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect." ] # [ inline ] pub fn region78 ( & mut self ) -> _REGION78W { _REGION78W { w : self } } # [ doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect." ] # [ inline ] pub fn region79 ( & mut self ) -> _REGION79W { _REGION79W { w : self } } # [ doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect." ] # [ inline ] pub fn region80 ( & mut self ) -> _REGION80W { _REGION80W { w : self } } # [ doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect." ] # [ inline ] pub fn region81 ( & mut self ) -> _REGION81W { _REGION81W { w : self } } # [ doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect." ] # [ inline ] pub fn region82 ( & mut self ) -> _REGION82W { _REGION82W { w : self } } # [ doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect." ] # [ inline ] pub fn region83 ( & mut self ) -> _REGION83W { _REGION83W { w : self } } # [ doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect." ] # [ inline ] pub fn region84 ( & mut self ) -> _REGION84W { _REGION84W { w : self } } # [ doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect." ] # [ inline ] pub fn region85 ( & mut self ) -> _REGION85W { _REGION85W { w : self } } # [ doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect." ] # [ inline ] pub fn region86 ( & mut self ) -> _REGION86W { _REGION86W { w : self } } # [ doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect." ] # [ inline ] pub fn region87 ( & mut self ) -> _REGION87W { _REGION87W { w : self } } # [ doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect." ] # [ inline ] pub fn region88 ( & mut self ) -> _REGION88W { _REGION88W { w : self } } # [ doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect." ] # [ inline ] pub fn region89 ( & mut self ) -> _REGION89W { _REGION89W { w : self } } # [ doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect." ] # [ inline ] pub fn region90 ( & mut self ) -> _REGION90W { _REGION90W { w : self } } # [ doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect." ] # [ inline ] pub fn region91 ( & mut self ) -> _REGION91W { _REGION91W { w : self } } # [ doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect." ] # [ inline ] pub fn region92 ( & mut self ) -> _REGION92W { _REGION92W { w : self } } # [ doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect." ] # [ inline ] pub fn region93 ( & mut self ) -> _REGION93W { _REGION93W { w : self } } # [ doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect." ] # [ inline ] pub fn region94 ( & mut self ) -> _REGION94W { _REGION94W { w : self } } # [ doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect." ] # [ inline ] pub fn region95 ( & mut self ) -> _REGION95W { _REGION95W { w : self } } } } # [ doc = "Block protect configuration register 3" ] pub struct CONFIG3 { register : VolatileCell < u32 > } # [ doc = "Block protect configuration register 3" ] pub mod config3 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG3 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION96`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION96R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION96R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION96R :: DISABLED => false , REGION96R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION96R { match value { false => REGION96R :: DISABLED , true => REGION96R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION96R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION96R :: ENABLED } } # [ doc = "Possible values of the field `REGION97`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION97R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION97R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION97R :: DISABLED => false , REGION97R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION97R { match value { false => REGION97R :: DISABLED , true => REGION97R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION97R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION97R :: ENABLED } } # [ doc = "Possible values of the field `REGION98`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION98R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION98R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION98R :: DISABLED => false , REGION98R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION98R { match value { false => REGION98R :: DISABLED , true => REGION98R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION98R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION98R :: ENABLED } } # [ doc = "Possible values of the field `REGION99`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION99R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION99R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION99R :: DISABLED => false , REGION99R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION99R { match value { false => REGION99R :: DISABLED , true => REGION99R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION99R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION99R :: ENABLED } } # [ doc = "Possible values of the field `REGION100`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION100R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION100R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION100R :: DISABLED => false , REGION100R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION100R { match value { false => REGION100R :: DISABLED , true => REGION100R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION100R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION100R :: ENABLED } } # [ doc = "Possible values of the field `REGION101`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION101R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION101R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION101R :: DISABLED => false , REGION101R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION101R { match value { false => REGION101R :: DISABLED , true => REGION101R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION101R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION101R :: ENABLED } } # [ doc = "Possible values of the field `REGION102`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION102R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION102R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION102R :: DISABLED => false , REGION102R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION102R { match value { false => REGION102R :: DISABLED , true => REGION102R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION102R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION102R :: ENABLED } } # [ doc = "Possible values of the field `REGION103`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION103R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION103R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION103R :: DISABLED => false , REGION103R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION103R { match value { false => REGION103R :: DISABLED , true => REGION103R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION103R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION103R :: ENABLED } } # [ doc = "Possible values of the field `REGION104`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION104R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION104R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION104R :: DISABLED => false , REGION104R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION104R { match value { false => REGION104R :: DISABLED , true => REGION104R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION104R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION104R :: ENABLED } } # [ doc = "Possible values of the field `REGION105`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION105R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION105R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION105R :: DISABLED => false , REGION105R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION105R { match value { false => REGION105R :: DISABLED , true => REGION105R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION105R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION105R :: ENABLED } } # [ doc = "Possible values of the field `REGION106`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION106R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION106R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION106R :: DISABLED => false , REGION106R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION106R { match value { false => REGION106R :: DISABLED , true => REGION106R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION106R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION106R :: ENABLED } } # [ doc = "Possible values of the field `REGION107`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION107R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION107R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION107R :: DISABLED => false , REGION107R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION107R { match value { false => REGION107R :: DISABLED , true => REGION107R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION107R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION107R :: ENABLED } } # [ doc = "Possible values of the field `REGION108`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION108R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION108R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION108R :: DISABLED => false , REGION108R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION108R { match value { false => REGION108R :: DISABLED , true => REGION108R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION108R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION108R :: ENABLED } } # [ doc = "Possible values of the field `REGION109`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION109R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION109R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION109R :: DISABLED => false , REGION109R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION109R { match value { false => REGION109R :: DISABLED , true => REGION109R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION109R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION109R :: ENABLED } } # [ doc = "Possible values of the field `REGION110`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION110R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION110R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION110R :: DISABLED => false , REGION110R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION110R { match value { false => REGION110R :: DISABLED , true => REGION110R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION110R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION110R :: ENABLED } } # [ doc = "Possible values of the field `REGION111`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION111R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION111R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION111R :: DISABLED => false , REGION111R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION111R { match value { false => REGION111R :: DISABLED , true => REGION111R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION111R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION111R :: ENABLED } } # [ doc = "Possible values of the field `REGION112`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION112R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION112R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION112R :: DISABLED => false , REGION112R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION112R { match value { false => REGION112R :: DISABLED , true => REGION112R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION112R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION112R :: ENABLED } } # [ doc = "Possible values of the field `REGION113`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION113R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION113R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION113R :: DISABLED => false , REGION113R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION113R { match value { false => REGION113R :: DISABLED , true => REGION113R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION113R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION113R :: ENABLED } } # [ doc = "Possible values of the field `REGION114`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION114R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION114R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION114R :: DISABLED => false , REGION114R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION114R { match value { false => REGION114R :: DISABLED , true => REGION114R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION114R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION114R :: ENABLED } } # [ doc = "Possible values of the field `REGION115`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION115R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION115R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION115R :: DISABLED => false , REGION115R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION115R { match value { false => REGION115R :: DISABLED , true => REGION115R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION115R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION115R :: ENABLED } } # [ doc = "Possible values of the field `REGION116`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION116R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION116R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION116R :: DISABLED => false , REGION116R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION116R { match value { false => REGION116R :: DISABLED , true => REGION116R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION116R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION116R :: ENABLED } } # [ doc = "Possible values of the field `REGION117`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION117R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION117R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION117R :: DISABLED => false , REGION117R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION117R { match value { false => REGION117R :: DISABLED , true => REGION117R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION117R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION117R :: ENABLED } } # [ doc = "Possible values of the field `REGION118`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION118R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION118R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION118R :: DISABLED => false , REGION118R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION118R { match value { false => REGION118R :: DISABLED , true => REGION118R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION118R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION118R :: ENABLED } } # [ doc = "Possible values of the field `REGION119`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION119R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION119R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION119R :: DISABLED => false , REGION119R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION119R { match value { false => REGION119R :: DISABLED , true => REGION119R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION119R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION119R :: ENABLED } } # [ doc = "Possible values of the field `REGION120`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION120R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION120R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION120R :: DISABLED => false , REGION120R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION120R { match value { false => REGION120R :: DISABLED , true => REGION120R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION120R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION120R :: ENABLED } } # [ doc = "Possible values of the field `REGION121`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION121R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION121R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION121R :: DISABLED => false , REGION121R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION121R { match value { false => REGION121R :: DISABLED , true => REGION121R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION121R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION121R :: ENABLED } } # [ doc = "Possible values of the field `REGION122`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION122R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION122R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION122R :: DISABLED => false , REGION122R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION122R { match value { false => REGION122R :: DISABLED , true => REGION122R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION122R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION122R :: ENABLED } } # [ doc = "Possible values of the field `REGION123`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION123R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION123R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION123R :: DISABLED => false , REGION123R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION123R { match value { false => REGION123R :: DISABLED , true => REGION123R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION123R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION123R :: ENABLED } } # [ doc = "Possible values of the field `REGION124`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION124R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION124R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION124R :: DISABLED => false , REGION124R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION124R { match value { false => REGION124R :: DISABLED , true => REGION124R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION124R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION124R :: ENABLED } } # [ doc = "Possible values of the field `REGION125`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION125R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION125R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION125R :: DISABLED => false , REGION125R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION125R { match value { false => REGION125R :: DISABLED , true => REGION125R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION125R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION125R :: ENABLED } } # [ doc = "Possible values of the field `REGION126`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION126R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION126R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION126R :: DISABLED => false , REGION126R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION126R { match value { false => REGION126R :: DISABLED , true => REGION126R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION126R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION126R :: ENABLED } } # [ doc = "Possible values of the field `REGION127`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION127R { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION127R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION127R :: DISABLED => false , REGION127R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION127R { match value { false => REGION127R :: DISABLED , true => REGION127R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION127R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION127R :: ENABLED } } # [ doc = "Values that can be written to the field `REGION96`" ] pub enum REGION96W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION96W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION96W :: DISABLED => false , REGION96W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION96W < 'a > { w : & 'a mut W , } impl < 'a > _REGION96W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION96W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION96W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION96W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION97`" ] pub enum REGION97W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION97W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION97W :: DISABLED => false , REGION97W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION97W < 'a > { w : & 'a mut W , } impl < 'a > _REGION97W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION97W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION97W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION97W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION98`" ] pub enum REGION98W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION98W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION98W :: DISABLED => false , REGION98W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION98W < 'a > { w : & 'a mut W , } impl < 'a > _REGION98W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION98W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION98W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION98W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION99`" ] pub enum REGION99W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION99W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION99W :: DISABLED => false , REGION99W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION99W < 'a > { w : & 'a mut W , } impl < 'a > _REGION99W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION99W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION99W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION99W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION100`" ] pub enum REGION100W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION100W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION100W :: DISABLED => false , REGION100W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION100W < 'a > { w : & 'a mut W , } impl < 'a > _REGION100W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION100W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION100W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION100W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION101`" ] pub enum REGION101W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION101W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION101W :: DISABLED => false , REGION101W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION101W < 'a > { w : & 'a mut W , } impl < 'a > _REGION101W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION101W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION101W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION101W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION102`" ] pub enum REGION102W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION102W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION102W :: DISABLED => false , REGION102W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION102W < 'a > { w : & 'a mut W , } impl < 'a > _REGION102W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION102W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION102W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION102W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION103`" ] pub enum REGION103W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION103W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION103W :: DISABLED => false , REGION103W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION103W < 'a > { w : & 'a mut W , } impl < 'a > _REGION103W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION103W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION103W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION103W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION104`" ] pub enum REGION104W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION104W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION104W :: DISABLED => false , REGION104W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION104W < 'a > { w : & 'a mut W , } impl < 'a > _REGION104W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION104W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION104W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION104W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION105`" ] pub enum REGION105W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION105W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION105W :: DISABLED => false , REGION105W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION105W < 'a > { w : & 'a mut W , } impl < 'a > _REGION105W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION105W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION105W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION105W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION106`" ] pub enum REGION106W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION106W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION106W :: DISABLED => false , REGION106W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION106W < 'a > { w : & 'a mut W , } impl < 'a > _REGION106W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION106W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION106W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION106W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION107`" ] pub enum REGION107W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION107W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION107W :: DISABLED => false , REGION107W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION107W < 'a > { w : & 'a mut W , } impl < 'a > _REGION107W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION107W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION107W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION107W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION108`" ] pub enum REGION108W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION108W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION108W :: DISABLED => false , REGION108W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION108W < 'a > { w : & 'a mut W , } impl < 'a > _REGION108W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION108W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION108W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION108W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION109`" ] pub enum REGION109W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION109W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION109W :: DISABLED => false , REGION109W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION109W < 'a > { w : & 'a mut W , } impl < 'a > _REGION109W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION109W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION109W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION109W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION110`" ] pub enum REGION110W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION110W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION110W :: DISABLED => false , REGION110W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION110W < 'a > { w : & 'a mut W , } impl < 'a > _REGION110W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION110W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION110W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION110W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION111`" ] pub enum REGION111W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION111W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION111W :: DISABLED => false , REGION111W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION111W < 'a > { w : & 'a mut W , } impl < 'a > _REGION111W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION111W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION111W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION111W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION112`" ] pub enum REGION112W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION112W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION112W :: DISABLED => false , REGION112W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION112W < 'a > { w : & 'a mut W , } impl < 'a > _REGION112W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION112W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION112W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION112W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION113`" ] pub enum REGION113W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION113W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION113W :: DISABLED => false , REGION113W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION113W < 'a > { w : & 'a mut W , } impl < 'a > _REGION113W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION113W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION113W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION113W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION114`" ] pub enum REGION114W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION114W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION114W :: DISABLED => false , REGION114W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION114W < 'a > { w : & 'a mut W , } impl < 'a > _REGION114W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION114W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION114W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION114W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION115`" ] pub enum REGION115W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION115W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION115W :: DISABLED => false , REGION115W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION115W < 'a > { w : & 'a mut W , } impl < 'a > _REGION115W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION115W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION115W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION115W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION116`" ] pub enum REGION116W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION116W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION116W :: DISABLED => false , REGION116W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION116W < 'a > { w : & 'a mut W , } impl < 'a > _REGION116W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION116W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION116W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION116W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION117`" ] pub enum REGION117W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION117W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION117W :: DISABLED => false , REGION117W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION117W < 'a > { w : & 'a mut W , } impl < 'a > _REGION117W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION117W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION117W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION117W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION118`" ] pub enum REGION118W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION118W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION118W :: DISABLED => false , REGION118W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION118W < 'a > { w : & 'a mut W , } impl < 'a > _REGION118W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION118W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION118W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION118W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION119`" ] pub enum REGION119W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION119W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION119W :: DISABLED => false , REGION119W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION119W < 'a > { w : & 'a mut W , } impl < 'a > _REGION119W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION119W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION119W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION119W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION120`" ] pub enum REGION120W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION120W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION120W :: DISABLED => false , REGION120W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION120W < 'a > { w : & 'a mut W , } impl < 'a > _REGION120W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION120W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION120W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION120W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION121`" ] pub enum REGION121W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION121W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION121W :: DISABLED => false , REGION121W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION121W < 'a > { w : & 'a mut W , } impl < 'a > _REGION121W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION121W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION121W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION121W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION122`" ] pub enum REGION122W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION122W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION122W :: DISABLED => false , REGION122W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION122W < 'a > { w : & 'a mut W , } impl < 'a > _REGION122W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION122W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION122W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION122W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION123`" ] pub enum REGION123W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION123W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION123W :: DISABLED => false , REGION123W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION123W < 'a > { w : & 'a mut W , } impl < 'a > _REGION123W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION123W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION123W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION123W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION124`" ] pub enum REGION124W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION124W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION124W :: DISABLED => false , REGION124W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION124W < 'a > { w : & 'a mut W , } impl < 'a > _REGION124W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION124W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION124W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION124W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION125`" ] pub enum REGION125W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION125W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION125W :: DISABLED => false , REGION125W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION125W < 'a > { w : & 'a mut W , } impl < 'a > _REGION125W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION125W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION125W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION125W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION126`" ] pub enum REGION126W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION126W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION126W :: DISABLED => false , REGION126W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION126W < 'a > { w : & 'a mut W , } impl < 'a > _REGION126W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION126W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION126W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION126W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION127`" ] pub enum REGION127W { # [ doc = "Protection disabled" ] DISABLED , # [ doc = "Protection enabled" ] ENABLED } impl REGION127W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION127W :: DISABLED => false , REGION127W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION127W < 'a > { w : & 'a mut W , } impl < 'a > _REGION127W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION127W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Protection disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION127W :: DISABLED ) } # [ doc = "Protection enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION127W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect." ] # [ inline ] pub fn region96 ( & self ) -> REGION96R { REGION96R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect." ] # [ inline ] pub fn region97 ( & self ) -> REGION97R { REGION97R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect." ] # [ inline ] pub fn region98 ( & self ) -> REGION98R { REGION98R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect." ] # [ inline ] pub fn region99 ( & self ) -> REGION99R { REGION99R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect." ] # [ inline ] pub fn region100 ( & self ) -> REGION100R { REGION100R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect." ] # [ inline ] pub fn region101 ( & self ) -> REGION101R { REGION101R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect." ] # [ inline ] pub fn region102 ( & self ) -> REGION102R { REGION102R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect." ] # [ inline ] pub fn region103 ( & self ) -> REGION103R { REGION103R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect." ] # [ inline ] pub fn region104 ( & self ) -> REGION104R { REGION104R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect." ] # [ inline ] pub fn region105 ( & self ) -> REGION105R { REGION105R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect." ] # [ inline ] pub fn region106 ( & self ) -> REGION106R { REGION106R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect." ] # [ inline ] pub fn region107 ( & self ) -> REGION107R { REGION107R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect." ] # [ inline ] pub fn region108 ( & self ) -> REGION108R { REGION108R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect." ] # [ inline ] pub fn region109 ( & self ) -> REGION109R { REGION109R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect." ] # [ inline ] pub fn region110 ( & self ) -> REGION110R { REGION110R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect." ] # [ inline ] pub fn region111 ( & self ) -> REGION111R { REGION111R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect." ] # [ inline ] pub fn region112 ( & self ) -> REGION112R { REGION112R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect." ] # [ inline ] pub fn region113 ( & self ) -> REGION113R { REGION113R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect." ] # [ inline ] pub fn region114 ( & self ) -> REGION114R { REGION114R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect." ] # [ inline ] pub fn region115 ( & self ) -> REGION115R { REGION115R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect." ] # [ inline ] pub fn region116 ( & self ) -> REGION116R { REGION116R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect." ] # [ inline ] pub fn region117 ( & self ) -> REGION117R { REGION117R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect." ] # [ inline ] pub fn region118 ( & self ) -> REGION118R { REGION118R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect." ] # [ inline ] pub fn region119 ( & self ) -> REGION119R { REGION119R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect." ] # [ inline ] pub fn region120 ( & self ) -> REGION120R { REGION120R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect." ] # [ inline ] pub fn region121 ( & self ) -> REGION121R { REGION121R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect." ] # [ inline ] pub fn region122 ( & self ) -> REGION122R { REGION122R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect." ] # [ inline ] pub fn region123 ( & self ) -> REGION123R { REGION123R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect." ] # [ inline ] pub fn region124 ( & self ) -> REGION124R { REGION124R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect." ] # [ inline ] pub fn region125 ( & self ) -> REGION125R { REGION125R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect." ] # [ inline ] pub fn region126 ( & self ) -> REGION126R { REGION126R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect." ] # [ inline ] pub fn region127 ( & self ) -> REGION127R { REGION127R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect." ] # [ inline ] pub fn region96 ( & mut self ) -> _REGION96W { _REGION96W { w : self } } # [ doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect." ] # [ inline ] pub fn region97 ( & mut self ) -> _REGION97W { _REGION97W { w : self } } # [ doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect." ] # [ inline ] pub fn region98 ( & mut self ) -> _REGION98W { _REGION98W { w : self } } # [ doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect." ] # [ inline ] pub fn region99 ( & mut self ) -> _REGION99W { _REGION99W { w : self } } # [ doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect." ] # [ inline ] pub fn region100 ( & mut self ) -> _REGION100W { _REGION100W { w : self } } # [ doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect." ] # [ inline ] pub fn region101 ( & mut self ) -> _REGION101W { _REGION101W { w : self } } # [ doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect." ] # [ inline ] pub fn region102 ( & mut self ) -> _REGION102W { _REGION102W { w : self } } # [ doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect." ] # [ inline ] pub fn region103 ( & mut self ) -> _REGION103W { _REGION103W { w : self } } # [ doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect." ] # [ inline ] pub fn region104 ( & mut self ) -> _REGION104W { _REGION104W { w : self } } # [ doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect." ] # [ inline ] pub fn region105 ( & mut self ) -> _REGION105W { _REGION105W { w : self } } # [ doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect." ] # [ inline ] pub fn region106 ( & mut self ) -> _REGION106W { _REGION106W { w : self } } # [ doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect." ] # [ inline ] pub fn region107 ( & mut self ) -> _REGION107W { _REGION107W { w : self } } # [ doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect." ] # [ inline ] pub fn region108 ( & mut self ) -> _REGION108W { _REGION108W { w : self } } # [ doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect." ] # [ inline ] pub fn region109 ( & mut self ) -> _REGION109W { _REGION109W { w : self } } # [ doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect." ] # [ inline ] pub fn region110 ( & mut self ) -> _REGION110W { _REGION110W { w : self } } # [ doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect." ] # [ inline ] pub fn region111 ( & mut self ) -> _REGION111W { _REGION111W { w : self } } # [ doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect." ] # [ inline ] pub fn region112 ( & mut self ) -> _REGION112W { _REGION112W { w : self } } # [ doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect." ] # [ inline ] pub fn region113 ( & mut self ) -> _REGION113W { _REGION113W { w : self } } # [ doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect." ] # [ inline ] pub fn region114 ( & mut self ) -> _REGION114W { _REGION114W { w : self } } # [ doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect." ] # [ inline ] pub fn region115 ( & mut self ) -> _REGION115W { _REGION115W { w : self } } # [ doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect." ] # [ inline ] pub fn region116 ( & mut self ) -> _REGION116W { _REGION116W { w : self } } # [ doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect." ] # [ inline ] pub fn region117 ( & mut self ) -> _REGION117W { _REGION117W { w : self } } # [ doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect." ] # [ inline ] pub fn region118 ( & mut self ) -> _REGION118W { _REGION118W { w : self } } # [ doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect." ] # [ inline ] pub fn region119 ( & mut self ) -> _REGION119W { _REGION119W { w : self } } # [ doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect." ] # [ inline ] pub fn region120 ( & mut self ) -> _REGION120W { _REGION120W { w : self } } # [ doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect." ] # [ inline ] pub fn region121 ( & mut self ) -> _REGION121W { _REGION121W { w : self } } # [ doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect." ] # [ inline ] pub fn region122 ( & mut self ) -> _REGION122W { _REGION122W { w : self } } # [ doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect." ] # [ inline ] pub fn region123 ( & mut self ) -> _REGION123W { _REGION123W { w : self } } # [ doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect." ] # [ inline ] pub fn region124 ( & mut self ) -> _REGION124W { _REGION124W { w : self } } # [ doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect." ] # [ inline ] pub fn region125 ( & mut self ) -> _REGION125W { _REGION125W { w : self } } # [ doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect." ] # [ inline ] pub fn region126 ( & mut self ) -> _REGION126W { _REGION126W { w : self } } # [ doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect." ] # [ inline ] pub fn region127 ( & mut self ) -> _REGION127W { _REGION127W { w : self } } } } } # [ doc = "Power control" ] pub struct POWER { _marker : PhantomData < * const ( ) > } unsafe impl Send for POWER { } impl POWER { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const power :: RegisterBlock { 0x4000_0000 as * const _ } } impl Deref for POWER { type Target = power :: RegisterBlock ; fn deref ( & self ) -> & power :: RegisterBlock { unsafe { & * POWER :: ptr ( ) } } } # [ doc = "Power control" ] pub mod power { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 120usize ] , # [ doc = "0x78 - Enable constant latency mode" ] pub tasks_constlat : TASKS_CONSTLAT , # [ doc = "0x7c - Enable low power mode (variable latency)" ] pub tasks_lowpwr : TASKS_LOWPWR , _reserved1 : [ u8 ; 136usize ] , # [ doc = "0x108 - Power failure warning" ] pub events_pofwarn : EVENTS_POFWARN , _reserved2 : [ u8 ; 8usize ] , # [ doc = "0x114 - CPU entered WFI/WFE sleep" ] pub events_sleepenter : EVENTS_SLEEPENTER , # [ doc = "0x118 - CPU exited WFI/WFE sleep" ] pub events_sleepexit : EVENTS_SLEEPEXIT , _reserved3 : [ u8 ; 488usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved4 : [ u8 ; 244usize ] , # [ doc = "0x400 - Reset reason" ] pub resetreas : RESETREAS , _reserved5 : [ u8 ; 36usize ] , # [ doc = "0x428 - Deprecated register - RAM status register" ] pub ramstatus : RAMSTATUS , _reserved6 : [ u8 ; 212usize ] , # [ doc = "0x500 - System OFF register" ] pub systemoff : SYSTEMOFF , _reserved7 : [ u8 ; 12usize ] , # [ doc = "0x510 - Power failure comparator configuration" ] pub pofcon : POFCON , _reserved8 : [ u8 ; 8usize ] , # [ doc = "0x51c - General purpose retention register" ] pub gpregret : GPREGRET , # [ doc = "0x520 - General purpose retention register" ] pub gpregret2 : GPREGRET2 , # [ doc = "0x524 - Deprecated register - RAM on/off register (this register is retained)" ] pub ramon : RAMON , _reserved9 : [ u8 ; 44usize ] , # [ doc = "0x554 - Deprecated register - RAM on/off register (this register is retained)" ] pub ramonb : RAMONB , _reserved10 : [ u8 ; 32usize ] , # [ doc = "0x578 - DC/DC enable register" ] pub dcdcen : DCDCEN , } # [ doc = "Enable constant latency mode" ] pub struct TASKS_CONSTLAT { register : VolatileCell < u32 > } # [ doc = "Enable constant latency mode" ] pub mod tasks_constlat { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CONSTLAT { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable low power mode (variable latency)" ] pub struct TASKS_LOWPWR { register : VolatileCell < u32 > } # [ doc = "Enable low power mode (variable latency)" ] pub mod tasks_lowpwr { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_LOWPWR { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Power failure warning" ] pub struct EVENTS_POFWARN { register : VolatileCell < u32 > } # [ doc = "Power failure warning" ] pub mod events_pofwarn { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_POFWARN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CPU entered WFI/WFE sleep" ] pub struct EVENTS_SLEEPENTER { register : VolatileCell < u32 > } # [ doc = "CPU entered WFI/WFE sleep" ] pub mod events_sleepenter { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SLEEPENTER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CPU exited WFI/WFE sleep" ] pub struct EVENTS_SLEEPEXIT { register : VolatileCell < u32 > } # [ doc = "CPU exited WFI/WFE sleep" ] pub mod events_sleepexit { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SLEEPEXIT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `POFWARN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POFWARNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl POFWARNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { POFWARNR :: DISABLED => false , POFWARNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> POFWARNR { match value { false => POFWARNR :: DISABLED , true => POFWARNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == POFWARNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == POFWARNR :: ENABLED } } # [ doc = "Possible values of the field `SLEEPENTER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPENTERR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SLEEPENTERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SLEEPENTERR :: DISABLED => false , SLEEPENTERR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SLEEPENTERR { match value { false => SLEEPENTERR :: DISABLED , true => SLEEPENTERR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SLEEPENTERR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SLEEPENTERR :: ENABLED } } # [ doc = "Possible values of the field `SLEEPEXIT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPEXITR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SLEEPEXITR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SLEEPEXITR :: DISABLED => false , SLEEPEXITR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SLEEPEXITR { match value { false => SLEEPEXITR :: DISABLED , true => SLEEPEXITR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SLEEPEXITR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SLEEPEXITR :: ENABLED } } # [ doc = "Values that can be written to the field `POFWARN`" ] pub enum POFWARNW { # [ doc = "Enable" ] SET } impl POFWARNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { POFWARNW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _POFWARNW < 'a > { w : & 'a mut W , } impl < 'a > _POFWARNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : POFWARNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( POFWARNW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SLEEPENTER`" ] pub enum SLEEPENTERW { # [ doc = "Enable" ] SET } impl SLEEPENTERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SLEEPENTERW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SLEEPENTERW < 'a > { w : & 'a mut W , } impl < 'a > _SLEEPENTERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SLEEPENTERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SLEEPENTERW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SLEEPEXIT`" ] pub enum SLEEPEXITW { # [ doc = "Enable" ] SET } impl SLEEPEXITW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SLEEPEXITW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SLEEPEXITW < 'a > { w : & 'a mut W , } impl < 'a > _SLEEPEXITW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SLEEPEXITW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SLEEPEXITW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 2 - Write '1' to Enable interrupt for POFWARN event" ] # [ inline ] pub fn pofwarn ( & self ) -> POFWARNR { POFWARNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for SLEEPENTER event" ] # [ inline ] pub fn sleepenter ( & self ) -> SLEEPENTERR { SLEEPENTERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for SLEEPEXIT event" ] # [ inline ] pub fn sleepexit ( & self ) -> SLEEPEXITR { SLEEPEXITR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 2 - Write '1' to Enable interrupt for POFWARN event" ] # [ inline ] pub fn pofwarn ( & mut self ) -> _POFWARNW { _POFWARNW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for SLEEPENTER event" ] # [ inline ] pub fn sleepenter ( & mut self ) -> _SLEEPENTERW { _SLEEPENTERW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for SLEEPEXIT event" ] # [ inline ] pub fn sleepexit ( & mut self ) -> _SLEEPEXITW { _SLEEPEXITW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `POFWARN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POFWARNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl POFWARNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { POFWARNR :: DISABLED => false , POFWARNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> POFWARNR { match value { false => POFWARNR :: DISABLED , true => POFWARNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == POFWARNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == POFWARNR :: ENABLED } } # [ doc = "Possible values of the field `SLEEPENTER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPENTERR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SLEEPENTERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SLEEPENTERR :: DISABLED => false , SLEEPENTERR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SLEEPENTERR { match value { false => SLEEPENTERR :: DISABLED , true => SLEEPENTERR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SLEEPENTERR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SLEEPENTERR :: ENABLED } } # [ doc = "Possible values of the field `SLEEPEXIT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPEXITR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SLEEPEXITR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SLEEPEXITR :: DISABLED => false , SLEEPEXITR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SLEEPEXITR { match value { false => SLEEPEXITR :: DISABLED , true => SLEEPEXITR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SLEEPEXITR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SLEEPEXITR :: ENABLED } } # [ doc = "Values that can be written to the field `POFWARN`" ] pub enum POFWARNW { # [ doc = "Disable" ] CLEAR } impl POFWARNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { POFWARNW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _POFWARNW < 'a > { w : & 'a mut W , } impl < 'a > _POFWARNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : POFWARNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( POFWARNW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SLEEPENTER`" ] pub enum SLEEPENTERW { # [ doc = "Disable" ] CLEAR } impl SLEEPENTERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SLEEPENTERW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SLEEPENTERW < 'a > { w : & 'a mut W , } impl < 'a > _SLEEPENTERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SLEEPENTERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SLEEPENTERW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SLEEPEXIT`" ] pub enum SLEEPEXITW { # [ doc = "Disable" ] CLEAR } impl SLEEPEXITW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SLEEPEXITW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SLEEPEXITW < 'a > { w : & 'a mut W , } impl < 'a > _SLEEPEXITW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SLEEPEXITW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SLEEPEXITW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 2 - Write '1' to Disable interrupt for POFWARN event" ] # [ inline ] pub fn pofwarn ( & self ) -> POFWARNR { POFWARNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for SLEEPENTER event" ] # [ inline ] pub fn sleepenter ( & self ) -> SLEEPENTERR { SLEEPENTERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for SLEEPEXIT event" ] # [ inline ] pub fn sleepexit ( & self ) -> SLEEPEXITR { SLEEPEXITR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 2 - Write '1' to Disable interrupt for POFWARN event" ] # [ inline ] pub fn pofwarn ( & mut self ) -> _POFWARNW { _POFWARNW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for SLEEPENTER event" ] # [ inline ] pub fn sleepenter ( & mut self ) -> _SLEEPENTERW { _SLEEPENTERW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for SLEEPEXIT event" ] # [ inline ] pub fn sleepexit ( & mut self ) -> _SLEEPEXITW { _SLEEPEXITW { w : self } } } } # [ doc = "Reset reason" ] pub struct RESETREAS { register : VolatileCell < u32 > } # [ doc = "Reset reason" ] pub mod resetreas { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RESETREAS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RESETPIN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESETPINR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl RESETPINR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESETPINR :: NOTDETECTED => false , RESETPINR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESETPINR { match value { false => RESETPINR :: NOTDETECTED , true => RESETPINR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == RESETPINR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == RESETPINR :: DETECTED } } # [ doc = "Possible values of the field `DOG`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOGR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl DOGR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOGR :: NOTDETECTED => false , DOGR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOGR { match value { false => DOGR :: NOTDETECTED , true => DOGR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == DOGR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == DOGR :: DETECTED } } # [ doc = "Possible values of the field `SREQ`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SREQR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl SREQR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SREQR :: NOTDETECTED => false , SREQR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SREQR { match value { false => SREQR :: NOTDETECTED , true => SREQR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == SREQR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == SREQR :: DETECTED } } # [ doc = "Possible values of the field `LOCKUP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCKUPR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl LOCKUPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOCKUPR :: NOTDETECTED => false , LOCKUPR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOCKUPR { match value { false => LOCKUPR :: NOTDETECTED , true => LOCKUPR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == LOCKUPR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == LOCKUPR :: DETECTED } } # [ doc = "Possible values of the field `OFF`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl OFFR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OFFR :: NOTDETECTED => false , OFFR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OFFR { match value { false => OFFR :: NOTDETECTED , true => OFFR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == OFFR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == OFFR :: DETECTED } } # [ doc = "Possible values of the field `LPCOMP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LPCOMPR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl LPCOMPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LPCOMPR :: NOTDETECTED => false , LPCOMPR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LPCOMPR { match value { false => LPCOMPR :: NOTDETECTED , true => LPCOMPR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == LPCOMPR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == LPCOMPR :: DETECTED } } # [ doc = "Possible values of the field `DIF`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIFR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl DIFR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DIFR :: NOTDETECTED => false , DIFR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DIFR { match value { false => DIFR :: NOTDETECTED , true => DIFR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == DIFR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == DIFR :: DETECTED } } # [ doc = "Possible values of the field `NFC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NFCR { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl NFCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NFCR :: NOTDETECTED => false , NFCR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NFCR { match value { false => NFCR :: NOTDETECTED , true => NFCR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == NFCR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == NFCR :: DETECTED } } # [ doc = "Values that can be written to the field `RESETPIN`" ] pub enum RESETPINW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl RESETPINW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESETPINW :: NOTDETECTED => false , RESETPINW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _RESETPINW < 'a > { w : & 'a mut W , } impl < 'a > _RESETPINW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESETPINW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( RESETPINW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( RESETPINW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOG`" ] pub enum DOGW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl DOGW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOGW :: NOTDETECTED => false , DOGW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _DOGW < 'a > { w : & 'a mut W , } impl < 'a > _DOGW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOGW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( DOGW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( DOGW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SREQ`" ] pub enum SREQW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl SREQW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SREQW :: NOTDETECTED => false , SREQW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _SREQW < 'a > { w : & 'a mut W , } impl < 'a > _SREQW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SREQW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( SREQW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( SREQW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOCKUP`" ] pub enum LOCKUPW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl LOCKUPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOCKUPW :: NOTDETECTED => false , LOCKUPW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _LOCKUPW < 'a > { w : & 'a mut W , } impl < 'a > _LOCKUPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOCKUPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( LOCKUPW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( LOCKUPW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OFF`" ] pub enum OFFW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl OFFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OFFW :: NOTDETECTED => false , OFFW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _OFFW < 'a > { w : & 'a mut W , } impl < 'a > _OFFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OFFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( OFFW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( OFFW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LPCOMP`" ] pub enum LPCOMPW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl LPCOMPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LPCOMPW :: NOTDETECTED => false , LPCOMPW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _LPCOMPW < 'a > { w : & 'a mut W , } impl < 'a > _LPCOMPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LPCOMPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( LPCOMPW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( LPCOMPW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DIF`" ] pub enum DIFW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl DIFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DIFW :: NOTDETECTED => false , DIFW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _DIFW < 'a > { w : & 'a mut W , } impl < 'a > _DIFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DIFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( DIFW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( DIFW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NFC`" ] pub enum NFCW { # [ doc = "Not detected" ] NOTDETECTED , # [ doc = "Detected" ] DETECTED } impl NFCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NFCW :: NOTDETECTED => false , NFCW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _NFCW < 'a > { w : & 'a mut W , } impl < 'a > _NFCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NFCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Not detected" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( NFCW :: NOTDETECTED ) } # [ doc = "Detected" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( NFCW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Reset from pin-reset detected" ] # [ inline ] pub fn resetpin ( & self ) -> RESETPINR { RESETPINR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Reset from watchdog detected" ] # [ inline ] pub fn dog ( & self ) -> DOGR { DOGR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Reset from soft reset detected" ] # [ inline ] pub fn sreq ( & self ) -> SREQR { SREQR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Reset from CPU lock-up detected" ] # [ inline ] pub fn lockup ( & self ) -> LOCKUPR { LOCKUPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO" ] # [ inline ] pub fn off ( & self ) -> OFFR { OFFR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP" ] # [ inline ] pub fn lpcomp ( & self ) -> LPCOMPR { LPCOMPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode" ] # [ inline ] pub fn dif ( & self ) -> DIFR { DIFR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect" ] # [ inline ] pub fn nfc ( & self ) -> NFCR { NFCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Reset from pin-reset detected" ] # [ inline ] pub fn resetpin ( & mut self ) -> _RESETPINW { _RESETPINW { w : self } } # [ doc = "Bit 1 - Reset from watchdog detected" ] # [ inline ] pub fn dog ( & mut self ) -> _DOGW { _DOGW { w : self } } # [ doc = "Bit 2 - Reset from soft reset detected" ] # [ inline ] pub fn sreq ( & mut self ) -> _SREQW { _SREQW { w : self } } # [ doc = "Bit 3 - Reset from CPU lock-up detected" ] # [ inline ] pub fn lockup ( & mut self ) -> _LOCKUPW { _LOCKUPW { w : self } } # [ doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO" ] # [ inline ] pub fn off ( & mut self ) -> _OFFW { _OFFW { w : self } } # [ doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP" ] # [ inline ] pub fn lpcomp ( & mut self ) -> _LPCOMPW { _LPCOMPW { w : self } } # [ doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode" ] # [ inline ] pub fn dif ( & mut self ) -> _DIFW { _DIFW { w : self } } # [ doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect" ] # [ inline ] pub fn nfc ( & mut self ) -> _NFCW { _NFCW { w : self } } } } # [ doc = "Deprecated register - RAM status register" ] pub struct RAMSTATUS { register : VolatileCell < u32 > } # [ doc = "Deprecated register - RAM status register" ] pub mod ramstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RAMSTATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `RAMBLOCK0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMBLOCK0R { # [ doc = "Off" ] OFF , # [ doc = "On" ] ON } impl RAMBLOCK0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RAMBLOCK0R :: OFF => false , RAMBLOCK0R :: ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RAMBLOCK0R { match value { false => RAMBLOCK0R :: OFF , true => RAMBLOCK0R :: ON , } } # [ doc = "Checks if the value of the field is `OFF`" ] # [ inline ] pub fn is_off ( & self ) -> bool { * self == RAMBLOCK0R :: OFF } # [ doc = "Checks if the value of the field is `ON`" ] # [ inline ] pub fn is_on ( & self ) -> bool { * self == RAMBLOCK0R :: ON } } # [ doc = "Possible values of the field `RAMBLOCK1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMBLOCK1R { # [ doc = "Off" ] OFF , # [ doc = "On" ] ON } impl RAMBLOCK1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RAMBLOCK1R :: OFF => false , RAMBLOCK1R :: ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RAMBLOCK1R { match value { false => RAMBLOCK1R :: OFF , true => RAMBLOCK1R :: ON , } } # [ doc = "Checks if the value of the field is `OFF`" ] # [ inline ] pub fn is_off ( & self ) -> bool { * self == RAMBLOCK1R :: OFF } # [ doc = "Checks if the value of the field is `ON`" ] # [ inline ] pub fn is_on ( & self ) -> bool { * self == RAMBLOCK1R :: ON } } # [ doc = "Possible values of the field `RAMBLOCK2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMBLOCK2R { # [ doc = "Off" ] OFF , # [ doc = "On" ] ON } impl RAMBLOCK2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RAMBLOCK2R :: OFF => false , RAMBLOCK2R :: ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RAMBLOCK2R { match value { false => RAMBLOCK2R :: OFF , true => RAMBLOCK2R :: ON , } } # [ doc = "Checks if the value of the field is `OFF`" ] # [ inline ] pub fn is_off ( & self ) -> bool { * self == RAMBLOCK2R :: OFF } # [ doc = "Checks if the value of the field is `ON`" ] # [ inline ] pub fn is_on ( & self ) -> bool { * self == RAMBLOCK2R :: ON } } # [ doc = "Possible values of the field `RAMBLOCK3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RAMBLOCK3R { # [ doc = "Off" ] OFF , # [ doc = "On" ] ON } impl RAMBLOCK3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RAMBLOCK3R :: OFF => false , RAMBLOCK3R :: ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RAMBLOCK3R { match value { false => RAMBLOCK3R :: OFF , true => RAMBLOCK3R :: ON , } } # [ doc = "Checks if the value of the field is `OFF`" ] # [ inline ] pub fn is_off ( & self ) -> bool { * self == RAMBLOCK3R :: OFF } # [ doc = "Checks if the value of the field is `ON`" ] # [ inline ] pub fn is_on ( & self ) -> bool { * self == RAMBLOCK3R :: ON } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - RAM block 0 is on or off/powering up" ] # [ inline ] pub fn ramblock0 ( & self ) -> RAMBLOCK0R { RAMBLOCK0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - RAM block 1 is on or off/powering up" ] # [ inline ] pub fn ramblock1 ( & self ) -> RAMBLOCK1R { RAMBLOCK1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - RAM block 2 is on or off/powering up" ] # [ inline ] pub fn ramblock2 ( & self ) -> RAMBLOCK2R { RAMBLOCK2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - RAM block 3 is on or off/powering up" ] # [ inline ] pub fn ramblock3 ( & self ) -> RAMBLOCK3R { RAMBLOCK3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "System OFF register" ] pub struct SYSTEMOFF { register : VolatileCell < u32 > } # [ doc = "System OFF register" ] pub mod systemoff { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SYSTEMOFF { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } # [ doc = "Values that can be written to the field `SYSTEMOFF`" ] pub enum SYSTEMOFFW { # [ doc = "Enable System OFF mode" ] ENTER } impl SYSTEMOFFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SYSTEMOFFW :: ENTER => true } } } # [ doc = r" Proxy" ] pub struct _SYSTEMOFFW < 'a > { w : & 'a mut W , } impl < 'a > _SYSTEMOFFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SYSTEMOFFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable System OFF mode" ] # [ inline ] pub fn enter ( self ) -> & 'a mut W { self . variant ( SYSTEMOFFW :: ENTER ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable System OFF mode" ] # [ inline ] pub fn systemoff ( & mut self ) -> _SYSTEMOFFW { _SYSTEMOFFW { w : self } } } } # [ doc = "Power failure comparator configuration" ] pub struct POFCON { register : VolatileCell < u32 > } # [ doc = "Power failure comparator configuration" ] pub mod pofcon { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: POFCON { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `POF`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POFR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl POFR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { POFR :: DISABLED => false , POFR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> POFR { match value { false => POFR :: DISABLED , true => POFR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == POFR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == POFR :: ENABLED } } # [ doc = "Possible values of the field `THRESHOLD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum THRESHOLDR { # [ doc = "Set threshold to 1.7 V" ] V17 , # [ doc = "Set threshold to 1.8 V" ] V18 , # [ doc = "Set threshold to 1.9 V" ] V19 , # [ doc = "Set threshold to 2.0 V" ] V20 , # [ doc = "Set threshold to 2.1 V" ] V21 , # [ doc = "Set threshold to 2.2 V" ] V22 , # [ doc = "Set threshold to 2.3 V" ] V23 , # [ doc = "Set threshold to 2.4 V" ] V24 , # [ doc = "Set threshold to 2.5 V" ] V25 , # [ doc = "Set threshold to 2.6 V" ] V26 , # [ doc = "Set threshold to 2.7 V" ] V27 , # [ doc = "Set threshold to 2.8 V" ] V28 , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl THRESHOLDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { THRESHOLDR :: V17 => 0x04 , THRESHOLDR :: V18 => 0x05 , THRESHOLDR :: V19 => 0x06 , THRESHOLDR :: V20 => 0x07 , THRESHOLDR :: V21 => 0x08 , THRESHOLDR :: V22 => 0x09 , THRESHOLDR :: V23 => 0x0a , THRESHOLDR :: V24 => 0x0b , THRESHOLDR :: V25 => 0x0c , THRESHOLDR :: V26 => 0x0d , THRESHOLDR :: V27 => 0x0e , THRESHOLDR :: V28 => 0x0f , THRESHOLDR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> THRESHOLDR { match value { 4 => THRESHOLDR :: V17 , 5 => THRESHOLDR :: V18 , 6 => THRESHOLDR :: V19 , 7 => THRESHOLDR :: V20 , 8 => THRESHOLDR :: V21 , 9 => THRESHOLDR :: V22 , 10 => THRESHOLDR :: V23 , 11 => THRESHOLDR :: V24 , 12 => THRESHOLDR :: V25 , 13 => THRESHOLDR :: V26 , 14 => THRESHOLDR :: V27 , 15 => THRESHOLDR :: V28 , i => THRESHOLDR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `V17`" ] # [ inline ] pub fn is_v17 ( & self ) -> bool { * self == THRESHOLDR :: V17 } # [ doc = "Checks if the value of the field is `V18`" ] # [ inline ] pub fn is_v18 ( & self ) -> bool { * self == THRESHOLDR :: V18 } # [ doc = "Checks if the value of the field is `V19`" ] # [ inline ] pub fn is_v19 ( & self ) -> bool { * self == THRESHOLDR :: V19 } # [ doc = "Checks if the value of the field is `V20`" ] # [ inline ] pub fn is_v20 ( & self ) -> bool { * self == THRESHOLDR :: V20 } # [ doc = "Checks if the value of the field is `V21`" ] # [ inline ] pub fn is_v21 ( & self ) -> bool { * self == THRESHOLDR :: V21 } # [ doc = "Checks if the value of the field is `V22`" ] # [ inline ] pub fn is_v22 ( & self ) -> bool { * self == THRESHOLDR :: V22 } # [ doc = "Checks if the value of the field is `V23`" ] # [ inline ] pub fn is_v23 ( & self ) -> bool { * self == THRESHOLDR :: V23 } # [ doc = "Checks if the value of the field is `V24`" ] # [ inline ] pub fn is_v24 ( & self ) -> bool { * self == THRESHOLDR :: V24 } # [ doc = "Checks if the value of the field is `V25`" ] # [ inline ] pub fn is_v25 ( & self ) -> bool { * self == THRESHOLDR :: V25 } # [ doc = "Checks if the value of the field is `V26`" ] # [ inline ] pub fn is_v26 ( & self ) -> bool { * self == THRESHOLDR :: V26 } # [ doc = "Checks if the value of the field is `V27`" ] # [ inline ] pub fn is_v27 ( & self ) -> bool { * self == THRESHOLDR :: V27 } # [ doc = "Checks if the value of the field is `V28`" ] # [ inline ] pub fn is_v28 ( & self ) -> bool { * self == THRESHOLDR :: V28 } } # [ doc = "Values that can be written to the field `POF`" ] pub enum POFW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl POFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { POFW :: DISABLED => false , POFW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _POFW < 'a > { w : & 'a mut W , } impl < 'a > _POFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : POFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( POFW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( POFW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `THRESHOLD`" ] pub enum THRESHOLDW { # [ doc = "Set threshold to 1.7 V" ] V17 , # [ doc = "Set threshold to 1.8 V" ] V18 , # [ doc = "Set threshold to 1.9 V" ] V19 , # [ doc = "Set threshold to 2.0 V" ] V20 , # [ doc = "Set threshold to 2.1 V" ] V21 , # [ doc = "Set threshold to 2.2 V" ] V22 , # [ doc = "Set threshold to 2.3 V" ] V23 , # [ doc = "Set threshold to 2.4 V" ] V24 , # [ doc = "Set threshold to 2.5 V" ] V25 , # [ doc = "Set threshold to 2.6 V" ] V26 , # [ doc = "Set threshold to 2.7 V" ] V27 , # [ doc = "Set threshold to 2.8 V" ] V28 } impl THRESHOLDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { THRESHOLDW :: V17 => 4 , THRESHOLDW :: V18 => 5 , THRESHOLDW :: V19 => 6 , THRESHOLDW :: V20 => 7 , THRESHOLDW :: V21 => 8 , THRESHOLDW :: V22 => 9 , THRESHOLDW :: V23 => 10 , THRESHOLDW :: V24 => 11 , THRESHOLDW :: V25 => 12 , THRESHOLDW :: V26 => 13 , THRESHOLDW :: V27 => 14 , THRESHOLDW :: V28 => 15 } } } # [ doc = r" Proxy" ] pub struct _THRESHOLDW < 'a > { w : & 'a mut W , } impl < 'a > _THRESHOLDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : THRESHOLDW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Set threshold to 1.7 V" ] # [ inline ] pub fn v17 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V17 ) } # [ doc = "Set threshold to 1.8 V" ] # [ inline ] pub fn v18 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V18 ) } # [ doc = "Set threshold to 1.9 V" ] # [ inline ] pub fn v19 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V19 ) } # [ doc = "Set threshold to 2.0 V" ] # [ inline ] pub fn v20 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V20 ) } # [ doc = "Set threshold to 2.1 V" ] # [ inline ] pub fn v21 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V21 ) } # [ doc = "Set threshold to 2.2 V" ] # [ inline ] pub fn v22 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V22 ) } # [ doc = "Set threshold to 2.3 V" ] # [ inline ] pub fn v23 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V23 ) } # [ doc = "Set threshold to 2.4 V" ] # [ inline ] pub fn v24 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V24 ) } # [ doc = "Set threshold to 2.5 V" ] # [ inline ] pub fn v25 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V25 ) } # [ doc = "Set threshold to 2.6 V" ] # [ inline ] pub fn v26 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V26 ) } # [ doc = "Set threshold to 2.7 V" ] # [ inline ] pub fn v27 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V27 ) } # [ doc = "Set threshold to 2.8 V" ] # [ inline ] pub fn v28 ( self ) -> & 'a mut W { self . variant ( THRESHOLDW :: V28 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable power failure comparator" ] # [ inline ] pub fn pof ( & self ) -> POFR { POFR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 1:4 - Power failure comparator threshold setting" ] # [ inline ] pub fn threshold ( & self ) -> THRESHOLDR { THRESHOLDR :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable power failure comparator" ] # [ inline ] pub fn pof ( & mut self ) -> _POFW { _POFW { w : self } } # [ doc = "Bits 1:4 - Power failure comparator threshold setting" ] # [ inline ] pub fn threshold ( & mut self ) -> _THRESHOLDW { _THRESHOLDW { w : self } } } } # [ doc = "General purpose retention register" ] pub struct GPREGRET { register : VolatileCell < u32 > } # [ doc = "General purpose retention register" ] pub mod gpregret { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: GPREGRET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct GPREGRETR { bits : u8 , } impl GPREGRETR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _GPREGRETW < 'a > { w : & 'a mut W , } impl < 'a > _GPREGRETW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - General purpose retention register" ] # [ inline ] pub fn gpregret ( & self ) -> GPREGRETR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; GPREGRETR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - General purpose retention register" ] # [ inline ] pub fn gpregret ( & mut self ) -> _GPREGRETW { _GPREGRETW { w : self } } } } # [ doc = "General purpose retention register" ] pub struct GPREGRET2 { register : VolatileCell < u32 > } # [ doc = "General purpose retention register" ] pub mod gpregret2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: GPREGRET2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct GPREGRETR { bits : u8 , } impl GPREGRETR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _GPREGRETW < 'a > { w : & 'a mut W , } impl < 'a > _GPREGRETW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - General purpose retention register" ] # [ inline ] pub fn gpregret ( & self ) -> GPREGRETR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; GPREGRETR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - General purpose retention register" ] # [ inline ] pub fn gpregret ( & mut self ) -> _GPREGRETW { _GPREGRETW { w : self } } } } # [ doc = "Deprecated register - RAM on/off register (this register is retained)" ] pub struct RAMON { register : VolatileCell < u32 > } # [ doc = "Deprecated register - RAM on/off register (this register is retained)" ] pub mod ramon { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RAMON { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ONRAM0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONRAM0R { # [ doc = "Off" ] RAM0OFF , # [ doc = "On" ] RAM0ON } impl ONRAM0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ONRAM0R :: RAM0OFF => false , ONRAM0R :: RAM0ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ONRAM0R { match value { false => ONRAM0R :: RAM0OFF , true => ONRAM0R :: RAM0ON , } } # [ doc = "Checks if the value of the field is `RAM0OFF`" ] # [ inline ] pub fn is_ram0off ( & self ) -> bool { * self == ONRAM0R :: RAM0OFF } # [ doc = "Checks if the value of the field is `RAM0ON`" ] # [ inline ] pub fn is_ram0on ( & self ) -> bool { * self == ONRAM0R :: RAM0ON } } # [ doc = "Possible values of the field `ONRAM1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONRAM1R { # [ doc = "Off" ] RAM1OFF , # [ doc = "On" ] RAM1ON } impl ONRAM1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ONRAM1R :: RAM1OFF => false , ONRAM1R :: RAM1ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ONRAM1R { match value { false => ONRAM1R :: RAM1OFF , true => ONRAM1R :: RAM1ON , } } # [ doc = "Checks if the value of the field is `RAM1OFF`" ] # [ inline ] pub fn is_ram1off ( & self ) -> bool { * self == ONRAM1R :: RAM1OFF } # [ doc = "Checks if the value of the field is `RAM1ON`" ] # [ inline ] pub fn is_ram1on ( & self ) -> bool { * self == ONRAM1R :: RAM1ON } } # [ doc = "Possible values of the field `OFFRAM0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFRAM0R { # [ doc = "Off" ] RAM0OFF , # [ doc = "On" ] RAM0ON } impl OFFRAM0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OFFRAM0R :: RAM0OFF => false , OFFRAM0R :: RAM0ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OFFRAM0R { match value { false => OFFRAM0R :: RAM0OFF , true => OFFRAM0R :: RAM0ON , } } # [ doc = "Checks if the value of the field is `RAM0OFF`" ] # [ inline ] pub fn is_ram0off ( & self ) -> bool { * self == OFFRAM0R :: RAM0OFF } # [ doc = "Checks if the value of the field is `RAM0ON`" ] # [ inline ] pub fn is_ram0on ( & self ) -> bool { * self == OFFRAM0R :: RAM0ON } } # [ doc = "Possible values of the field `OFFRAM1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFRAM1R { # [ doc = "Off" ] RAM1OFF , # [ doc = "On" ] RAM1ON } impl OFFRAM1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OFFRAM1R :: RAM1OFF => false , OFFRAM1R :: RAM1ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OFFRAM1R { match value { false => OFFRAM1R :: RAM1OFF , true => OFFRAM1R :: RAM1ON , } } # [ doc = "Checks if the value of the field is `RAM1OFF`" ] # [ inline ] pub fn is_ram1off ( & self ) -> bool { * self == OFFRAM1R :: RAM1OFF } # [ doc = "Checks if the value of the field is `RAM1ON`" ] # [ inline ] pub fn is_ram1on ( & self ) -> bool { * self == OFFRAM1R :: RAM1ON } } # [ doc = "Values that can be written to the field `ONRAM0`" ] pub enum ONRAM0W { # [ doc = "Off" ] RAM0OFF , # [ doc = "On" ] RAM0ON } impl ONRAM0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ONRAM0W :: RAM0OFF => false , ONRAM0W :: RAM0ON => true } } } # [ doc = r" Proxy" ] pub struct _ONRAM0W < 'a > { w : & 'a mut W , } impl < 'a > _ONRAM0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ONRAM0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram0off ( self ) -> & 'a mut W { self . variant ( ONRAM0W :: RAM0OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram0on ( self ) -> & 'a mut W { self . variant ( ONRAM0W :: RAM0ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ONRAM1`" ] pub enum ONRAM1W { # [ doc = "Off" ] RAM1OFF , # [ doc = "On" ] RAM1ON } impl ONRAM1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ONRAM1W :: RAM1OFF => false , ONRAM1W :: RAM1ON => true } } } # [ doc = r" Proxy" ] pub struct _ONRAM1W < 'a > { w : & 'a mut W , } impl < 'a > _ONRAM1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ONRAM1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram1off ( self ) -> & 'a mut W { self . variant ( ONRAM1W :: RAM1OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram1on ( self ) -> & 'a mut W { self . variant ( ONRAM1W :: RAM1ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OFFRAM0`" ] pub enum OFFRAM0W { # [ doc = "Off" ] RAM0OFF , # [ doc = "On" ] RAM0ON } impl OFFRAM0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OFFRAM0W :: RAM0OFF => false , OFFRAM0W :: RAM0ON => true } } } # [ doc = r" Proxy" ] pub struct _OFFRAM0W < 'a > { w : & 'a mut W , } impl < 'a > _OFFRAM0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OFFRAM0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram0off ( self ) -> & 'a mut W { self . variant ( OFFRAM0W :: RAM0OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram0on ( self ) -> & 'a mut W { self . variant ( OFFRAM0W :: RAM0ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OFFRAM1`" ] pub enum OFFRAM1W { # [ doc = "Off" ] RAM1OFF , # [ doc = "On" ] RAM1ON } impl OFFRAM1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OFFRAM1W :: RAM1OFF => false , OFFRAM1W :: RAM1ON => true } } } # [ doc = r" Proxy" ] pub struct _OFFRAM1W < 'a > { w : & 'a mut W , } impl < 'a > _OFFRAM1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OFFRAM1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram1off ( self ) -> & 'a mut W { self . variant ( OFFRAM1W :: RAM1OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram1on ( self ) -> & 'a mut W { self . variant ( OFFRAM1W :: RAM1ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode" ] # [ inline ] pub fn onram0 ( & self ) -> ONRAM0R { ONRAM0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode" ] # [ inline ] pub fn onram1 ( & self ) -> ONRAM1R { ONRAM1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off" ] # [ inline ] pub fn offram0 ( & self ) -> OFFRAM0R { OFFRAM0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off" ] # [ inline ] pub fn offram1 ( & self ) -> OFFRAM1R { OFFRAM1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x03 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode" ] # [ inline ] pub fn onram0 ( & mut self ) -> _ONRAM0W { _ONRAM0W { w : self } } # [ doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode" ] # [ inline ] pub fn onram1 ( & mut self ) -> _ONRAM1W { _ONRAM1W { w : self } } # [ doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off" ] # [ inline ] pub fn offram0 ( & mut self ) -> _OFFRAM0W { _OFFRAM0W { w : self } } # [ doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off" ] # [ inline ] pub fn offram1 ( & mut self ) -> _OFFRAM1W { _OFFRAM1W { w : self } } } } # [ doc = "Deprecated register - RAM on/off register (this register is retained)" ] pub struct RAMONB { register : VolatileCell < u32 > } # [ doc = "Deprecated register - RAM on/off register (this register is retained)" ] pub mod ramonb { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RAMONB { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ONRAM2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONRAM2R { # [ doc = "Off" ] RAM2OFF , # [ doc = "On" ] RAM2ON } impl ONRAM2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ONRAM2R :: RAM2OFF => false , ONRAM2R :: RAM2ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ONRAM2R { match value { false => ONRAM2R :: RAM2OFF , true => ONRAM2R :: RAM2ON , } } # [ doc = "Checks if the value of the field is `RAM2OFF`" ] # [ inline ] pub fn is_ram2off ( & self ) -> bool { * self == ONRAM2R :: RAM2OFF } # [ doc = "Checks if the value of the field is `RAM2ON`" ] # [ inline ] pub fn is_ram2on ( & self ) -> bool { * self == ONRAM2R :: RAM2ON } } # [ doc = "Possible values of the field `ONRAM3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ONRAM3R { # [ doc = "Off" ] RAM3OFF , # [ doc = "On" ] RAM3ON } impl ONRAM3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ONRAM3R :: RAM3OFF => false , ONRAM3R :: RAM3ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ONRAM3R { match value { false => ONRAM3R :: RAM3OFF , true => ONRAM3R :: RAM3ON , } } # [ doc = "Checks if the value of the field is `RAM3OFF`" ] # [ inline ] pub fn is_ram3off ( & self ) -> bool { * self == ONRAM3R :: RAM3OFF } # [ doc = "Checks if the value of the field is `RAM3ON`" ] # [ inline ] pub fn is_ram3on ( & self ) -> bool { * self == ONRAM3R :: RAM3ON } } # [ doc = "Possible values of the field `OFFRAM2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFRAM2R { # [ doc = "Off" ] RAM2OFF , # [ doc = "On" ] RAM2ON } impl OFFRAM2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OFFRAM2R :: RAM2OFF => false , OFFRAM2R :: RAM2ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OFFRAM2R { match value { false => OFFRAM2R :: RAM2OFF , true => OFFRAM2R :: RAM2ON , } } # [ doc = "Checks if the value of the field is `RAM2OFF`" ] # [ inline ] pub fn is_ram2off ( & self ) -> bool { * self == OFFRAM2R :: RAM2OFF } # [ doc = "Checks if the value of the field is `RAM2ON`" ] # [ inline ] pub fn is_ram2on ( & self ) -> bool { * self == OFFRAM2R :: RAM2ON } } # [ doc = "Possible values of the field `OFFRAM3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OFFRAM3R { # [ doc = "Off" ] RAM3OFF , # [ doc = "On" ] RAM3ON } impl OFFRAM3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OFFRAM3R :: RAM3OFF => false , OFFRAM3R :: RAM3ON => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OFFRAM3R { match value { false => OFFRAM3R :: RAM3OFF , true => OFFRAM3R :: RAM3ON , } } # [ doc = "Checks if the value of the field is `RAM3OFF`" ] # [ inline ] pub fn is_ram3off ( & self ) -> bool { * self == OFFRAM3R :: RAM3OFF } # [ doc = "Checks if the value of the field is `RAM3ON`" ] # [ inline ] pub fn is_ram3on ( & self ) -> bool { * self == OFFRAM3R :: RAM3ON } } # [ doc = "Values that can be written to the field `ONRAM2`" ] pub enum ONRAM2W { # [ doc = "Off" ] RAM2OFF , # [ doc = "On" ] RAM2ON } impl ONRAM2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ONRAM2W :: RAM2OFF => false , ONRAM2W :: RAM2ON => true } } } # [ doc = r" Proxy" ] pub struct _ONRAM2W < 'a > { w : & 'a mut W , } impl < 'a > _ONRAM2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ONRAM2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram2off ( self ) -> & 'a mut W { self . variant ( ONRAM2W :: RAM2OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram2on ( self ) -> & 'a mut W { self . variant ( ONRAM2W :: RAM2ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ONRAM3`" ] pub enum ONRAM3W { # [ doc = "Off" ] RAM3OFF , # [ doc = "On" ] RAM3ON } impl ONRAM3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ONRAM3W :: RAM3OFF => false , ONRAM3W :: RAM3ON => true } } } # [ doc = r" Proxy" ] pub struct _ONRAM3W < 'a > { w : & 'a mut W , } impl < 'a > _ONRAM3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ONRAM3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram3off ( self ) -> & 'a mut W { self . variant ( ONRAM3W :: RAM3OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram3on ( self ) -> & 'a mut W { self . variant ( ONRAM3W :: RAM3ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OFFRAM2`" ] pub enum OFFRAM2W { # [ doc = "Off" ] RAM2OFF , # [ doc = "On" ] RAM2ON } impl OFFRAM2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OFFRAM2W :: RAM2OFF => false , OFFRAM2W :: RAM2ON => true } } } # [ doc = r" Proxy" ] pub struct _OFFRAM2W < 'a > { w : & 'a mut W , } impl < 'a > _OFFRAM2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OFFRAM2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram2off ( self ) -> & 'a mut W { self . variant ( OFFRAM2W :: RAM2OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram2on ( self ) -> & 'a mut W { self . variant ( OFFRAM2W :: RAM2ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OFFRAM3`" ] pub enum OFFRAM3W { # [ doc = "Off" ] RAM3OFF , # [ doc = "On" ] RAM3ON } impl OFFRAM3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OFFRAM3W :: RAM3OFF => false , OFFRAM3W :: RAM3ON => true } } } # [ doc = r" Proxy" ] pub struct _OFFRAM3W < 'a > { w : & 'a mut W , } impl < 'a > _OFFRAM3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OFFRAM3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Off" ] # [ inline ] pub fn ram3off ( self ) -> & 'a mut W { self . variant ( OFFRAM3W :: RAM3OFF ) } # [ doc = "On" ] # [ inline ] pub fn ram3on ( self ) -> & 'a mut W { self . variant ( OFFRAM3W :: RAM3ON ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode" ] # [ inline ] pub fn onram2 ( & self ) -> ONRAM2R { ONRAM2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode" ] # [ inline ] pub fn onram3 ( & self ) -> ONRAM3R { ONRAM3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off" ] # [ inline ] pub fn offram2 ( & self ) -> OFFRAM2R { OFFRAM2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off" ] # [ inline ] pub fn offram3 ( & self ) -> OFFRAM3R { OFFRAM3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x03 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode" ] # [ inline ] pub fn onram2 ( & mut self ) -> _ONRAM2W { _ONRAM2W { w : self } } # [ doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode" ] # [ inline ] pub fn onram3 ( & mut self ) -> _ONRAM3W { _ONRAM3W { w : self } } # [ doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off" ] # [ inline ] pub fn offram2 ( & mut self ) -> _OFFRAM2W { _OFFRAM2W { w : self } } # [ doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off" ] # [ inline ] pub fn offram3 ( & mut self ) -> _OFFRAM3W { _OFFRAM3W { w : self } } } } # [ doc = "DC/DC enable register" ] pub struct DCDCEN { register : VolatileCell < u32 > } # [ doc = "DC/DC enable register" ] pub mod dcdcen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DCDCEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DCDCEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DCDCENR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DCDCENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DCDCENR :: DISABLED => false , DCDCENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DCDCENR { match value { false => DCDCENR :: DISABLED , true => DCDCENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DCDCENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DCDCENR :: ENABLED } } # [ doc = "Values that can be written to the field `DCDCEN`" ] pub enum DCDCENW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DCDCENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DCDCENW :: DISABLED => false , DCDCENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DCDCENW < 'a > { w : & 'a mut W , } impl < 'a > _DCDCENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DCDCENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DCDCENW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DCDCENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable DC/DC converter" ] # [ inline ] pub fn dcdcen ( & self ) -> DCDCENR { DCDCENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable DC/DC converter" ] # [ inline ] pub fn dcdcen ( & mut self ) -> _DCDCENW { _DCDCENW { w : self } } } } } # [ doc = "Clock control" ] pub struct CLOCK { _marker : PhantomData < * const ( ) > } unsafe impl Send for CLOCK { } impl CLOCK { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const clock :: RegisterBlock { 0x4000_0000 as * const _ } } impl Deref for CLOCK { type Target = clock :: RegisterBlock ; fn deref ( & self ) -> & clock :: RegisterBlock { unsafe { & * CLOCK :: ptr ( ) } } } # [ doc = "Clock control" ] pub mod clock { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start HFCLK crystal oscillator" ] pub tasks_hfclkstart : TASKS_HFCLKSTART , # [ doc = "0x04 - Stop HFCLK crystal oscillator" ] pub tasks_hfclkstop : TASKS_HFCLKSTOP , # [ doc = "0x08 - Start LFCLK source" ] pub tasks_lfclkstart : TASKS_LFCLKSTART , # [ doc = "0x0c - Stop LFCLK source" ] pub tasks_lfclkstop : TASKS_LFCLKSTOP , # [ doc = "0x10 - Start calibration of LFRC oscillator" ] pub tasks_cal : TASKS_CAL , # [ doc = "0x14 - Start calibration timer" ] pub tasks_ctstart : TASKS_CTSTART , # [ doc = "0x18 - Stop calibration timer" ] pub tasks_ctstop : TASKS_CTSTOP , _reserved0 : [ u8 ; 228usize ] , # [ doc = "0x100 - HFCLK oscillator started" ] pub events_hfclkstarted : EVENTS_HFCLKSTARTED , # [ doc = "0x104 - LFCLK started" ] pub events_lfclkstarted : EVENTS_LFCLKSTARTED , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x10c - Calibration of LFCLK RC oscillator complete event" ] pub events_done : EVENTS_DONE , # [ doc = "0x110 - Calibration timer timeout" ] pub events_ctto : EVENTS_CTTO , _reserved2 : [ u8 ; 496usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 252usize ] , # [ doc = "0x408 - Status indicating that HFCLKSTART task has been triggered" ] pub hfclkrun : HFCLKRUN , # [ doc = "0x40c - HFCLK status" ] pub hfclkstat : HFCLKSTAT , _reserved4 : [ u8 ; 4usize ] , # [ doc = "0x414 - Status indicating that LFCLKSTART task has been triggered" ] pub lfclkrun : LFCLKRUN , # [ doc = "0x418 - LFCLK status" ] pub lfclkstat : LFCLKSTAT , # [ doc = "0x41c - Copy of LFCLKSRC register, set when LFCLKSTART task was triggered" ] pub lfclksrccopy : LFCLKSRCCOPY , _reserved5 : [ u8 ; 248usize ] , # [ doc = "0x518 - Clock source for the LFCLK" ] pub lfclksrc : LFCLKSRC , _reserved6 : [ u8 ; 28usize ] , # [ doc = "0x538 - Calibration timer interval" ] pub ctiv : CTIV , _reserved7 : [ u8 ; 32usize ] , # [ doc = "0x55c - Clocking options for the Trace Port debug interface" ] pub traceconfig : TRACECONFIG , } # [ doc = "Start HFCLK crystal oscillator" ] pub struct TASKS_HFCLKSTART { register : VolatileCell < u32 > } # [ doc = "Start HFCLK crystal oscillator" ] pub mod tasks_hfclkstart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_HFCLKSTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop HFCLK crystal oscillator" ] pub struct TASKS_HFCLKSTOP { register : VolatileCell < u32 > } # [ doc = "Stop HFCLK crystal oscillator" ] pub mod tasks_hfclkstop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_HFCLKSTOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start LFCLK source" ] pub struct TASKS_LFCLKSTART { register : VolatileCell < u32 > } # [ doc = "Start LFCLK source" ] pub mod tasks_lfclkstart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_LFCLKSTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop LFCLK source" ] pub struct TASKS_LFCLKSTOP { register : VolatileCell < u32 > } # [ doc = "Stop LFCLK source" ] pub mod tasks_lfclkstop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_LFCLKSTOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start calibration of LFRC oscillator" ] pub struct TASKS_CAL { register : VolatileCell < u32 > } # [ doc = "Start calibration of LFRC oscillator" ] pub mod tasks_cal { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CAL { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start calibration timer" ] pub struct TASKS_CTSTART { register : VolatileCell < u32 > } # [ doc = "Start calibration timer" ] pub mod tasks_ctstart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CTSTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop calibration timer" ] pub struct TASKS_CTSTOP { register : VolatileCell < u32 > } # [ doc = "Stop calibration timer" ] pub mod tasks_ctstop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CTSTOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "HFCLK oscillator started" ] pub struct EVENTS_HFCLKSTARTED { register : VolatileCell < u32 > } # [ doc = "HFCLK oscillator started" ] pub mod events_hfclkstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_HFCLKSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "LFCLK started" ] pub struct EVENTS_LFCLKSTARTED { register : VolatileCell < u32 > } # [ doc = "LFCLK started" ] pub mod events_lfclkstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_LFCLKSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Calibration of LFCLK RC oscillator complete event" ] pub struct EVENTS_DONE { register : VolatileCell < u32 > } # [ doc = "Calibration of LFCLK RC oscillator complete event" ] pub mod events_done { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DONE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Calibration timer timeout" ] pub struct EVENTS_CTTO { register : VolatileCell < u32 > } # [ doc = "Calibration timer timeout" ] pub mod events_ctto { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CTTO { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HFCLKSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HFCLKSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl HFCLKSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HFCLKSTARTEDR :: DISABLED => false , HFCLKSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HFCLKSTARTEDR { match value { false => HFCLKSTARTEDR :: DISABLED , true => HFCLKSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == HFCLKSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == HFCLKSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `LFCLKSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LFCLKSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LFCLKSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LFCLKSTARTEDR :: DISABLED => false , LFCLKSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LFCLKSTARTEDR { match value { false => LFCLKSTARTEDR :: DISABLED , true => LFCLKSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LFCLKSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LFCLKSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `DONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DONER :: DISABLED => false , DONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DONER { match value { false => DONER :: DISABLED , true => DONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DONER :: ENABLED } } # [ doc = "Possible values of the field `CTTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTTOR :: DISABLED => false , CTTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTTOR { match value { false => CTTOR :: DISABLED , true => CTTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTTOR :: ENABLED } } # [ doc = "Values that can be written to the field `HFCLKSTARTED`" ] pub enum HFCLKSTARTEDW { # [ doc = "Enable" ] SET } impl HFCLKSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HFCLKSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _HFCLKSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _HFCLKSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HFCLKSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( HFCLKSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LFCLKSTARTED`" ] pub enum LFCLKSTARTEDW { # [ doc = "Enable" ] SET } impl LFCLKSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LFCLKSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _LFCLKSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _LFCLKSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LFCLKSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( LFCLKSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DONE`" ] pub enum DONEW { # [ doc = "Enable" ] SET } impl DONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DONEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DONEW < 'a > { w : & 'a mut W , } impl < 'a > _DONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DONEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CTTO`" ] pub enum CTTOW { # [ doc = "Enable" ] SET } impl CTTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTTOW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CTTOW < 'a > { w : & 'a mut W , } impl < 'a > _CTTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CTTOW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for HFCLKSTARTED event" ] # [ inline ] pub fn hfclkstarted ( & self ) -> HFCLKSTARTEDR { HFCLKSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for LFCLKSTARTED event" ] # [ inline ] pub fn lfclkstarted ( & self ) -> LFCLKSTARTEDR { LFCLKSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for DONE event" ] # [ inline ] pub fn done ( & self ) -> DONER { DONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for CTTO event" ] # [ inline ] pub fn ctto ( & self ) -> CTTOR { CTTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for HFCLKSTARTED event" ] # [ inline ] pub fn hfclkstarted ( & mut self ) -> _HFCLKSTARTEDW { _HFCLKSTARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for LFCLKSTARTED event" ] # [ inline ] pub fn lfclkstarted ( & mut self ) -> _LFCLKSTARTEDW { _LFCLKSTARTEDW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for DONE event" ] # [ inline ] pub fn done ( & mut self ) -> _DONEW { _DONEW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for CTTO event" ] # [ inline ] pub fn ctto ( & mut self ) -> _CTTOW { _CTTOW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HFCLKSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HFCLKSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl HFCLKSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HFCLKSTARTEDR :: DISABLED => false , HFCLKSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HFCLKSTARTEDR { match value { false => HFCLKSTARTEDR :: DISABLED , true => HFCLKSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == HFCLKSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == HFCLKSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `LFCLKSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LFCLKSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LFCLKSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LFCLKSTARTEDR :: DISABLED => false , LFCLKSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LFCLKSTARTEDR { match value { false => LFCLKSTARTEDR :: DISABLED , true => LFCLKSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LFCLKSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LFCLKSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `DONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DONER :: DISABLED => false , DONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DONER { match value { false => DONER :: DISABLED , true => DONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DONER :: ENABLED } } # [ doc = "Possible values of the field `CTTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTTOR :: DISABLED => false , CTTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTTOR { match value { false => CTTOR :: DISABLED , true => CTTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTTOR :: ENABLED } } # [ doc = "Values that can be written to the field `HFCLKSTARTED`" ] pub enum HFCLKSTARTEDW { # [ doc = "Disable" ] CLEAR } impl HFCLKSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HFCLKSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _HFCLKSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _HFCLKSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HFCLKSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( HFCLKSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LFCLKSTARTED`" ] pub enum LFCLKSTARTEDW { # [ doc = "Disable" ] CLEAR } impl LFCLKSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LFCLKSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _LFCLKSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _LFCLKSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LFCLKSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( LFCLKSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DONE`" ] pub enum DONEW { # [ doc = "Disable" ] CLEAR } impl DONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DONEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DONEW < 'a > { w : & 'a mut W , } impl < 'a > _DONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DONEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CTTO`" ] pub enum CTTOW { # [ doc = "Disable" ] CLEAR } impl CTTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTTOW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CTTOW < 'a > { w : & 'a mut W , } impl < 'a > _CTTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CTTOW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for HFCLKSTARTED event" ] # [ inline ] pub fn hfclkstarted ( & self ) -> HFCLKSTARTEDR { HFCLKSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for LFCLKSTARTED event" ] # [ inline ] pub fn lfclkstarted ( & self ) -> LFCLKSTARTEDR { LFCLKSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for DONE event" ] # [ inline ] pub fn done ( & self ) -> DONER { DONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for CTTO event" ] # [ inline ] pub fn ctto ( & self ) -> CTTOR { CTTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for HFCLKSTARTED event" ] # [ inline ] pub fn hfclkstarted ( & mut self ) -> _HFCLKSTARTEDW { _HFCLKSTARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for LFCLKSTARTED event" ] # [ inline ] pub fn lfclkstarted ( & mut self ) -> _LFCLKSTARTEDW { _LFCLKSTARTEDW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for DONE event" ] # [ inline ] pub fn done ( & mut self ) -> _DONEW { _DONEW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for CTTO event" ] # [ inline ] pub fn ctto ( & mut self ) -> _CTTOW { _CTTOW { w : self } } } } # [ doc = "Status indicating that HFCLKSTART task has been triggered" ] pub struct HFCLKRUN { register : VolatileCell < u32 > } # [ doc = "Status indicating that HFCLKSTART task has been triggered" ] pub mod hfclkrun { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: HFCLKRUN { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `STATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATUSR { # [ doc = "Task not triggered" ] NOTTRIGGERED , # [ doc = "Task triggered" ] TRIGGERED } impl STATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STATUSR :: NOTTRIGGERED => false , STATUSR :: TRIGGERED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STATUSR { match value { false => STATUSR :: NOTTRIGGERED , true => STATUSR :: TRIGGERED , } } # [ doc = "Checks if the value of the field is `NOTTRIGGERED`" ] # [ inline ] pub fn is_not_triggered ( & self ) -> bool { * self == STATUSR :: NOTTRIGGERED } # [ doc = "Checks if the value of the field is `TRIGGERED`" ] # [ inline ] pub fn is_triggered ( & self ) -> bool { * self == STATUSR :: TRIGGERED } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - HFCLKSTART task triggered or not" ] # [ inline ] pub fn status ( & self ) -> STATUSR { STATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "HFCLK status" ] pub struct HFCLKSTAT { register : VolatileCell < u32 > } # [ doc = "HFCLK status" ] pub mod hfclkstat { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: HFCLKSTAT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `SRC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRCR { # [ doc = "64 MHz internal oscillator (HFINT)" ] RC , # [ doc = "64 MHz crystal oscillator (HFXO)" ] XTAL } impl SRCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SRCR :: RC => false , SRCR :: XTAL => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SRCR { match value { false => SRCR :: RC , true => SRCR :: XTAL , } } # [ doc = "Checks if the value of the field is `RC`" ] # [ inline ] pub fn is_rc ( & self ) -> bool { * self == SRCR :: RC } # [ doc = "Checks if the value of the field is `XTAL`" ] # [ inline ] pub fn is_xtal ( & self ) -> bool { * self == SRCR :: XTAL } } # [ doc = "Possible values of the field `STATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATER { # [ doc = "HFCLK not running" ] NOTRUNNING , # [ doc = "HFCLK running" ] RUNNING } impl STATER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STATER :: NOTRUNNING => false , STATER :: RUNNING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STATER { match value { false => STATER :: NOTRUNNING , true => STATER :: RUNNING , } } # [ doc = "Checks if the value of the field is `NOTRUNNING`" ] # [ inline ] pub fn is_not_running ( & self ) -> bool { * self == STATER :: NOTRUNNING } # [ doc = "Checks if the value of the field is `RUNNING`" ] # [ inline ] pub fn is_running ( & self ) -> bool { * self == STATER :: RUNNING } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Source of HFCLK" ] # [ inline ] pub fn src ( & self ) -> SRCR { SRCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - HFCLK state" ] # [ inline ] pub fn state ( & self ) -> STATER { STATER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Status indicating that LFCLKSTART task has been triggered" ] pub struct LFCLKRUN { register : VolatileCell < u32 > } # [ doc = "Status indicating that LFCLKSTART task has been triggered" ] pub mod lfclkrun { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: LFCLKRUN { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `STATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATUSR { # [ doc = "Task not triggered" ] NOTTRIGGERED , # [ doc = "Task triggered" ] TRIGGERED } impl STATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STATUSR :: NOTTRIGGERED => false , STATUSR :: TRIGGERED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STATUSR { match value { false => STATUSR :: NOTTRIGGERED , true => STATUSR :: TRIGGERED , } } # [ doc = "Checks if the value of the field is `NOTTRIGGERED`" ] # [ inline ] pub fn is_not_triggered ( & self ) -> bool { * self == STATUSR :: NOTTRIGGERED } # [ doc = "Checks if the value of the field is `TRIGGERED`" ] # [ inline ] pub fn is_triggered ( & self ) -> bool { * self == STATUSR :: TRIGGERED } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - LFCLKSTART task triggered or not" ] # [ inline ] pub fn status ( & self ) -> STATUSR { STATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "LFCLK status" ] pub struct LFCLKSTAT { register : VolatileCell < u32 > } # [ doc = "LFCLK status" ] pub mod lfclkstat { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: LFCLKSTAT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `SRC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRCR { # [ doc = "32.768 kHz RC oscillator" ] RC , # [ doc = "32.768 kHz crystal oscillator" ] XTAL , # [ doc = "32.768 kHz synthesized from HFCLK" ] SYNTH , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SRCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SRCR :: RC => 0 , SRCR :: XTAL => 0x01 , SRCR :: SYNTH => 0x02 , SRCR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SRCR { match value { 0 => SRCR :: RC , 1 => SRCR :: XTAL , 2 => SRCR :: SYNTH , i => SRCR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `RC`" ] # [ inline ] pub fn is_rc ( & self ) -> bool { * self == SRCR :: RC } # [ doc = "Checks if the value of the field is `XTAL`" ] # [ inline ] pub fn is_xtal ( & self ) -> bool { * self == SRCR :: XTAL } # [ doc = "Checks if the value of the field is `SYNTH`" ] # [ inline ] pub fn is_synth ( & self ) -> bool { * self == SRCR :: SYNTH } } # [ doc = "Possible values of the field `STATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATER { # [ doc = "LFCLK not running" ] NOTRUNNING , # [ doc = "LFCLK running" ] RUNNING } impl STATER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STATER :: NOTRUNNING => false , STATER :: RUNNING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STATER { match value { false => STATER :: NOTRUNNING , true => STATER :: RUNNING , } } # [ doc = "Checks if the value of the field is `NOTRUNNING`" ] # [ inline ] pub fn is_not_running ( & self ) -> bool { * self == STATER :: NOTRUNNING } # [ doc = "Checks if the value of the field is `RUNNING`" ] # [ inline ] pub fn is_running ( & self ) -> bool { * self == STATER :: RUNNING } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Source of LFCLK" ] # [ inline ] pub fn src ( & self ) -> SRCR { SRCR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 16 - LFCLK state" ] # [ inline ] pub fn state ( & self ) -> STATER { STATER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered" ] pub struct LFCLKSRCCOPY { register : VolatileCell < u32 > } # [ doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered" ] pub mod lfclksrccopy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: LFCLKSRCCOPY { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `SRC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRCR { # [ doc = "32.768 kHz RC oscillator" ] RC , # [ doc = "32.768 kHz crystal oscillator" ] XTAL , # [ doc = "32.768 kHz synthesized from HFCLK" ] SYNTH , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SRCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SRCR :: RC => 0 , SRCR :: XTAL => 0x01 , SRCR :: SYNTH => 0x02 , SRCR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SRCR { match value { 0 => SRCR :: RC , 1 => SRCR :: XTAL , 2 => SRCR :: SYNTH , i => SRCR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `RC`" ] # [ inline ] pub fn is_rc ( & self ) -> bool { * self == SRCR :: RC } # [ doc = "Checks if the value of the field is `XTAL`" ] # [ inline ] pub fn is_xtal ( & self ) -> bool { * self == SRCR :: XTAL } # [ doc = "Checks if the value of the field is `SYNTH`" ] # [ inline ] pub fn is_synth ( & self ) -> bool { * self == SRCR :: SYNTH } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Clock source" ] # [ inline ] pub fn src ( & self ) -> SRCR { SRCR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } } # [ doc = "Clock source for the LFCLK" ] pub struct LFCLKSRC { register : VolatileCell < u32 > } # [ doc = "Clock source for the LFCLK" ] pub mod lfclksrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: LFCLKSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SRC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SRCR { # [ doc = "32.768 kHz RC oscillator" ] RC , # [ doc = "32.768 kHz crystal oscillator" ] XTAL , # [ doc = "32.768 kHz synthesized from HFCLK" ] SYNTH , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SRCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SRCR :: RC => 0 , SRCR :: XTAL => 0x01 , SRCR :: SYNTH => 0x02 , SRCR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SRCR { match value { 0 => SRCR :: RC , 1 => SRCR :: XTAL , 2 => SRCR :: SYNTH , i => SRCR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `RC`" ] # [ inline ] pub fn is_rc ( & self ) -> bool { * self == SRCR :: RC } # [ doc = "Checks if the value of the field is `XTAL`" ] # [ inline ] pub fn is_xtal ( & self ) -> bool { * self == SRCR :: XTAL } # [ doc = "Checks if the value of the field is `SYNTH`" ] # [ inline ] pub fn is_synth ( & self ) -> bool { * self == SRCR :: SYNTH } } # [ doc = "Possible values of the field `BYPASS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BYPASSR { # [ doc = "Disable (use with Xtal or low-swing external source)" ] DISABLED , # [ doc = "Enable (use with rail-to-rail external source)" ] ENABLED } impl BYPASSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BYPASSR :: DISABLED => false , BYPASSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BYPASSR { match value { false => BYPASSR :: DISABLED , true => BYPASSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BYPASSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BYPASSR :: ENABLED } } # [ doc = "Possible values of the field `EXTERNAL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTERNALR { # [ doc = "Disable external source (use with Xtal)" ] DISABLED , # [ doc = "Enable use of external source instead of Xtal (SRC needs to be set to Xtal)" ] ENABLED } impl EXTERNALR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { EXTERNALR :: DISABLED => false , EXTERNALR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> EXTERNALR { match value { false => EXTERNALR :: DISABLED , true => EXTERNALR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == EXTERNALR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == EXTERNALR :: ENABLED } } # [ doc = "Values that can be written to the field `SRC`" ] pub enum SRCW { # [ doc = "32.768 kHz RC oscillator" ] RC , # [ doc = "32.768 kHz crystal oscillator" ] XTAL , # [ doc = "32.768 kHz synthesized from HFCLK" ] SYNTH } impl SRCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { SRCW :: RC => 0 , SRCW :: XTAL => 1 , SRCW :: SYNTH => 2 } } } # [ doc = r" Proxy" ] pub struct _SRCW < 'a > { w : & 'a mut W , } impl < 'a > _SRCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SRCW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "32.768 kHz RC oscillator" ] # [ inline ] pub fn rc ( self ) -> & 'a mut W { self . variant ( SRCW :: RC ) } # [ doc = "32.768 kHz crystal oscillator" ] # [ inline ] pub fn xtal ( self ) -> & 'a mut W { self . variant ( SRCW :: XTAL ) } # [ doc = "32.768 kHz synthesized from HFCLK" ] # [ inline ] pub fn synth ( self ) -> & 'a mut W { self . variant ( SRCW :: SYNTH ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BYPASS`" ] pub enum BYPASSW { # [ doc = "Disable (use with Xtal or low-swing external source)" ] DISABLED , # [ doc = "Enable (use with rail-to-rail external source)" ] ENABLED } impl BYPASSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BYPASSW :: DISABLED => false , BYPASSW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _BYPASSW < 'a > { w : & 'a mut W , } impl < 'a > _BYPASSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BYPASSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable (use with Xtal or low-swing external source)" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( BYPASSW :: DISABLED ) } # [ doc = "Enable (use with rail-to-rail external source)" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( BYPASSW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `EXTERNAL`" ] pub enum EXTERNALW { # [ doc = "Disable external source (use with Xtal)" ] DISABLED , # [ doc = "Enable use of external source instead of Xtal (SRC needs to be set to Xtal)" ] ENABLED } impl EXTERNALW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { EXTERNALW :: DISABLED => false , EXTERNALW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _EXTERNALW < 'a > { w : & 'a mut W , } impl < 'a > _EXTERNALW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : EXTERNALW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable external source (use with Xtal)" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( EXTERNALW :: DISABLED ) } # [ doc = "Enable use of external source instead of Xtal (SRC needs to be set to Xtal)" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( EXTERNALW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Clock source" ] # [ inline ] pub fn src ( & self ) -> SRCR { SRCR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source" ] # [ inline ] pub fn bypass ( & self ) -> BYPASSR { BYPASSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable or disable external source for LFCLK" ] # [ inline ] pub fn external ( & self ) -> EXTERNALR { EXTERNALR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Clock source" ] # [ inline ] pub fn src ( & mut self ) -> _SRCW { _SRCW { w : self } } # [ doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source" ] # [ inline ] pub fn bypass ( & mut self ) -> _BYPASSW { _BYPASSW { w : self } } # [ doc = "Bit 17 - Enable or disable external source for LFCLK" ] # [ inline ] pub fn external ( & mut self ) -> _EXTERNALW { _EXTERNALW { w : self } } } } # [ doc = "Calibration timer interval" ] pub struct CTIV { register : VolatileCell < u32 > } # [ doc = "Calibration timer interval" ] pub mod ctiv { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CTIV { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CTIVR { bits : u8 , } impl CTIVR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _CTIVW < 'a > { w : & 'a mut W , } impl < 'a > _CTIVW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds." ] # [ inline ] pub fn ctiv ( & self ) -> CTIVR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; CTIVR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds." ] # [ inline ] pub fn ctiv ( & mut self ) -> _CTIVW { _CTIVW { w : self } } } } # [ doc = "Clocking options for the Trace Port debug interface" ] pub struct TRACECONFIG { register : VolatileCell < u32 > } # [ doc = "Clocking options for the Trace Port debug interface" ] pub mod traceconfig { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TRACECONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TRACEPORTSPEED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRACEPORTSPEEDR { # [ doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)" ] _32MHZ , # [ doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)" ] _16MHZ , # [ doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)" ] _8MHZ , # [ doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)" ] _4MHZ } impl TRACEPORTSPEEDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { TRACEPORTSPEEDR :: _32MHZ => 0 , TRACEPORTSPEEDR :: _16MHZ => 0x01 , TRACEPORTSPEEDR :: _8MHZ => 0x02 , TRACEPORTSPEEDR :: _4MHZ => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> TRACEPORTSPEEDR { match value { 0 => TRACEPORTSPEEDR :: _32MHZ , 1 => TRACEPORTSPEEDR :: _16MHZ , 2 => TRACEPORTSPEEDR :: _8MHZ , 3 => TRACEPORTSPEEDR :: _4MHZ , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `_32MHZ`" ] # [ inline ] pub fn is_32mhz ( & self ) -> bool { * self == TRACEPORTSPEEDR :: _32MHZ } # [ doc = "Checks if the value of the field is `_16MHZ`" ] # [ inline ] pub fn is_16mhz ( & self ) -> bool { * self == TRACEPORTSPEEDR :: _16MHZ } # [ doc = "Checks if the value of the field is `_8MHZ`" ] # [ inline ] pub fn is_8mhz ( & self ) -> bool { * self == TRACEPORTSPEEDR :: _8MHZ } # [ doc = "Checks if the value of the field is `_4MHZ`" ] # [ inline ] pub fn is_4mhz ( & self ) -> bool { * self == TRACEPORTSPEEDR :: _4MHZ } } # [ doc = "Possible values of the field `TRACEMUX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRACEMUXR { # [ doc = "GPIOs multiplexed onto all trace-pins" ] GPIO , # [ doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins" ] SERIAL , # [ doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14." ] PARALLEL , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl TRACEMUXR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { TRACEMUXR :: GPIO => 0 , TRACEMUXR :: SERIAL => 0x01 , TRACEMUXR :: PARALLEL => 0x02 , TRACEMUXR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> TRACEMUXR { match value { 0 => TRACEMUXR :: GPIO , 1 => TRACEMUXR :: SERIAL , 2 => TRACEMUXR :: PARALLEL , i => TRACEMUXR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `GPIO`" ] # [ inline ] pub fn is_gpio ( & self ) -> bool { * self == TRACEMUXR :: GPIO } # [ doc = "Checks if the value of the field is `SERIAL`" ] # [ inline ] pub fn is_serial ( & self ) -> bool { * self == TRACEMUXR :: SERIAL } # [ doc = "Checks if the value of the field is `PARALLEL`" ] # [ inline ] pub fn is_parallel ( & self ) -> bool { * self == TRACEMUXR :: PARALLEL } } # [ doc = "Values that can be written to the field `TRACEPORTSPEED`" ] pub enum TRACEPORTSPEEDW { # [ doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)" ] _32MHZ , # [ doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)" ] _16MHZ , # [ doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)" ] _8MHZ , # [ doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)" ] _4MHZ } impl TRACEPORTSPEEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { TRACEPORTSPEEDW :: _32MHZ => 0 , TRACEPORTSPEEDW :: _16MHZ => 1 , TRACEPORTSPEEDW :: _8MHZ => 2 , TRACEPORTSPEEDW :: _4MHZ => 3 } } } # [ doc = r" Proxy" ] pub struct _TRACEPORTSPEEDW < 'a > { w : & 'a mut W , } impl < 'a > _TRACEPORTSPEEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRACEPORTSPEEDW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)" ] # [ inline ] pub fn _32mhz ( self ) -> & 'a mut W { self . variant ( TRACEPORTSPEEDW :: _32MHZ ) } # [ doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)" ] # [ inline ] pub fn _16mhz ( self ) -> & 'a mut W { self . variant ( TRACEPORTSPEEDW :: _16MHZ ) } # [ doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)" ] # [ inline ] pub fn _8mhz ( self ) -> & 'a mut W { self . variant ( TRACEPORTSPEEDW :: _8MHZ ) } # [ doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)" ] # [ inline ] pub fn _4mhz ( self ) -> & 'a mut W { self . variant ( TRACEPORTSPEEDW :: _4MHZ ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRACEMUX`" ] pub enum TRACEMUXW { # [ doc = "GPIOs multiplexed onto all trace-pins" ] GPIO , # [ doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins" ] SERIAL , # [ doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14." ] PARALLEL } impl TRACEMUXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { TRACEMUXW :: GPIO => 0 , TRACEMUXW :: SERIAL => 1 , TRACEMUXW :: PARALLEL => 2 } } } # [ doc = r" Proxy" ] pub struct _TRACEMUXW < 'a > { w : & 'a mut W , } impl < 'a > _TRACEMUXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRACEMUXW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "GPIOs multiplexed onto all trace-pins" ] # [ inline ] pub fn gpio ( self ) -> & 'a mut W { self . variant ( TRACEMUXW :: GPIO ) } # [ doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins" ] # [ inline ] pub fn serial ( self ) -> & 'a mut W { self . variant ( TRACEMUXW :: SERIAL ) } # [ doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14." ] # [ inline ] pub fn parallel ( self ) -> & 'a mut W { self . variant ( TRACEMUXW :: PARALLEL ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two." ] # [ inline ] pub fn traceportspeed ( & self ) -> TRACEPORTSPEEDR { TRACEPORTSPEEDR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bits 16:17 - Pin multiplexing of trace signals." ] # [ inline ] pub fn tracemux ( & self ) -> TRACEMUXR { TRACEMUXR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two." ] # [ inline ] pub fn traceportspeed ( & mut self ) -> _TRACEPORTSPEEDW { _TRACEPORTSPEEDW { w : self } } # [ doc = "Bits 16:17 - Pin multiplexing of trace signals." ] # [ inline ] pub fn tracemux ( & mut self ) -> _TRACEMUXW { _TRACEMUXW { w : self } } } } } # [ doc = "2.4 GHz Radio" ] pub struct RADIO { _marker : PhantomData < * const ( ) > } unsafe impl Send for RADIO { } impl RADIO { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const radio :: RegisterBlock { 0x4000_1000 as * const _ } } impl Deref for RADIO { type Target = radio :: RegisterBlock ; fn deref ( & self ) -> & radio :: RegisterBlock { unsafe { & * RADIO :: ptr ( ) } } } # [ doc = "2.4 GHz Radio" ] pub mod radio { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Enable RADIO in TX mode" ] pub tasks_txen : TASKS_TXEN , # [ doc = "0x04 - Enable RADIO in RX mode" ] pub tasks_rxen : TASKS_RXEN , # [ doc = "0x08 - Start RADIO" ] pub tasks_start : TASKS_START , # [ doc = "0x0c - Stop RADIO" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x10 - Disable RADIO" ] pub tasks_disable : TASKS_DISABLE , # [ doc = "0x14 - Start the RSSI and take one single sample of the receive signal strength." ] pub tasks_rssistart : TASKS_RSSISTART , # [ doc = "0x18 - Stop the RSSI measurement" ] pub tasks_rssistop : TASKS_RSSISTOP , # [ doc = "0x1c - Start the bit counter" ] pub tasks_bcstart : TASKS_BCSTART , # [ doc = "0x20 - Stop the bit counter" ] pub tasks_bcstop : TASKS_BCSTOP , _reserved0 : [ u8 ; 220usize ] , # [ doc = "0x100 - RADIO has ramped up and is ready to be started" ] pub events_ready : EVENTS_READY , # [ doc = "0x104 - Address sent or received" ] pub events_address : EVENTS_ADDRESS , # [ doc = "0x108 - Packet payload sent or received" ] pub events_payload : EVENTS_PAYLOAD , # [ doc = "0x10c - Packet sent or received" ] pub events_end : EVENTS_END , # [ doc = "0x110 - RADIO has been disabled" ] pub events_disabled : EVENTS_DISABLED , # [ doc = "0x114 - A device address match occurred on the last received packet" ] pub events_devmatch : EVENTS_DEVMATCH , # [ doc = "0x118 - No device address match occurred on the last received packet" ] pub events_devmiss : EVENTS_DEVMISS , # [ doc = "0x11c - Sampling of receive signal strength complete." ] pub events_rssiend : EVENTS_RSSIEND , _reserved1 : [ u8 ; 8usize ] , # [ doc = "0x128 - Bit counter reached bit count value." ] pub events_bcmatch : EVENTS_BCMATCH , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x130 - Packet received with CRC ok" ] pub events_crcok : EVENTS_CRCOK , # [ doc = "0x134 - Packet received with CRC error" ] pub events_crcerror : EVENTS_CRCERROR , _reserved3 : [ u8 ; 200usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved4 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved5 : [ u8 ; 244usize ] , # [ doc = "0x400 - CRC status" ] pub crcstatus : CRCSTATUS , _reserved6 : [ u8 ; 4usize ] , # [ doc = "0x408 - Received address" ] pub rxmatch : RXMATCH , # [ doc = "0x40c - CRC field of previously received packet" ] pub rxcrc : RXCRC , # [ doc = "0x410 - Device address match index" ] pub dai : DAI , _reserved7 : [ u8 ; 240usize ] , # [ doc = "0x504 - Packet pointer" ] pub packetptr : PACKETPTR , # [ doc = "0x508 - Frequency" ] pub frequency : FREQUENCY , # [ doc = "0x50c - Output power" ] pub txpower : TXPOWER , # [ doc = "0x510 - Data rate and modulation" ] pub mode : MODE , # [ doc = "0x514 - Packet configuration register 0" ] pub pcnf0 : PCNF0 , # [ doc = "0x518 - Packet configuration register 1" ] pub pcnf1 : PCNF1 , # [ doc = "0x51c - Base address 0" ] pub base0 : BASE0 , # [ doc = "0x520 - Base address 1" ] pub base1 : BASE1 , # [ doc = "0x524 - Prefixes bytes for logical addresses 0-3" ] pub prefix0 : PREFIX0 , # [ doc = "0x528 - Prefixes bytes for logical addresses 4-7" ] pub prefix1 : PREFIX1 , # [ doc = "0x52c - Transmit address select" ] pub txaddress : TXADDRESS , # [ doc = "0x530 - Receive address select" ] pub rxaddresses : RXADDRESSES , # [ doc = "0x534 - CRC configuration" ] pub crccnf : CRCCNF , # [ doc = "0x538 - CRC polynomial" ] pub crcpoly : CRCPOLY , # [ doc = "0x53c - CRC initial value" ] pub crcinit : CRCINIT , # [ doc = "0x540 - Unspecified" ] pub unused0 : UNUSED0 , # [ doc = "0x544 - Inter Frame Spacing in us" ] pub tifs : TIFS , # [ doc = "0x548 - RSSI sample" ] pub rssisample : RSSISAMPLE , _reserved8 : [ u8 ; 4usize ] , # [ doc = "0x550 - Current radio state" ] pub state : STATE , # [ doc = "0x554 - Data whitening initial value" ] pub datawhiteiv : DATAWHITEIV , _reserved9 : [ u8 ; 8usize ] , # [ doc = "0x560 - Bit counter compare" ] pub bcc : BCC , _reserved10 : [ u8 ; 156usize ] , # [ doc = "0x600 - Description collection[0]: Device address base segment 0" ] pub dab : [ DAB ; 8 ] , # [ doc = "0x620 - Description collection[0]: Device address prefix 0" ] pub dap : [ DAP ; 8 ] , # [ doc = "0x640 - Device address match configuration" ] pub dacnf : DACNF , _reserved11 : [ u8 ; 12usize ] , # [ doc = "0x650 - Radio mode configuration register 0" ] pub modecnf0 : MODECNF0 , _reserved12 : [ u8 ; 2472usize ] , # [ doc = "0xffc - Peripheral power control" ] pub power : POWER , } # [ doc = "Enable RADIO in TX mode" ] pub struct TASKS_TXEN { register : VolatileCell < u32 > } # [ doc = "Enable RADIO in TX mode" ] pub mod tasks_txen { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_TXEN { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable RADIO in RX mode" ] pub struct TASKS_RXEN { register : VolatileCell < u32 > } # [ doc = "Enable RADIO in RX mode" ] pub mod tasks_rxen { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RXEN { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start RADIO" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start RADIO" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop RADIO" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop RADIO" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Disable RADIO" ] pub struct TASKS_DISABLE { register : VolatileCell < u32 > } # [ doc = "Disable RADIO" ] pub mod tasks_disable { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_DISABLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start the RSSI and take one single sample of the receive signal strength." ] pub struct TASKS_RSSISTART { register : VolatileCell < u32 > } # [ doc = "Start the RSSI and take one single sample of the receive signal strength." ] pub mod tasks_rssistart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RSSISTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop the RSSI measurement" ] pub struct TASKS_RSSISTOP { register : VolatileCell < u32 > } # [ doc = "Stop the RSSI measurement" ] pub mod tasks_rssistop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RSSISTOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start the bit counter" ] pub struct TASKS_BCSTART { register : VolatileCell < u32 > } # [ doc = "Start the bit counter" ] pub mod tasks_bcstart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_BCSTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop the bit counter" ] pub struct TASKS_BCSTOP { register : VolatileCell < u32 > } # [ doc = "Stop the bit counter" ] pub mod tasks_bcstop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_BCSTOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "RADIO has ramped up and is ready to be started" ] pub struct EVENTS_READY { register : VolatileCell < u32 > } # [ doc = "RADIO has ramped up and is ready to be started" ] pub mod events_ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Address sent or received" ] pub struct EVENTS_ADDRESS { register : VolatileCell < u32 > } # [ doc = "Address sent or received" ] pub mod events_address { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ADDRESS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Packet payload sent or received" ] pub struct EVENTS_PAYLOAD { register : VolatileCell < u32 > } # [ doc = "Packet payload sent or received" ] pub mod events_payload { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_PAYLOAD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Packet sent or received" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "Packet sent or received" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "RADIO has been disabled" ] pub struct EVENTS_DISABLED { register : VolatileCell < u32 > } # [ doc = "RADIO has been disabled" ] pub mod events_disabled { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DISABLED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "A device address match occurred on the last received packet" ] pub struct EVENTS_DEVMATCH { register : VolatileCell < u32 > } # [ doc = "A device address match occurred on the last received packet" ] pub mod events_devmatch { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DEVMATCH { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "No device address match occurred on the last received packet" ] pub struct EVENTS_DEVMISS { register : VolatileCell < u32 > } # [ doc = "No device address match occurred on the last received packet" ] pub mod events_devmiss { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DEVMISS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Sampling of receive signal strength complete." ] pub struct EVENTS_RSSIEND { register : VolatileCell < u32 > } # [ doc = "Sampling of receive signal strength complete." ] pub mod events_rssiend { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RSSIEND { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Bit counter reached bit count value." ] pub struct EVENTS_BCMATCH { register : VolatileCell < u32 > } # [ doc = "Bit counter reached bit count value." ] pub mod events_bcmatch { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_BCMATCH { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Packet received with CRC ok" ] pub struct EVENTS_CRCOK { register : VolatileCell < u32 > } # [ doc = "Packet received with CRC ok" ] pub mod events_crcok { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CRCOK { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Packet received with CRC error" ] pub struct EVENTS_CRCERROR { register : VolatileCell < u32 > } # [ doc = "Packet received with CRC error" ] pub mod events_crcerror { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CRCERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY_START`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READY_STARTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READY_STARTR :: DISABLED => false , READY_STARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READY_STARTR { match value { false => READY_STARTR :: DISABLED , true => READY_STARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READY_STARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READY_STARTR :: ENABLED } } # [ doc = "Possible values of the field `END_DISABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum END_DISABLER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_DISABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { END_DISABLER :: DISABLED => false , END_DISABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> END_DISABLER { match value { false => END_DISABLER :: DISABLED , true => END_DISABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == END_DISABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == END_DISABLER :: ENABLED } } # [ doc = "Possible values of the field `DISABLED_TXEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLED_TXENR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_TXENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLED_TXENR :: DISABLED => false , DISABLED_TXENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLED_TXENR { match value { false => DISABLED_TXENR :: DISABLED , true => DISABLED_TXENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLED_TXENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLED_TXENR :: ENABLED } } # [ doc = "Possible values of the field `DISABLED_RXEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLED_RXENR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_RXENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLED_RXENR :: DISABLED => false , DISABLED_RXENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLED_RXENR { match value { false => DISABLED_RXENR :: DISABLED , true => DISABLED_RXENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLED_RXENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLED_RXENR :: ENABLED } } # [ doc = "Possible values of the field `ADDRESS_RSSISTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESS_RSSISTARTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ADDRESS_RSSISTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESS_RSSISTARTR :: DISABLED => false , ADDRESS_RSSISTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESS_RSSISTARTR { match value { false => ADDRESS_RSSISTARTR :: DISABLED , true => ADDRESS_RSSISTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESS_RSSISTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESS_RSSISTARTR :: ENABLED } } # [ doc = "Possible values of the field `END_START`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum END_STARTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_STARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { END_STARTR :: DISABLED => false , END_STARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> END_STARTR { match value { false => END_STARTR :: DISABLED , true => END_STARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == END_STARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == END_STARTR :: ENABLED } } # [ doc = "Possible values of the field `ADDRESS_BCSTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESS_BCSTARTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ADDRESS_BCSTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESS_BCSTARTR :: DISABLED => false , ADDRESS_BCSTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESS_BCSTARTR { match value { false => ADDRESS_BCSTARTR :: DISABLED , true => ADDRESS_BCSTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESS_BCSTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESS_BCSTARTR :: ENABLED } } # [ doc = "Possible values of the field `DISABLED_RSSISTOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLED_RSSISTOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_RSSISTOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLED_RSSISTOPR :: DISABLED => false , DISABLED_RSSISTOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLED_RSSISTOPR { match value { false => DISABLED_RSSISTOPR :: DISABLED , true => DISABLED_RSSISTOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLED_RSSISTOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLED_RSSISTOPR :: ENABLED } } # [ doc = "Values that can be written to the field `READY_START`" ] pub enum READY_STARTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READY_STARTW :: DISABLED => false , READY_STARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READY_STARTW < 'a > { w : & 'a mut W , } impl < 'a > _READY_STARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READY_STARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READY_STARTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READY_STARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END_DISABLE`" ] pub enum END_DISABLEW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_DISABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { END_DISABLEW :: DISABLED => false , END_DISABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _END_DISABLEW < 'a > { w : & 'a mut W , } impl < 'a > _END_DISABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : END_DISABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( END_DISABLEW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( END_DISABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DISABLED_TXEN`" ] pub enum DISABLED_TXENW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_TXENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLED_TXENW :: DISABLED => false , DISABLED_TXENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DISABLED_TXENW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLED_TXENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLED_TXENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DISABLED_TXENW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DISABLED_TXENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DISABLED_RXEN`" ] pub enum DISABLED_RXENW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_RXENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLED_RXENW :: DISABLED => false , DISABLED_RXENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DISABLED_RXENW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLED_RXENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLED_RXENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DISABLED_RXENW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DISABLED_RXENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDRESS_RSSISTART`" ] pub enum ADDRESS_RSSISTARTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ADDRESS_RSSISTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESS_RSSISTARTW :: DISABLED => false , ADDRESS_RSSISTARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESS_RSSISTARTW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESS_RSSISTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESS_RSSISTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDRESS_RSSISTARTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDRESS_RSSISTARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END_START`" ] pub enum END_STARTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_STARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { END_STARTW :: DISABLED => false , END_STARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _END_STARTW < 'a > { w : & 'a mut W , } impl < 'a > _END_STARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : END_STARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( END_STARTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( END_STARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDRESS_BCSTART`" ] pub enum ADDRESS_BCSTARTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ADDRESS_BCSTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESS_BCSTARTW :: DISABLED => false , ADDRESS_BCSTARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESS_BCSTARTW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESS_BCSTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESS_BCSTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDRESS_BCSTARTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDRESS_BCSTARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DISABLED_RSSISTOP`" ] pub enum DISABLED_RSSISTOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DISABLED_RSSISTOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLED_RSSISTOPW :: DISABLED => false , DISABLED_RSSISTOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DISABLED_RSSISTOPW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLED_RSSISTOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLED_RSSISTOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DISABLED_RSSISTOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DISABLED_RSSISTOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between READY event and START task" ] # [ inline ] pub fn ready_start ( & self ) -> READY_STARTR { READY_STARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between END event and DISABLE task" ] # [ inline ] pub fn end_disable ( & self ) -> END_DISABLER { END_DISABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between DISABLED event and TXEN task" ] # [ inline ] pub fn disabled_txen ( & self ) -> DISABLED_TXENR { DISABLED_TXENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between DISABLED event and RXEN task" ] # [ inline ] pub fn disabled_rxen ( & self ) -> DISABLED_RXENR { DISABLED_RXENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between ADDRESS event and RSSISTART task" ] # [ inline ] pub fn address_rssistart ( & self ) -> ADDRESS_RSSISTARTR { ADDRESS_RSSISTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Shortcut between END event and START task" ] # [ inline ] pub fn end_start ( & self ) -> END_STARTR { END_STARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Shortcut between ADDRESS event and BCSTART task" ] # [ inline ] pub fn address_bcstart ( & self ) -> ADDRESS_BCSTARTR { ADDRESS_BCSTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Shortcut between DISABLED event and RSSISTOP task" ] # [ inline ] pub fn disabled_rssistop ( & self ) -> DISABLED_RSSISTOPR { DISABLED_RSSISTOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between READY event and START task" ] # [ inline ] pub fn ready_start ( & mut self ) -> _READY_STARTW { _READY_STARTW { w : self } } # [ doc = "Bit 1 - Shortcut between END event and DISABLE task" ] # [ inline ] pub fn end_disable ( & mut self ) -> _END_DISABLEW { _END_DISABLEW { w : self } } # [ doc = "Bit 2 - Shortcut between DISABLED event and TXEN task" ] # [ inline ] pub fn disabled_txen ( & mut self ) -> _DISABLED_TXENW { _DISABLED_TXENW { w : self } } # [ doc = "Bit 3 - Shortcut between DISABLED event and RXEN task" ] # [ inline ] pub fn disabled_rxen ( & mut self ) -> _DISABLED_RXENW { _DISABLED_RXENW { w : self } } # [ doc = "Bit 4 - Shortcut between ADDRESS event and RSSISTART task" ] # [ inline ] pub fn address_rssistart ( & mut self ) -> _ADDRESS_RSSISTARTW { _ADDRESS_RSSISTARTW { w : self } } # [ doc = "Bit 5 - Shortcut between END event and START task" ] # [ inline ] pub fn end_start ( & mut self ) -> _END_STARTW { _END_STARTW { w : self } } # [ doc = "Bit 6 - Shortcut between ADDRESS event and BCSTART task" ] # [ inline ] pub fn address_bcstart ( & mut self ) -> _ADDRESS_BCSTARTW { _ADDRESS_BCSTARTW { w : self } } # [ doc = "Bit 8 - Shortcut between DISABLED event and RSSISTOP task" ] # [ inline ] pub fn disabled_rssistop ( & mut self ) -> _DISABLED_RSSISTOPW { _DISABLED_RSSISTOPW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `ADDRESS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ADDRESSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESSR :: DISABLED => false , ADDRESSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESSR { match value { false => ADDRESSR :: DISABLED , true => ADDRESSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESSR :: ENABLED } } # [ doc = "Possible values of the field `PAYLOAD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PAYLOADR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PAYLOADR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PAYLOADR :: DISABLED => false , PAYLOADR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PAYLOADR { match value { false => PAYLOADR :: DISABLED , true => PAYLOADR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PAYLOADR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PAYLOADR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `DISABLED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DISABLEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLEDR :: DISABLED => false , DISABLEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLEDR { match value { false => DISABLEDR :: DISABLED , true => DISABLEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLEDR :: ENABLED } } # [ doc = "Possible values of the field `DEVMATCH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVMATCHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DEVMATCHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DEVMATCHR :: DISABLED => false , DEVMATCHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DEVMATCHR { match value { false => DEVMATCHR :: DISABLED , true => DEVMATCHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DEVMATCHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DEVMATCHR :: ENABLED } } # [ doc = "Possible values of the field `DEVMISS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVMISSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DEVMISSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DEVMISSR :: DISABLED => false , DEVMISSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DEVMISSR { match value { false => DEVMISSR :: DISABLED , true => DEVMISSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DEVMISSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DEVMISSR :: ENABLED } } # [ doc = "Possible values of the field `RSSIEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSSIENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RSSIENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RSSIENDR :: DISABLED => false , RSSIENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RSSIENDR { match value { false => RSSIENDR :: DISABLED , true => RSSIENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RSSIENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RSSIENDR :: ENABLED } } # [ doc = "Possible values of the field `BCMATCH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCMATCHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl BCMATCHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BCMATCHR :: DISABLED => false , BCMATCHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BCMATCHR { match value { false => BCMATCHR :: DISABLED , true => BCMATCHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BCMATCHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BCMATCHR :: ENABLED } } # [ doc = "Possible values of the field `CRCOK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCOKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CRCOKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CRCOKR :: DISABLED => false , CRCOKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CRCOKR { match value { false => CRCOKR :: DISABLED , true => CRCOKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CRCOKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CRCOKR :: ENABLED } } # [ doc = "Possible values of the field `CRCERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CRCERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CRCERRORR :: DISABLED => false , CRCERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CRCERRORR { match value { false => CRCERRORR :: DISABLED , true => CRCERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CRCERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CRCERRORR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Enable" ] SET } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDRESS`" ] pub enum ADDRESSW { # [ doc = "Enable" ] SET } impl ADDRESSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ADDRESSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PAYLOAD`" ] pub enum PAYLOADW { # [ doc = "Enable" ] SET } impl PAYLOADW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PAYLOADW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PAYLOADW < 'a > { w : & 'a mut W , } impl < 'a > _PAYLOADW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PAYLOADW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PAYLOADW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DISABLED`" ] pub enum DISABLEDW { # [ doc = "Enable" ] SET } impl DISABLEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DISABLEDW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DISABLEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DEVMATCH`" ] pub enum DEVMATCHW { # [ doc = "Enable" ] SET } impl DEVMATCHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DEVMATCHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DEVMATCHW < 'a > { w : & 'a mut W , } impl < 'a > _DEVMATCHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DEVMATCHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DEVMATCHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DEVMISS`" ] pub enum DEVMISSW { # [ doc = "Enable" ] SET } impl DEVMISSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DEVMISSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DEVMISSW < 'a > { w : & 'a mut W , } impl < 'a > _DEVMISSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DEVMISSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DEVMISSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RSSIEND`" ] pub enum RSSIENDW { # [ doc = "Enable" ] SET } impl RSSIENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RSSIENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RSSIENDW < 'a > { w : & 'a mut W , } impl < 'a > _RSSIENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RSSIENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RSSIENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BCMATCH`" ] pub enum BCMATCHW { # [ doc = "Enable" ] SET } impl BCMATCHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BCMATCHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _BCMATCHW < 'a > { w : & 'a mut W , } impl < 'a > _BCMATCHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BCMATCHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( BCMATCHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CRCOK`" ] pub enum CRCOKW { # [ doc = "Enable" ] SET } impl CRCOKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CRCOKW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CRCOKW < 'a > { w : & 'a mut W , } impl < 'a > _CRCOKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CRCOKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CRCOKW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CRCERROR`" ] pub enum CRCERRORW { # [ doc = "Enable" ] SET } impl CRCERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CRCERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CRCERRORW < 'a > { w : & 'a mut W , } impl < 'a > _CRCERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CRCERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CRCERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ADDRESS event" ] # [ inline ] pub fn address ( & self ) -> ADDRESSR { ADDRESSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for PAYLOAD event" ] # [ inline ] pub fn payload ( & self ) -> PAYLOADR { PAYLOADR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for DISABLED event" ] # [ inline ] pub fn disabled ( & self ) -> DISABLEDR { DISABLEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for DEVMATCH event" ] # [ inline ] pub fn devmatch ( & self ) -> DEVMATCHR { DEVMATCHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for DEVMISS event" ] # [ inline ] pub fn devmiss ( & self ) -> DEVMISSR { DEVMISSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for RSSIEND event" ] # [ inline ] pub fn rssiend ( & self ) -> RSSIENDR { RSSIENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Enable interrupt for BCMATCH event" ] # [ inline ] pub fn bcmatch ( & self ) -> BCMATCHR { BCMATCHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Enable interrupt for CRCOK event" ] # [ inline ] pub fn crcok ( & self ) -> CRCOKR { CRCOKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Enable interrupt for CRCERROR event" ] # [ inline ] pub fn crcerror ( & self ) -> CRCERRORR { CRCERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ADDRESS event" ] # [ inline ] pub fn address ( & mut self ) -> _ADDRESSW { _ADDRESSW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for PAYLOAD event" ] # [ inline ] pub fn payload ( & mut self ) -> _PAYLOADW { _PAYLOADW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for DISABLED event" ] # [ inline ] pub fn disabled ( & mut self ) -> _DISABLEDW { _DISABLEDW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for DEVMATCH event" ] # [ inline ] pub fn devmatch ( & mut self ) -> _DEVMATCHW { _DEVMATCHW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for DEVMISS event" ] # [ inline ] pub fn devmiss ( & mut self ) -> _DEVMISSW { _DEVMISSW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for RSSIEND event" ] # [ inline ] pub fn rssiend ( & mut self ) -> _RSSIENDW { _RSSIENDW { w : self } } # [ doc = "Bit 10 - Write '1' to Enable interrupt for BCMATCH event" ] # [ inline ] pub fn bcmatch ( & mut self ) -> _BCMATCHW { _BCMATCHW { w : self } } # [ doc = "Bit 12 - Write '1' to Enable interrupt for CRCOK event" ] # [ inline ] pub fn crcok ( & mut self ) -> _CRCOKW { _CRCOKW { w : self } } # [ doc = "Bit 13 - Write '1' to Enable interrupt for CRCERROR event" ] # [ inline ] pub fn crcerror ( & mut self ) -> _CRCERRORW { _CRCERRORW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `ADDRESS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ADDRESSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESSR :: DISABLED => false , ADDRESSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESSR { match value { false => ADDRESSR :: DISABLED , true => ADDRESSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESSR :: ENABLED } } # [ doc = "Possible values of the field `PAYLOAD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PAYLOADR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PAYLOADR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PAYLOADR :: DISABLED => false , PAYLOADR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PAYLOADR { match value { false => PAYLOADR :: DISABLED , true => PAYLOADR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PAYLOADR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PAYLOADR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `DISABLED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DISABLEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DISABLEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DISABLEDR :: DISABLED => false , DISABLEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DISABLEDR { match value { false => DISABLEDR :: DISABLED , true => DISABLEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DISABLEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DISABLEDR :: ENABLED } } # [ doc = "Possible values of the field `DEVMATCH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVMATCHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DEVMATCHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DEVMATCHR :: DISABLED => false , DEVMATCHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DEVMATCHR { match value { false => DEVMATCHR :: DISABLED , true => DEVMATCHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DEVMATCHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DEVMATCHR :: ENABLED } } # [ doc = "Possible values of the field `DEVMISS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DEVMISSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DEVMISSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DEVMISSR :: DISABLED => false , DEVMISSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DEVMISSR { match value { false => DEVMISSR :: DISABLED , true => DEVMISSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DEVMISSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DEVMISSR :: ENABLED } } # [ doc = "Possible values of the field `RSSIEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RSSIENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RSSIENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RSSIENDR :: DISABLED => false , RSSIENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RSSIENDR { match value { false => RSSIENDR :: DISABLED , true => RSSIENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RSSIENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RSSIENDR :: ENABLED } } # [ doc = "Possible values of the field `BCMATCH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BCMATCHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl BCMATCHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BCMATCHR :: DISABLED => false , BCMATCHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BCMATCHR { match value { false => BCMATCHR :: DISABLED , true => BCMATCHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BCMATCHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BCMATCHR :: ENABLED } } # [ doc = "Possible values of the field `CRCOK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCOKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CRCOKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CRCOKR :: DISABLED => false , CRCOKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CRCOKR { match value { false => CRCOKR :: DISABLED , true => CRCOKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CRCOKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CRCOKR :: ENABLED } } # [ doc = "Possible values of the field `CRCERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CRCERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CRCERRORR :: DISABLED => false , CRCERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CRCERRORR { match value { false => CRCERRORR :: DISABLED , true => CRCERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CRCERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CRCERRORR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] CLEAR } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDRESS`" ] pub enum ADDRESSW { # [ doc = "Disable" ] CLEAR } impl ADDRESSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ADDRESSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PAYLOAD`" ] pub enum PAYLOADW { # [ doc = "Disable" ] CLEAR } impl PAYLOADW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PAYLOADW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PAYLOADW < 'a > { w : & 'a mut W , } impl < 'a > _PAYLOADW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PAYLOADW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PAYLOADW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DISABLED`" ] pub enum DISABLEDW { # [ doc = "Disable" ] CLEAR } impl DISABLEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DISABLEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DISABLEDW < 'a > { w : & 'a mut W , } impl < 'a > _DISABLEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DISABLEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DISABLEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DEVMATCH`" ] pub enum DEVMATCHW { # [ doc = "Disable" ] CLEAR } impl DEVMATCHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DEVMATCHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DEVMATCHW < 'a > { w : & 'a mut W , } impl < 'a > _DEVMATCHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DEVMATCHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DEVMATCHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DEVMISS`" ] pub enum DEVMISSW { # [ doc = "Disable" ] CLEAR } impl DEVMISSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DEVMISSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DEVMISSW < 'a > { w : & 'a mut W , } impl < 'a > _DEVMISSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DEVMISSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DEVMISSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RSSIEND`" ] pub enum RSSIENDW { # [ doc = "Disable" ] CLEAR } impl RSSIENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RSSIENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RSSIENDW < 'a > { w : & 'a mut W , } impl < 'a > _RSSIENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RSSIENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RSSIENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BCMATCH`" ] pub enum BCMATCHW { # [ doc = "Disable" ] CLEAR } impl BCMATCHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BCMATCHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _BCMATCHW < 'a > { w : & 'a mut W , } impl < 'a > _BCMATCHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BCMATCHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( BCMATCHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CRCOK`" ] pub enum CRCOKW { # [ doc = "Disable" ] CLEAR } impl CRCOKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CRCOKW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CRCOKW < 'a > { w : & 'a mut W , } impl < 'a > _CRCOKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CRCOKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CRCOKW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CRCERROR`" ] pub enum CRCERRORW { # [ doc = "Disable" ] CLEAR } impl CRCERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CRCERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CRCERRORW < 'a > { w : & 'a mut W , } impl < 'a > _CRCERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CRCERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CRCERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ADDRESS event" ] # [ inline ] pub fn address ( & self ) -> ADDRESSR { ADDRESSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for PAYLOAD event" ] # [ inline ] pub fn payload ( & self ) -> PAYLOADR { PAYLOADR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for DISABLED event" ] # [ inline ] pub fn disabled ( & self ) -> DISABLEDR { DISABLEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for DEVMATCH event" ] # [ inline ] pub fn devmatch ( & self ) -> DEVMATCHR { DEVMATCHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for DEVMISS event" ] # [ inline ] pub fn devmiss ( & self ) -> DEVMISSR { DEVMISSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for RSSIEND event" ] # [ inline ] pub fn rssiend ( & self ) -> RSSIENDR { RSSIENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Disable interrupt for BCMATCH event" ] # [ inline ] pub fn bcmatch ( & self ) -> BCMATCHR { BCMATCHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Disable interrupt for CRCOK event" ] # [ inline ] pub fn crcok ( & self ) -> CRCOKR { CRCOKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Disable interrupt for CRCERROR event" ] # [ inline ] pub fn crcerror ( & self ) -> CRCERRORR { CRCERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ADDRESS event" ] # [ inline ] pub fn address ( & mut self ) -> _ADDRESSW { _ADDRESSW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for PAYLOAD event" ] # [ inline ] pub fn payload ( & mut self ) -> _PAYLOADW { _PAYLOADW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for DISABLED event" ] # [ inline ] pub fn disabled ( & mut self ) -> _DISABLEDW { _DISABLEDW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for DEVMATCH event" ] # [ inline ] pub fn devmatch ( & mut self ) -> _DEVMATCHW { _DEVMATCHW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for DEVMISS event" ] # [ inline ] pub fn devmiss ( & mut self ) -> _DEVMISSW { _DEVMISSW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for RSSIEND event" ] # [ inline ] pub fn rssiend ( & mut self ) -> _RSSIENDW { _RSSIENDW { w : self } } # [ doc = "Bit 10 - Write '1' to Disable interrupt for BCMATCH event" ] # [ inline ] pub fn bcmatch ( & mut self ) -> _BCMATCHW { _BCMATCHW { w : self } } # [ doc = "Bit 12 - Write '1' to Disable interrupt for CRCOK event" ] # [ inline ] pub fn crcok ( & mut self ) -> _CRCOKW { _CRCOKW { w : self } } # [ doc = "Bit 13 - Write '1' to Disable interrupt for CRCERROR event" ] # [ inline ] pub fn crcerror ( & mut self ) -> _CRCERRORW { _CRCERRORW { w : self } } } } # [ doc = "CRC status" ] pub struct CRCSTATUS { register : VolatileCell < u32 > } # [ doc = "CRC status" ] pub mod crcstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: CRCSTATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `CRCSTATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CRCSTATUSR { # [ doc = "Packet received with CRC error" ] CRCERROR , # [ doc = "Packet received with CRC ok" ] CRCOK } impl CRCSTATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CRCSTATUSR :: CRCERROR => false , CRCSTATUSR :: CRCOK => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CRCSTATUSR { match value { false => CRCSTATUSR :: CRCERROR , true => CRCSTATUSR :: CRCOK , } } # [ doc = "Checks if the value of the field is `CRCERROR`" ] # [ inline ] pub fn is_crcerror ( & self ) -> bool { * self == CRCSTATUSR :: CRCERROR } # [ doc = "Checks if the value of the field is `CRCOK`" ] # [ inline ] pub fn is_crcok ( & self ) -> bool { * self == CRCSTATUSR :: CRCOK } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - CRC status of packet received" ] # [ inline ] pub fn crcstatus ( & self ) -> CRCSTATUSR { CRCSTATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Received address" ] pub struct RXMATCH { register : VolatileCell < u32 > } # [ doc = "Received address" ] pub mod rxmatch { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RXMATCH { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RXMATCHR { bits : u8 , } impl RXMATCHR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Received address" ] # [ inline ] pub fn rxmatch ( & self ) -> RXMATCHR { let bits = { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RXMATCHR { bits } } } } # [ doc = "CRC field of previously received packet" ] pub struct RXCRC { register : VolatileCell < u32 > } # [ doc = "CRC field of previously received packet" ] pub mod rxcrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RXCRC { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RXCRCR { bits : u32 , } impl RXCRCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:23 - CRC field of previously received packet" ] # [ inline ] pub fn rxcrc ( & self ) -> RXCRCR { let bits = { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; RXCRCR { bits } } } } # [ doc = "Device address match index" ] pub struct DAI { register : VolatileCell < u32 > } # [ doc = "Device address match index" ] pub mod dai { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: DAI { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct DAIR { bits : u8 , } impl DAIR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Device address match index" ] # [ inline ] pub fn dai ( & self ) -> DAIR { let bits = { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; DAIR { bits } } } } # [ doc = "Packet pointer" ] pub struct PACKETPTR { register : VolatileCell < u32 > } # [ doc = "Packet pointer" ] pub mod packetptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PACKETPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct PACKETPTRR { bits : u32 , } impl PACKETPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _PACKETPTRW < 'a > { w : & 'a mut W , } impl < 'a > _PACKETPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Packet pointer" ] # [ inline ] pub fn packetptr ( & self ) -> PACKETPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; PACKETPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Packet pointer" ] # [ inline ] pub fn packetptr ( & mut self ) -> _PACKETPTRW { _PACKETPTRW { w : self } } } } # [ doc = "Frequency" ] pub struct FREQUENCY { register : VolatileCell < u32 > } # [ doc = "Frequency" ] pub mod frequency { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FREQUENCY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct FREQUENCYR { bits : u8 , } impl FREQUENCYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `MAP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAPR { # [ doc = "Channel map between 2400 MHZ .. 2500 MHz" ] DEFAULT , # [ doc = "Channel map between 2360 MHZ .. 2460 MHz" ] LOW } impl MAPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MAPR :: DEFAULT => false , MAPR :: LOW => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MAPR { match value { false => MAPR :: DEFAULT , true => MAPR :: LOW , } } # [ doc = "Checks if the value of the field is `DEFAULT`" ] # [ inline ] pub fn is_default ( & self ) -> bool { * self == MAPR :: DEFAULT } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == MAPR :: LOW } } # [ doc = r" Proxy" ] pub struct _FREQUENCYW < 'a > { w : & 'a mut W , } impl < 'a > _FREQUENCYW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `MAP`" ] pub enum MAPW { # [ doc = "Channel map between 2400 MHZ .. 2500 MHz" ] DEFAULT , # [ doc = "Channel map between 2360 MHZ .. 2460 MHz" ] LOW } impl MAPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { MAPW :: DEFAULT => false , MAPW :: LOW => true } } } # [ doc = r" Proxy" ] pub struct _MAPW < 'a > { w : & 'a mut W , } impl < 'a > _MAPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MAPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Channel map between 2400 MHZ .. 2500 MHz" ] # [ inline ] pub fn default ( self ) -> & 'a mut W { self . variant ( MAPW :: DEFAULT ) } # [ doc = "Channel map between 2360 MHZ .. 2460 MHz" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( MAPW :: LOW ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Radio channel frequency" ] # [ inline ] pub fn frequency ( & self ) -> FREQUENCYR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; FREQUENCYR { bits } } # [ doc = "Bit 8 - Channel map selection." ] # [ inline ] pub fn map ( & self ) -> MAPR { MAPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x02 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Radio channel frequency" ] # [ inline ] pub fn frequency ( & mut self ) -> _FREQUENCYW { _FREQUENCYW { w : self } } # [ doc = "Bit 8 - Channel map selection." ] # [ inline ] pub fn map ( & mut self ) -> _MAPW { _MAPW { w : self } } } } # [ doc = "Output power" ] pub struct TXPOWER { register : VolatileCell < u32 > } # [ doc = "Output power" ] pub mod txpower { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TXPOWER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TXPOWER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPOWERR { # [ doc = "+4 dBm" ] POS4DBM , # [ doc = "+3 dBm" ] POS3DBM , # [ doc = "0 dBm" ] _0DBM , # [ doc = "-4 dBm" ] NEG4DBM , # [ doc = "-8 dBm" ] NEG8DBM , # [ doc = "-12 dBm" ] NEG12DBM , # [ doc = "-16 dBm" ] NEG16DBM , # [ doc = "-20 dBm" ] NEG20DBM , # [ doc = "-40 dBm" ] NEG40DBM , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl TXPOWERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { TXPOWERR :: POS4DBM => 0x04 , TXPOWERR :: POS3DBM => 0x03 , TXPOWERR :: _0DBM => 0 , TXPOWERR :: NEG4DBM => 0xfc , TXPOWERR :: NEG8DBM => 0xf8 , TXPOWERR :: NEG12DBM => 0xf4 , TXPOWERR :: NEG16DBM => 0xf0 , TXPOWERR :: NEG20DBM => 0xec , TXPOWERR :: NEG40DBM => 0xd8 , TXPOWERR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> TXPOWERR { match value { 4 => TXPOWERR :: POS4DBM , 3 => TXPOWERR :: POS3DBM , 0 => TXPOWERR :: _0DBM , 252 => TXPOWERR :: NEG4DBM , 248 => TXPOWERR :: NEG8DBM , 244 => TXPOWERR :: NEG12DBM , 240 => TXPOWERR :: NEG16DBM , 236 => TXPOWERR :: NEG20DBM , 216 => TXPOWERR :: NEG40DBM , i => TXPOWERR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `POS4DBM`" ] # [ inline ] pub fn is_pos4d_bm ( & self ) -> bool { * self == TXPOWERR :: POS4DBM } # [ doc = "Checks if the value of the field is `POS3DBM`" ] # [ inline ] pub fn is_pos3d_bm ( & self ) -> bool { * self == TXPOWERR :: POS3DBM } # [ doc = "Checks if the value of the field is `_0DBM`" ] # [ inline ] pub fn is_0d_bm ( & self ) -> bool { * self == TXPOWERR :: _0DBM } # [ doc = "Checks if the value of the field is `NEG4DBM`" ] # [ inline ] pub fn is_neg4d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG4DBM } # [ doc = "Checks if the value of the field is `NEG8DBM`" ] # [ inline ] pub fn is_neg8d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG8DBM } # [ doc = "Checks if the value of the field is `NEG12DBM`" ] # [ inline ] pub fn is_neg12d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG12DBM } # [ doc = "Checks if the value of the field is `NEG16DBM`" ] # [ inline ] pub fn is_neg16d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG16DBM } # [ doc = "Checks if the value of the field is `NEG20DBM`" ] # [ inline ] pub fn is_neg20d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG20DBM } # [ doc = "Checks if the value of the field is `NEG40DBM`" ] # [ inline ] pub fn is_neg40d_bm ( & self ) -> bool { * self == TXPOWERR :: NEG40DBM } } # [ doc = "Values that can be written to the field `TXPOWER`" ] pub enum TXPOWERW { # [ doc = "+4 dBm" ] POS4DBM , # [ doc = "+3 dBm" ] POS3DBM , # [ doc = "0 dBm" ] _0DBM , # [ doc = "-4 dBm" ] NEG4DBM , # [ doc = "-8 dBm" ] NEG8DBM , # [ doc = "-12 dBm" ] NEG12DBM , # [ doc = "-16 dBm" ] NEG16DBM , # [ doc = "-20 dBm" ] NEG20DBM , # [ doc = "-40 dBm" ] NEG40DBM } impl TXPOWERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { TXPOWERW :: POS4DBM => 4 , TXPOWERW :: POS3DBM => 3 , TXPOWERW :: _0DBM => 0 , TXPOWERW :: NEG4DBM => 252 , TXPOWERW :: NEG8DBM => 248 , TXPOWERW :: NEG12DBM => 244 , TXPOWERW :: NEG16DBM => 240 , TXPOWERW :: NEG20DBM => 236 , TXPOWERW :: NEG40DBM => 216 } } } # [ doc = r" Proxy" ] pub struct _TXPOWERW < 'a > { w : & 'a mut W , } impl < 'a > _TXPOWERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXPOWERW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "+4 dBm" ] # [ inline ] pub fn pos4d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: POS4DBM ) } # [ doc = "+3 dBm" ] # [ inline ] pub fn pos3d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: POS3DBM ) } # [ doc = "0 dBm" ] # [ inline ] pub fn _0d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: _0DBM ) } # [ doc = "-4 dBm" ] # [ inline ] pub fn neg4d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG4DBM ) } # [ doc = "-8 dBm" ] # [ inline ] pub fn neg8d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG8DBM ) } # [ doc = "-12 dBm" ] # [ inline ] pub fn neg12d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG12DBM ) } # [ doc = "-16 dBm" ] # [ inline ] pub fn neg16d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG16DBM ) } # [ doc = "-20 dBm" ] # [ inline ] pub fn neg20d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG20DBM ) } # [ doc = "-40 dBm" ] # [ inline ] pub fn neg40d_bm ( self ) -> & 'a mut W { self . variant ( TXPOWERW :: NEG40DBM ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - RADIO output power." ] # [ inline ] pub fn txpower ( & self ) -> TXPOWERR { TXPOWERR :: _from ( { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - RADIO output power." ] # [ inline ] pub fn txpower ( & mut self ) -> _TXPOWERW { _TXPOWERW { w : self } } } } # [ doc = "Data rate and modulation" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Data rate and modulation" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "1 Mbit/s Nordic proprietary radio mode" ] NRF_1MBIT , # [ doc = "2 Mbit/s Nordic proprietary radio mode" ] NRF_2MBIT , # [ doc = "Deprecated enumerator -  250 kbit/s Nordic proprietary radio mode" ] NRF_250KBIT , # [ doc = "1 Mbit/s Bluetooth Low Energy" ] BLE_1MBIT , # [ doc = "2 Mbit/s Bluetooth Low Energy" ] BLE_2MBIT , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl MODER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { MODER :: NRF_1MBIT => 0 , MODER :: NRF_2MBIT => 0x01 , MODER :: NRF_250KBIT => 0x02 , MODER :: BLE_1MBIT => 0x03 , MODER :: BLE_2MBIT => 0x04 , MODER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> MODER { match value { 0 => MODER :: NRF_1MBIT , 1 => MODER :: NRF_2MBIT , 2 => MODER :: NRF_250KBIT , 3 => MODER :: BLE_1MBIT , 4 => MODER :: BLE_2MBIT , i => MODER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `NRF_1MBIT`" ] # [ inline ] pub fn is_nrf_1mbit ( & self ) -> bool { * self == MODER :: NRF_1MBIT } # [ doc = "Checks if the value of the field is `NRF_2MBIT`" ] # [ inline ] pub fn is_nrf_2mbit ( & self ) -> bool { * self == MODER :: NRF_2MBIT } # [ doc = "Checks if the value of the field is `NRF_250KBIT`" ] # [ inline ] pub fn is_nrf_250kbit ( & self ) -> bool { * self == MODER :: NRF_250KBIT } # [ doc = "Checks if the value of the field is `BLE_1MBIT`" ] # [ inline ] pub fn is_ble_1mbit ( & self ) -> bool { * self == MODER :: BLE_1MBIT } # [ doc = "Checks if the value of the field is `BLE_2MBIT`" ] # [ inline ] pub fn is_ble_2mbit ( & self ) -> bool { * self == MODER :: BLE_2MBIT } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "1 Mbit/s Nordic proprietary radio mode" ] NRF_1MBIT , # [ doc = "2 Mbit/s Nordic proprietary radio mode" ] NRF_2MBIT , # [ doc = "Deprecated enumerator -  250 kbit/s Nordic proprietary radio mode" ] NRF_250KBIT , # [ doc = "1 Mbit/s Bluetooth Low Energy" ] BLE_1MBIT , # [ doc = "2 Mbit/s Bluetooth Low Energy" ] BLE_2MBIT } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { MODEW :: NRF_1MBIT => 0 , MODEW :: NRF_2MBIT => 1 , MODEW :: NRF_250KBIT => 2 , MODEW :: BLE_1MBIT => 3 , MODEW :: BLE_2MBIT => 4 } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "1 Mbit/s Nordic proprietary radio mode" ] # [ inline ] pub fn nrf_1mbit ( self ) -> & 'a mut W { self . variant ( MODEW :: NRF_1MBIT ) } # [ doc = "2 Mbit/s Nordic proprietary radio mode" ] # [ inline ] pub fn nrf_2mbit ( self ) -> & 'a mut W { self . variant ( MODEW :: NRF_2MBIT ) } # [ doc = "Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode" ] # [ inline ] pub fn nrf_250kbit ( self ) -> & 'a mut W { self . variant ( MODEW :: NRF_250KBIT ) } # [ doc = "1 Mbit/s Bluetooth Low Energy" ] # [ inline ] pub fn ble_1mbit ( self ) -> & 'a mut W { self . variant ( MODEW :: BLE_1MBIT ) } # [ doc = "2 Mbit/s Bluetooth Low Energy" ] # [ inline ] pub fn ble_2mbit ( self ) -> & 'a mut W { self . variant ( MODEW :: BLE_2MBIT ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation." ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation." ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } } } # [ doc = "Packet configuration register 0" ] pub struct PCNF0 { register : VolatileCell < u32 > } # [ doc = "Packet configuration register 0" ] pub mod pcnf0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PCNF0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct LFLENR { bits : u8 , } impl LFLENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct S0LENR { bits : bool , } impl S0LENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct S1LENR { bits : u8 , } impl S1LENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `S1INCL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum S1INCLR { # [ doc = "Include S1 field in RAM only if S1LEN &gt; 0" ] AUTOMATIC , # [ doc = "Always include S1 field in RAM independent of S1LEN" ] INCLUDE } impl S1INCLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { S1INCLR :: AUTOMATIC => false , S1INCLR :: INCLUDE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> S1INCLR { match value { false => S1INCLR :: AUTOMATIC , true => S1INCLR :: INCLUDE , } } # [ doc = "Checks if the value of the field is `AUTOMATIC`" ] # [ inline ] pub fn is_automatic ( & self ) -> bool { * self == S1INCLR :: AUTOMATIC } # [ doc = "Checks if the value of the field is `INCLUDE`" ] # [ inline ] pub fn is_include ( & self ) -> bool { * self == S1INCLR :: INCLUDE } } # [ doc = "Possible values of the field `PLEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PLENR { # [ doc = "8-bit preamble" ] _8BIT , # [ doc = "16-bit preamble" ] _16BIT } impl PLENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PLENR :: _8BIT => false , PLENR :: _16BIT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PLENR { match value { false => PLENR :: _8BIT , true => PLENR :: _16BIT , } } # [ doc = "Checks if the value of the field is `_8BIT`" ] # [ inline ] pub fn is_8bit ( & self ) -> bool { * self == PLENR :: _8BIT } # [ doc = "Checks if the value of the field is `_16BIT`" ] # [ inline ] pub fn is_16bit ( & self ) -> bool { * self == PLENR :: _16BIT } } # [ doc = r" Proxy" ] pub struct _LFLENW < 'a > { w : & 'a mut W , } impl < 'a > _LFLENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _S0LENW < 'a > { w : & 'a mut W , } impl < 'a > _S0LENW < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _S1LENW < 'a > { w : & 'a mut W , } impl < 'a > _S1LENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `S1INCL`" ] pub enum S1INCLW { # [ doc = "Include S1 field in RAM only if S1LEN &gt; 0" ] AUTOMATIC , # [ doc = "Always include S1 field in RAM independent of S1LEN" ] INCLUDE } impl S1INCLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { S1INCLW :: AUTOMATIC => false , S1INCLW :: INCLUDE => true } } } # [ doc = r" Proxy" ] pub struct _S1INCLW < 'a > { w : & 'a mut W , } impl < 'a > _S1INCLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : S1INCLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Include S1 field in RAM only if S1LEN &gt; 0" ] # [ inline ] pub fn automatic ( self ) -> & 'a mut W { self . variant ( S1INCLW :: AUTOMATIC ) } # [ doc = "Always include S1 field in RAM independent of S1LEN" ] # [ inline ] pub fn include ( self ) -> & 'a mut W { self . variant ( S1INCLW :: INCLUDE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PLEN`" ] pub enum PLENW { # [ doc = "8-bit preamble" ] _8BIT , # [ doc = "16-bit preamble" ] _16BIT } impl PLENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PLENW :: _8BIT => false , PLENW :: _16BIT => true } } } # [ doc = r" Proxy" ] pub struct _PLENW < 'a > { w : & 'a mut W , } impl < 'a > _PLENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PLENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "8-bit preamble" ] # [ inline ] pub fn _8bit ( self ) -> & 'a mut W { self . variant ( PLENW :: _8BIT ) } # [ doc = "16-bit preamble" ] # [ inline ] pub fn _16bit ( self ) -> & 'a mut W { self . variant ( PLENW :: _16BIT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Length on air of LENGTH field in number of bits." ] # [ inline ] pub fn lflen ( & self ) -> LFLENR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; LFLENR { bits } } # [ doc = "Bit 8 - Length on air of S0 field in number of bytes." ] # [ inline ] pub fn s0len ( & self ) -> S0LENR { let bits = { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; S0LENR { bits } } # [ doc = "Bits 16:19 - Length on air of S1 field in number of bits." ] # [ inline ] pub fn s1len ( & self ) -> S1LENR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; S1LENR { bits } } # [ doc = "Bit 20 - Include or exclude S1 field in RAM" ] # [ inline ] pub fn s1incl ( & self ) -> S1INCLR { S1INCLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task" ] # [ inline ] pub fn plen ( & self ) -> PLENR { PLENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Length on air of LENGTH field in number of bits." ] # [ inline ] pub fn lflen ( & mut self ) -> _LFLENW { _LFLENW { w : self } } # [ doc = "Bit 8 - Length on air of S0 field in number of bytes." ] # [ inline ] pub fn s0len ( & mut self ) -> _S0LENW { _S0LENW { w : self } } # [ doc = "Bits 16:19 - Length on air of S1 field in number of bits." ] # [ inline ] pub fn s1len ( & mut self ) -> _S1LENW { _S1LENW { w : self } } # [ doc = "Bit 20 - Include or exclude S1 field in RAM" ] # [ inline ] pub fn s1incl ( & mut self ) -> _S1INCLW { _S1INCLW { w : self } } # [ doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task" ] # [ inline ] pub fn plen ( & mut self ) -> _PLENW { _PLENW { w : self } } } } # [ doc = "Packet configuration register 1" ] pub struct PCNF1 { register : VolatileCell < u32 > } # [ doc = "Packet configuration register 1" ] pub mod pcnf1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PCNF1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct MAXLENR { bits : u8 , } impl MAXLENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct STATLENR { bits : u8 , } impl STATLENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct BALENR { bits : u8 , } impl BALENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `ENDIAN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDIANR { # [ doc = "Least Significant bit on air first" ] LITTLE , # [ doc = "Most significant bit on air first" ] BIG } impl ENDIANR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDIANR :: LITTLE => false , ENDIANR :: BIG => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDIANR { match value { false => ENDIANR :: LITTLE , true => ENDIANR :: BIG , } } # [ doc = "Checks if the value of the field is `LITTLE`" ] # [ inline ] pub fn is_little ( & self ) -> bool { * self == ENDIANR :: LITTLE } # [ doc = "Checks if the value of the field is `BIG`" ] # [ inline ] pub fn is_big ( & self ) -> bool { * self == ENDIANR :: BIG } } # [ doc = "Possible values of the field `WHITEEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WHITEENR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl WHITEENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { WHITEENR :: DISABLED => false , WHITEENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> WHITEENR { match value { false => WHITEENR :: DISABLED , true => WHITEENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == WHITEENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == WHITEENR :: ENABLED } } # [ doc = r" Proxy" ] pub struct _MAXLENW < 'a > { w : & 'a mut W , } impl < 'a > _MAXLENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _STATLENW < 'a > { w : & 'a mut W , } impl < 'a > _STATLENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _BALENW < 'a > { w : & 'a mut W , } impl < 'a > _BALENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDIAN`" ] pub enum ENDIANW { # [ doc = "Least Significant bit on air first" ] LITTLE , # [ doc = "Most significant bit on air first" ] BIG } impl ENDIANW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDIANW :: LITTLE => false , ENDIANW :: BIG => true } } } # [ doc = r" Proxy" ] pub struct _ENDIANW < 'a > { w : & 'a mut W , } impl < 'a > _ENDIANW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDIANW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Least Significant bit on air first" ] # [ inline ] pub fn little ( self ) -> & 'a mut W { self . variant ( ENDIANW :: LITTLE ) } # [ doc = "Most significant bit on air first" ] # [ inline ] pub fn big ( self ) -> & 'a mut W { self . variant ( ENDIANW :: BIG ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `WHITEEN`" ] pub enum WHITEENW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl WHITEENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { WHITEENW :: DISABLED => false , WHITEENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _WHITEENW < 'a > { w : & 'a mut W , } impl < 'a > _WHITEENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WHITEENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( WHITEENW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( WHITEENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN." ] # [ inline ] pub fn maxlen ( & self ) -> MAXLENR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; MAXLENR { bits } } # [ doc = "Bits 8:15 - Static length in number of bytes" ] # [ inline ] pub fn statlen ( & self ) -> STATLENR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; STATLENR { bits } } # [ doc = "Bits 16:18 - Base address length in number of bytes" ] # [ inline ] pub fn balen ( & self ) -> BALENR { let bits = { const MASK : u8 = 0x07 ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; BALENR { bits } } # [ doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields." ] # [ inline ] pub fn endian ( & self ) -> ENDIANR { ENDIANR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable or disable packet whitening" ] # [ inline ] pub fn whiteen ( & self ) -> WHITEENR { WHITEENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN." ] # [ inline ] pub fn maxlen ( & mut self ) -> _MAXLENW { _MAXLENW { w : self } } # [ doc = "Bits 8:15 - Static length in number of bytes" ] # [ inline ] pub fn statlen ( & mut self ) -> _STATLENW { _STATLENW { w : self } } # [ doc = "Bits 16:18 - Base address length in number of bytes" ] # [ inline ] pub fn balen ( & mut self ) -> _BALENW { _BALENW { w : self } } # [ doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields." ] # [ inline ] pub fn endian ( & mut self ) -> _ENDIANW { _ENDIANW { w : self } } # [ doc = "Bit 25 - Enable or disable packet whitening" ] # [ inline ] pub fn whiteen ( & mut self ) -> _WHITEENW { _WHITEENW { w : self } } } } # [ doc = "Base address 0" ] pub struct BASE0 { register : VolatileCell < u32 > } # [ doc = "Base address 0" ] pub mod base0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BASE0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct BASE0R { bits : u32 , } impl BASE0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _BASE0W < 'a > { w : & 'a mut W , } impl < 'a > _BASE0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Base address 0" ] # [ inline ] pub fn base0 ( & self ) -> BASE0R { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; BASE0R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Base address 0" ] # [ inline ] pub fn base0 ( & mut self ) -> _BASE0W { _BASE0W { w : self } } } } # [ doc = "Base address 1" ] pub struct BASE1 { register : VolatileCell < u32 > } # [ doc = "Base address 1" ] pub mod base1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BASE1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct BASE1R { bits : u32 , } impl BASE1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _BASE1W < 'a > { w : & 'a mut W , } impl < 'a > _BASE1W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Base address 1" ] # [ inline ] pub fn base1 ( & self ) -> BASE1R { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; BASE1R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Base address 1" ] # [ inline ] pub fn base1 ( & mut self ) -> _BASE1W { _BASE1W { w : self } } } } # [ doc = "Prefixes bytes for logical addresses 0-3" ] pub struct PREFIX0 { register : VolatileCell < u32 > } # [ doc = "Prefixes bytes for logical addresses 0-3" ] pub mod prefix0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PREFIX0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct AP0R { bits : u8 , } impl AP0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP1R { bits : u8 , } impl AP1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP2R { bits : u8 , } impl AP2R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP3R { bits : u8 , } impl AP3R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _AP0W < 'a > { w : & 'a mut W , } impl < 'a > _AP0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP1W < 'a > { w : & 'a mut W , } impl < 'a > _AP1W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP2W < 'a > { w : & 'a mut W , } impl < 'a > _AP2W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP3W < 'a > { w : & 'a mut W , } impl < 'a > _AP3W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Address prefix 0." ] # [ inline ] pub fn ap0 ( & self ) -> AP0R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP0R { bits } } # [ doc = "Bits 8:15 - Address prefix 1." ] # [ inline ] pub fn ap1 ( & self ) -> AP1R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP1R { bits } } # [ doc = "Bits 16:23 - Address prefix 2." ] # [ inline ] pub fn ap2 ( & self ) -> AP2R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP2R { bits } } # [ doc = "Bits 24:31 - Address prefix 3." ] # [ inline ] pub fn ap3 ( & self ) -> AP3R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP3R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Address prefix 0." ] # [ inline ] pub fn ap0 ( & mut self ) -> _AP0W { _AP0W { w : self } } # [ doc = "Bits 8:15 - Address prefix 1." ] # [ inline ] pub fn ap1 ( & mut self ) -> _AP1W { _AP1W { w : self } } # [ doc = "Bits 16:23 - Address prefix 2." ] # [ inline ] pub fn ap2 ( & mut self ) -> _AP2W { _AP2W { w : self } } # [ doc = "Bits 24:31 - Address prefix 3." ] # [ inline ] pub fn ap3 ( & mut self ) -> _AP3W { _AP3W { w : self } } } } # [ doc = "Prefixes bytes for logical addresses 4-7" ] pub struct PREFIX1 { register : VolatileCell < u32 > } # [ doc = "Prefixes bytes for logical addresses 4-7" ] pub mod prefix1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PREFIX1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct AP4R { bits : u8 , } impl AP4R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP5R { bits : u8 , } impl AP5R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP6R { bits : u8 , } impl AP6R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct AP7R { bits : u8 , } impl AP7R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _AP4W < 'a > { w : & 'a mut W , } impl < 'a > _AP4W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP5W < 'a > { w : & 'a mut W , } impl < 'a > _AP5W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP6W < 'a > { w : & 'a mut W , } impl < 'a > _AP6W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _AP7W < 'a > { w : & 'a mut W , } impl < 'a > _AP7W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Address prefix 4." ] # [ inline ] pub fn ap4 ( & self ) -> AP4R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP4R { bits } } # [ doc = "Bits 8:15 - Address prefix 5." ] # [ inline ] pub fn ap5 ( & self ) -> AP5R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP5R { bits } } # [ doc = "Bits 16:23 - Address prefix 6." ] # [ inline ] pub fn ap6 ( & self ) -> AP6R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP6R { bits } } # [ doc = "Bits 24:31 - Address prefix 7." ] # [ inline ] pub fn ap7 ( & self ) -> AP7R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; AP7R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Address prefix 4." ] # [ inline ] pub fn ap4 ( & mut self ) -> _AP4W { _AP4W { w : self } } # [ doc = "Bits 8:15 - Address prefix 5." ] # [ inline ] pub fn ap5 ( & mut self ) -> _AP5W { _AP5W { w : self } } # [ doc = "Bits 16:23 - Address prefix 6." ] # [ inline ] pub fn ap6 ( & mut self ) -> _AP6W { _AP6W { w : self } } # [ doc = "Bits 24:31 - Address prefix 7." ] # [ inline ] pub fn ap7 ( & mut self ) -> _AP7W { _AP7W { w : self } } } } # [ doc = "Transmit address select" ] pub struct TXADDRESS { register : VolatileCell < u32 > } # [ doc = "Transmit address select" ] pub mod txaddress { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TXADDRESS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct TXADDRESSR { bits : u8 , } impl TXADDRESSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _TXADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _TXADDRESSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Transmit address select" ] # [ inline ] pub fn txaddress ( & self ) -> TXADDRESSR { let bits = { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; TXADDRESSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Transmit address select" ] # [ inline ] pub fn txaddress ( & mut self ) -> _TXADDRESSW { _TXADDRESSW { w : self } } } } # [ doc = "Receive address select" ] pub struct RXADDRESSES { register : VolatileCell < u32 > } # [ doc = "Receive address select" ] pub mod rxaddresses { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RXADDRESSES { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ADDR0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR0R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR0R :: DISABLED => false , ADDR0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR0R { match value { false => ADDR0R :: DISABLED , true => ADDR0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR0R :: ENABLED } } # [ doc = "Possible values of the field `ADDR1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR1R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR1R :: DISABLED => false , ADDR1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR1R { match value { false => ADDR1R :: DISABLED , true => ADDR1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR1R :: ENABLED } } # [ doc = "Possible values of the field `ADDR2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR2R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR2R :: DISABLED => false , ADDR2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR2R { match value { false => ADDR2R :: DISABLED , true => ADDR2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR2R :: ENABLED } } # [ doc = "Possible values of the field `ADDR3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR3R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR3R :: DISABLED => false , ADDR3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR3R { match value { false => ADDR3R :: DISABLED , true => ADDR3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR3R :: ENABLED } } # [ doc = "Possible values of the field `ADDR4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR4R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR4R :: DISABLED => false , ADDR4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR4R { match value { false => ADDR4R :: DISABLED , true => ADDR4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR4R :: ENABLED } } # [ doc = "Possible values of the field `ADDR5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR5R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR5R :: DISABLED => false , ADDR5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR5R { match value { false => ADDR5R :: DISABLED , true => ADDR5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR5R :: ENABLED } } # [ doc = "Possible values of the field `ADDR6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR6R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR6R :: DISABLED => false , ADDR6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR6R { match value { false => ADDR6R :: DISABLED , true => ADDR6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR6R :: ENABLED } } # [ doc = "Possible values of the field `ADDR7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDR7R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDR7R :: DISABLED => false , ADDR7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDR7R { match value { false => ADDR7R :: DISABLED , true => ADDR7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDR7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDR7R :: ENABLED } } # [ doc = "Values that can be written to the field `ADDR0`" ] pub enum ADDR0W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR0W :: DISABLED => false , ADDR0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR0W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR0W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR1`" ] pub enum ADDR1W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR1W :: DISABLED => false , ADDR1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR1W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR1W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR2`" ] pub enum ADDR2W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR2W :: DISABLED => false , ADDR2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR2W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR2W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR3`" ] pub enum ADDR3W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR3W :: DISABLED => false , ADDR3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR3W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR3W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR4`" ] pub enum ADDR4W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR4W :: DISABLED => false , ADDR4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR4W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR4W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR5`" ] pub enum ADDR5W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR5W :: DISABLED => false , ADDR5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR5W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR5W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR6`" ] pub enum ADDR6W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR6W :: DISABLED => false , ADDR6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR6W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR6W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDR7`" ] pub enum ADDR7W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ADDR7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDR7W :: DISABLED => false , ADDR7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDR7W < 'a > { w : & 'a mut W , } impl < 'a > _ADDR7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDR7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDR7W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDR7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable reception on logical address 0." ] # [ inline ] pub fn addr0 ( & self ) -> ADDR0R { ADDR0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable reception on logical address 1." ] # [ inline ] pub fn addr1 ( & self ) -> ADDR1R { ADDR1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable reception on logical address 2." ] # [ inline ] pub fn addr2 ( & self ) -> ADDR2R { ADDR2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable reception on logical address 3." ] # [ inline ] pub fn addr3 ( & self ) -> ADDR3R { ADDR3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable reception on logical address 4." ] # [ inline ] pub fn addr4 ( & self ) -> ADDR4R { ADDR4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable reception on logical address 5." ] # [ inline ] pub fn addr5 ( & self ) -> ADDR5R { ADDR5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable reception on logical address 6." ] # [ inline ] pub fn addr6 ( & self ) -> ADDR6R { ADDR6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable reception on logical address 7." ] # [ inline ] pub fn addr7 ( & self ) -> ADDR7R { ADDR7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable reception on logical address 0." ] # [ inline ] pub fn addr0 ( & mut self ) -> _ADDR0W { _ADDR0W { w : self } } # [ doc = "Bit 1 - Enable or disable reception on logical address 1." ] # [ inline ] pub fn addr1 ( & mut self ) -> _ADDR1W { _ADDR1W { w : self } } # [ doc = "Bit 2 - Enable or disable reception on logical address 2." ] # [ inline ] pub fn addr2 ( & mut self ) -> _ADDR2W { _ADDR2W { w : self } } # [ doc = "Bit 3 - Enable or disable reception on logical address 3." ] # [ inline ] pub fn addr3 ( & mut self ) -> _ADDR3W { _ADDR3W { w : self } } # [ doc = "Bit 4 - Enable or disable reception on logical address 4." ] # [ inline ] pub fn addr4 ( & mut self ) -> _ADDR4W { _ADDR4W { w : self } } # [ doc = "Bit 5 - Enable or disable reception on logical address 5." ] # [ inline ] pub fn addr5 ( & mut self ) -> _ADDR5W { _ADDR5W { w : self } } # [ doc = "Bit 6 - Enable or disable reception on logical address 6." ] # [ inline ] pub fn addr6 ( & mut self ) -> _ADDR6W { _ADDR6W { w : self } } # [ doc = "Bit 7 - Enable or disable reception on logical address 7." ] # [ inline ] pub fn addr7 ( & mut self ) -> _ADDR7W { _ADDR7W { w : self } } } } # [ doc = "CRC configuration" ] pub struct CRCCNF { register : VolatileCell < u32 > } # [ doc = "CRC configuration" ] pub mod crccnf { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CRCCNF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `LEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LENR { # [ doc = "CRC length is zero and CRC calculation is disabled" ] DISABLED , # [ doc = "CRC length is one byte and CRC calculation is enabled" ] ONE , # [ doc = "CRC length is two bytes and CRC calculation is enabled" ] TWO , # [ doc = "CRC length is three bytes and CRC calculation is enabled" ] THREE } impl LENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { LENR :: DISABLED => 0 , LENR :: ONE => 0x01 , LENR :: TWO => 0x02 , LENR :: THREE => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> LENR { match value { 0 => LENR :: DISABLED , 1 => LENR :: ONE , 2 => LENR :: TWO , 3 => LENR :: THREE , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LENR :: DISABLED } # [ doc = "Checks if the value of the field is `ONE`" ] # [ inline ] pub fn is_one ( & self ) -> bool { * self == LENR :: ONE } # [ doc = "Checks if the value of the field is `TWO`" ] # [ inline ] pub fn is_two ( & self ) -> bool { * self == LENR :: TWO } # [ doc = "Checks if the value of the field is `THREE`" ] # [ inline ] pub fn is_three ( & self ) -> bool { * self == LENR :: THREE } } # [ doc = "Possible values of the field `SKIPADDR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SKIPADDRR { # [ doc = "CRC calculation includes address field" ] INCLUDE , # [ doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address." ] SKIP } impl SKIPADDRR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SKIPADDRR :: INCLUDE => false , SKIPADDRR :: SKIP => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SKIPADDRR { match value { false => SKIPADDRR :: INCLUDE , true => SKIPADDRR :: SKIP , } } # [ doc = "Checks if the value of the field is `INCLUDE`" ] # [ inline ] pub fn is_include ( & self ) -> bool { * self == SKIPADDRR :: INCLUDE } # [ doc = "Checks if the value of the field is `SKIP`" ] # [ inline ] pub fn is_skip ( & self ) -> bool { * self == SKIPADDRR :: SKIP } } # [ doc = "Values that can be written to the field `LEN`" ] pub enum LENW { # [ doc = "CRC length is zero and CRC calculation is disabled" ] DISABLED , # [ doc = "CRC length is one byte and CRC calculation is enabled" ] ONE , # [ doc = "CRC length is two bytes and CRC calculation is enabled" ] TWO , # [ doc = "CRC length is three bytes and CRC calculation is enabled" ] THREE } impl LENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { LENW :: DISABLED => 0 , LENW :: ONE => 1 , LENW :: TWO => 2 , LENW :: THREE => 3 } } } # [ doc = r" Proxy" ] pub struct _LENW < 'a > { w : & 'a mut W , } impl < 'a > _LENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LENW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "CRC length is zero and CRC calculation is disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LENW :: DISABLED ) } # [ doc = "CRC length is one byte and CRC calculation is enabled" ] # [ inline ] pub fn one ( self ) -> & 'a mut W { self . variant ( LENW :: ONE ) } # [ doc = "CRC length is two bytes and CRC calculation is enabled" ] # [ inline ] pub fn two ( self ) -> & 'a mut W { self . variant ( LENW :: TWO ) } # [ doc = "CRC length is three bytes and CRC calculation is enabled" ] # [ inline ] pub fn three ( self ) -> & 'a mut W { self . variant ( LENW :: THREE ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SKIPADDR`" ] pub enum SKIPADDRW { # [ doc = "CRC calculation includes address field" ] INCLUDE , # [ doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address." ] SKIP } impl SKIPADDRW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SKIPADDRW :: INCLUDE => false , SKIPADDRW :: SKIP => true } } } # [ doc = r" Proxy" ] pub struct _SKIPADDRW < 'a > { w : & 'a mut W , } impl < 'a > _SKIPADDRW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SKIPADDRW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "CRC calculation includes address field" ] # [ inline ] pub fn include ( self ) -> & 'a mut W { self . variant ( SKIPADDRW :: INCLUDE ) } # [ doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address." ] # [ inline ] pub fn skip ( self ) -> & 'a mut W { self . variant ( SKIPADDRW :: SKIP ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - CRC length in number of bytes." ] # [ inline ] pub fn len ( & self ) -> LENR { LENR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 8 - Include or exclude packet address field out of CRC calculation." ] # [ inline ] pub fn skipaddr ( & self ) -> SKIPADDRR { SKIPADDRR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - CRC length in number of bytes." ] # [ inline ] pub fn len ( & mut self ) -> _LENW { _LENW { w : self } } # [ doc = "Bit 8 - Include or exclude packet address field out of CRC calculation." ] # [ inline ] pub fn skipaddr ( & mut self ) -> _SKIPADDRW { _SKIPADDRW { w : self } } } } # [ doc = "CRC polynomial" ] pub struct CRCPOLY { register : VolatileCell < u32 > } # [ doc = "CRC polynomial" ] pub mod crcpoly { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CRCPOLY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CRCPOLYR { bits : u32 , } impl CRCPOLYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CRCPOLYW < 'a > { w : & 'a mut W , } impl < 'a > _CRCPOLYW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:23 - CRC polynomial" ] # [ inline ] pub fn crcpoly ( & self ) -> CRCPOLYR { let bits = { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CRCPOLYR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:23 - CRC polynomial" ] # [ inline ] pub fn crcpoly ( & mut self ) -> _CRCPOLYW { _CRCPOLYW { w : self } } } } # [ doc = "CRC initial value" ] pub struct CRCINIT { register : VolatileCell < u32 > } # [ doc = "CRC initial value" ] pub mod crcinit { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CRCINIT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CRCINITR { bits : u32 , } impl CRCINITR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CRCINITW < 'a > { w : & 'a mut W , } impl < 'a > _CRCINITW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:23 - CRC initial value" ] # [ inline ] pub fn crcinit ( & self ) -> CRCINITR { let bits = { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CRCINITR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:23 - CRC initial value" ] # [ inline ] pub fn crcinit ( & mut self ) -> _CRCINITW { _CRCINITW { w : self } } } } # [ doc = "Unspecified" ] pub struct UNUSED0 { register : VolatileCell < u32 > } # [ doc = "Unspecified" ] pub mod unused0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: UNUSED0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Inter Frame Spacing in us" ] pub struct TIFS { register : VolatileCell < u32 > } # [ doc = "Inter Frame Spacing in us" ] pub mod tifs { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TIFS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct TIFSR { bits : u8 , } impl TIFSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _TIFSW < 'a > { w : & 'a mut W , } impl < 'a > _TIFSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Inter Frame Spacing in us" ] # [ inline ] pub fn tifs ( & self ) -> TIFSR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; TIFSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Inter Frame Spacing in us" ] # [ inline ] pub fn tifs ( & mut self ) -> _TIFSW { _TIFSW { w : self } } } } # [ doc = "RSSI sample" ] pub struct RSSISAMPLE { register : VolatileCell < u32 > } # [ doc = "RSSI sample" ] pub mod rssisample { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RSSISAMPLE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RSSISAMPLER { bits : u8 , } impl RSSISAMPLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - RSSI sample" ] # [ inline ] pub fn rssisample ( & self ) -> RSSISAMPLER { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RSSISAMPLER { bits } } } } # [ doc = "Current radio state" ] pub struct STATE { register : VolatileCell < u32 > } # [ doc = "Current radio state" ] pub mod state { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: STATE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `STATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATER { # [ doc = "RADIO is in the Disabled state" ] DISABLED , # [ doc = "RADIO is in the RXRU state" ] RXRU , # [ doc = "RADIO is in the RXIDLE state" ] RXIDLE , # [ doc = "RADIO is in the RX state" ] RX , # [ doc = "RADIO is in the RXDISABLED state" ] RXDISABLE , # [ doc = "RADIO is in the TXRU state" ] TXRU , # [ doc = "RADIO is in the TXIDLE state" ] TXIDLE , # [ doc = "RADIO is in the TX state" ] TX , # [ doc = "RADIO is in the TXDISABLED state" ] TXDISABLE , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl STATER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { STATER :: DISABLED => 0 , STATER :: RXRU => 0x01 , STATER :: RXIDLE => 0x02 , STATER :: RX => 0x03 , STATER :: RXDISABLE => 0x04 , STATER :: TXRU => 0x09 , STATER :: TXIDLE => 0x0a , STATER :: TX => 0x0b , STATER :: TXDISABLE => 0x0c , STATER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> STATER { match value { 0 => STATER :: DISABLED , 1 => STATER :: RXRU , 2 => STATER :: RXIDLE , 3 => STATER :: RX , 4 => STATER :: RXDISABLE , 9 => STATER :: TXRU , 10 => STATER :: TXIDLE , 11 => STATER :: TX , 12 => STATER :: TXDISABLE , i => STATER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STATER :: DISABLED } # [ doc = "Checks if the value of the field is `RXRU`" ] # [ inline ] pub fn is_rx_ru ( & self ) -> bool { * self == STATER :: RXRU } # [ doc = "Checks if the value of the field is `RXIDLE`" ] # [ inline ] pub fn is_rx_idle ( & self ) -> bool { * self == STATER :: RXIDLE } # [ doc = "Checks if the value of the field is `RX`" ] # [ inline ] pub fn is_rx ( & self ) -> bool { * self == STATER :: RX } # [ doc = "Checks if the value of the field is `RXDISABLE`" ] # [ inline ] pub fn is_rx_disable ( & self ) -> bool { * self == STATER :: RXDISABLE } # [ doc = "Checks if the value of the field is `TXRU`" ] # [ inline ] pub fn is_tx_ru ( & self ) -> bool { * self == STATER :: TXRU } # [ doc = "Checks if the value of the field is `TXIDLE`" ] # [ inline ] pub fn is_tx_idle ( & self ) -> bool { * self == STATER :: TXIDLE } # [ doc = "Checks if the value of the field is `TX`" ] # [ inline ] pub fn is_tx ( & self ) -> bool { * self == STATER :: TX } # [ doc = "Checks if the value of the field is `TXDISABLE`" ] # [ inline ] pub fn is_tx_disable ( & self ) -> bool { * self == STATER :: TXDISABLE } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Current radio state" ] # [ inline ] pub fn state ( & self ) -> STATER { STATER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } } # [ doc = "Data whitening initial value" ] pub struct DATAWHITEIV { register : VolatileCell < u32 > } # [ doc = "Data whitening initial value" ] pub mod datawhiteiv { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DATAWHITEIV { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct DATAWHITEIVR { bits : u8 , } impl DATAWHITEIVR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _DATAWHITEIVW < 'a > { w : & 'a mut W , } impl < 'a > _DATAWHITEIVW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'." ] # [ inline ] pub fn datawhiteiv ( & self ) -> DATAWHITEIVR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; DATAWHITEIVR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x40 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'." ] # [ inline ] pub fn datawhiteiv ( & mut self ) -> _DATAWHITEIVW { _DATAWHITEIVW { w : self } } } } # [ doc = "Bit counter compare" ] pub struct BCC { register : VolatileCell < u32 > } # [ doc = "Bit counter compare" ] pub mod bcc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BCC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct BCCR { bits : u32 , } impl BCCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _BCCW < 'a > { w : & 'a mut W , } impl < 'a > _BCCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Bit counter compare" ] # [ inline ] pub fn bcc ( & self ) -> BCCR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; BCCR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Bit counter compare" ] # [ inline ] pub fn bcc ( & mut self ) -> _BCCW { _BCCW { w : self } } } } # [ doc = "Description collection[0]: Device address base segment 0" ] pub struct DAB { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Device address base segment 0" ] pub mod dab { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DAB { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct DABR { bits : u32 , } impl DABR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _DABW < 'a > { w : & 'a mut W , } impl < 'a > _DABW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Device address base segment 0" ] # [ inline ] pub fn dab ( & self ) -> DABR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; DABR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Device address base segment 0" ] # [ inline ] pub fn dab ( & mut self ) -> _DABW { _DABW { w : self } } } } # [ doc = "Description collection[0]: Device address prefix 0" ] pub struct DAP { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Device address prefix 0" ] pub mod dap { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DAP { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct DAPR { bits : u16 , } impl DAPR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _DAPW < 'a > { w : & 'a mut W , } impl < 'a > _DAPW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:15 - Device address prefix 0" ] # [ inline ] pub fn dap ( & self ) -> DAPR { let bits = { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; DAPR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:15 - Device address prefix 0" ] # [ inline ] pub fn dap ( & mut self ) -> _DAPW { _DAPW { w : self } } } } # [ doc = "Device address match configuration" ] pub struct DACNF { register : VolatileCell < u32 > } # [ doc = "Device address match configuration" ] pub mod dacnf { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DACNF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENA0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA0R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA0R :: DISABLED => false , ENA0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA0R { match value { false => ENA0R :: DISABLED , true => ENA0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA0R :: ENABLED } } # [ doc = "Possible values of the field `ENA1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA1R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA1R :: DISABLED => false , ENA1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA1R { match value { false => ENA1R :: DISABLED , true => ENA1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA1R :: ENABLED } } # [ doc = "Possible values of the field `ENA2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA2R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA2R :: DISABLED => false , ENA2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA2R { match value { false => ENA2R :: DISABLED , true => ENA2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA2R :: ENABLED } } # [ doc = "Possible values of the field `ENA3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA3R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA3R :: DISABLED => false , ENA3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA3R { match value { false => ENA3R :: DISABLED , true => ENA3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA3R :: ENABLED } } # [ doc = "Possible values of the field `ENA4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA4R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA4R :: DISABLED => false , ENA4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA4R { match value { false => ENA4R :: DISABLED , true => ENA4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA4R :: ENABLED } } # [ doc = "Possible values of the field `ENA5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA5R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA5R :: DISABLED => false , ENA5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA5R { match value { false => ENA5R :: DISABLED , true => ENA5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA5R :: ENABLED } } # [ doc = "Possible values of the field `ENA6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA6R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA6R :: DISABLED => false , ENA6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA6R { match value { false => ENA6R :: DISABLED , true => ENA6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA6R :: ENABLED } } # [ doc = "Possible values of the field `ENA7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENA7R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENA7R :: DISABLED => false , ENA7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENA7R { match value { false => ENA7R :: DISABLED , true => ENA7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENA7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENA7R :: ENABLED } } # [ doc = r" Value of the field" ] pub struct TXADD0R { bits : bool , } impl TXADD0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD1R { bits : bool , } impl TXADD1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD2R { bits : bool , } impl TXADD2R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD3R { bits : bool , } impl TXADD3R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD4R { bits : bool , } impl TXADD4R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD5R { bits : bool , } impl TXADD5R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD6R { bits : bool , } impl TXADD6R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct TXADD7R { bits : bool , } impl TXADD7R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = "Values that can be written to the field `ENA0`" ] pub enum ENA0W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA0W :: DISABLED => false , ENA0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA0W < 'a > { w : & 'a mut W , } impl < 'a > _ENA0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA0W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA1`" ] pub enum ENA1W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA1W :: DISABLED => false , ENA1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA1W < 'a > { w : & 'a mut W , } impl < 'a > _ENA1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA1W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA2`" ] pub enum ENA2W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA2W :: DISABLED => false , ENA2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA2W < 'a > { w : & 'a mut W , } impl < 'a > _ENA2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA2W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA3`" ] pub enum ENA3W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA3W :: DISABLED => false , ENA3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA3W < 'a > { w : & 'a mut W , } impl < 'a > _ENA3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA3W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA4`" ] pub enum ENA4W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA4W :: DISABLED => false , ENA4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA4W < 'a > { w : & 'a mut W , } impl < 'a > _ENA4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA4W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA5`" ] pub enum ENA5W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA5W :: DISABLED => false , ENA5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA5W < 'a > { w : & 'a mut W , } impl < 'a > _ENA5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA5W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA6`" ] pub enum ENA6W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA6W :: DISABLED => false , ENA6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA6W < 'a > { w : & 'a mut W , } impl < 'a > _ENA6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA6W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENA7`" ] pub enum ENA7W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ENA7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENA7W :: DISABLED => false , ENA7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENA7W < 'a > { w : & 'a mut W , } impl < 'a > _ENA7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENA7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENA7W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENA7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD0W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD0W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD1W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD1W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD2W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD2W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD3W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD3W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD4W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD4W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD5W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD5W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD6W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD6W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _TXADD7W < 'a > { w : & 'a mut W , } impl < 'a > _TXADD7W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable device address matching using device address 0" ] # [ inline ] pub fn ena0 ( & self ) -> ENA0R { ENA0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable device address matching using device address 1" ] # [ inline ] pub fn ena1 ( & self ) -> ENA1R { ENA1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable device address matching using device address 2" ] # [ inline ] pub fn ena2 ( & self ) -> ENA2R { ENA2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable device address matching using device address 3" ] # [ inline ] pub fn ena3 ( & self ) -> ENA3R { ENA3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable device address matching using device address 4" ] # [ inline ] pub fn ena4 ( & self ) -> ENA4R { ENA4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable device address matching using device address 5" ] # [ inline ] pub fn ena5 ( & self ) -> ENA5R { ENA5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable device address matching using device address 6" ] # [ inline ] pub fn ena6 ( & self ) -> ENA6R { ENA6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable device address matching using device address 7" ] # [ inline ] pub fn ena7 ( & self ) -> ENA7R { ENA7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - TxAdd for device address 0" ] # [ inline ] pub fn txadd0 ( & self ) -> TXADD0R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD0R { bits } } # [ doc = "Bit 9 - TxAdd for device address 1" ] # [ inline ] pub fn txadd1 ( & self ) -> TXADD1R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD1R { bits } } # [ doc = "Bit 10 - TxAdd for device address 2" ] # [ inline ] pub fn txadd2 ( & self ) -> TXADD2R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD2R { bits } } # [ doc = "Bit 11 - TxAdd for device address 3" ] # [ inline ] pub fn txadd3 ( & self ) -> TXADD3R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD3R { bits } } # [ doc = "Bit 12 - TxAdd for device address 4" ] # [ inline ] pub fn txadd4 ( & self ) -> TXADD4R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD4R { bits } } # [ doc = "Bit 13 - TxAdd for device address 5" ] # [ inline ] pub fn txadd5 ( & self ) -> TXADD5R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD5R { bits } } # [ doc = "Bit 14 - TxAdd for device address 6" ] # [ inline ] pub fn txadd6 ( & self ) -> TXADD6R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD6R { bits } } # [ doc = "Bit 15 - TxAdd for device address 7" ] # [ inline ] pub fn txadd7 ( & self ) -> TXADD7R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; TXADD7R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable device address matching using device address 0" ] # [ inline ] pub fn ena0 ( & mut self ) -> _ENA0W { _ENA0W { w : self } } # [ doc = "Bit 1 - Enable or disable device address matching using device address 1" ] # [ inline ] pub fn ena1 ( & mut self ) -> _ENA1W { _ENA1W { w : self } } # [ doc = "Bit 2 - Enable or disable device address matching using device address 2" ] # [ inline ] pub fn ena2 ( & mut self ) -> _ENA2W { _ENA2W { w : self } } # [ doc = "Bit 3 - Enable or disable device address matching using device address 3" ] # [ inline ] pub fn ena3 ( & mut self ) -> _ENA3W { _ENA3W { w : self } } # [ doc = "Bit 4 - Enable or disable device address matching using device address 4" ] # [ inline ] pub fn ena4 ( & mut self ) -> _ENA4W { _ENA4W { w : self } } # [ doc = "Bit 5 - Enable or disable device address matching using device address 5" ] # [ inline ] pub fn ena5 ( & mut self ) -> _ENA5W { _ENA5W { w : self } } # [ doc = "Bit 6 - Enable or disable device address matching using device address 6" ] # [ inline ] pub fn ena6 ( & mut self ) -> _ENA6W { _ENA6W { w : self } } # [ doc = "Bit 7 - Enable or disable device address matching using device address 7" ] # [ inline ] pub fn ena7 ( & mut self ) -> _ENA7W { _ENA7W { w : self } } # [ doc = "Bit 8 - TxAdd for device address 0" ] # [ inline ] pub fn txadd0 ( & mut self ) -> _TXADD0W { _TXADD0W { w : self } } # [ doc = "Bit 9 - TxAdd for device address 1" ] # [ inline ] pub fn txadd1 ( & mut self ) -> _TXADD1W { _TXADD1W { w : self } } # [ doc = "Bit 10 - TxAdd for device address 2" ] # [ inline ] pub fn txadd2 ( & mut self ) -> _TXADD2W { _TXADD2W { w : self } } # [ doc = "Bit 11 - TxAdd for device address 3" ] # [ inline ] pub fn txadd3 ( & mut self ) -> _TXADD3W { _TXADD3W { w : self } } # [ doc = "Bit 12 - TxAdd for device address 4" ] # [ inline ] pub fn txadd4 ( & mut self ) -> _TXADD4W { _TXADD4W { w : self } } # [ doc = "Bit 13 - TxAdd for device address 5" ] # [ inline ] pub fn txadd5 ( & mut self ) -> _TXADD5W { _TXADD5W { w : self } } # [ doc = "Bit 14 - TxAdd for device address 6" ] # [ inline ] pub fn txadd6 ( & mut self ) -> _TXADD6W { _TXADD6W { w : self } } # [ doc = "Bit 15 - TxAdd for device address 7" ] # [ inline ] pub fn txadd7 ( & mut self ) -> _TXADD7W { _TXADD7W { w : self } } } } # [ doc = "Radio mode configuration register 0" ] pub struct MODECNF0 { register : VolatileCell < u32 > } # [ doc = "Radio mode configuration register 0" ] pub mod modecnf0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODECNF0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RU`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RUR { # [ doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51" ] DEFAULT , # [ doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information" ] FAST } impl RUR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RUR :: DEFAULT => false , RUR :: FAST => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RUR { match value { false => RUR :: DEFAULT , true => RUR :: FAST , } } # [ doc = "Checks if the value of the field is `DEFAULT`" ] # [ inline ] pub fn is_default ( & self ) -> bool { * self == RUR :: DEFAULT } # [ doc = "Checks if the value of the field is `FAST`" ] # [ inline ] pub fn is_fast ( & self ) -> bool { * self == RUR :: FAST } } # [ doc = "Possible values of the field `DTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DTXR { # [ doc = "Transmit '1'" ] B1 , # [ doc = "Transmit '0'" ] B0 , # [ doc = "Transmit center frequency" ] CENTER , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl DTXR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { DTXR :: B1 => 0 , DTXR :: B0 => 0x01 , DTXR :: CENTER => 0x02 , DTXR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> DTXR { match value { 0 => DTXR :: B1 , 1 => DTXR :: B0 , 2 => DTXR :: CENTER , i => DTXR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `B1`" ] # [ inline ] pub fn is_b1 ( & self ) -> bool { * self == DTXR :: B1 } # [ doc = "Checks if the value of the field is `B0`" ] # [ inline ] pub fn is_b0 ( & self ) -> bool { * self == DTXR :: B0 } # [ doc = "Checks if the value of the field is `CENTER`" ] # [ inline ] pub fn is_center ( & self ) -> bool { * self == DTXR :: CENTER } } # [ doc = "Values that can be written to the field `RU`" ] pub enum RUW { # [ doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51" ] DEFAULT , # [ doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information" ] FAST } impl RUW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RUW :: DEFAULT => false , RUW :: FAST => true } } } # [ doc = r" Proxy" ] pub struct _RUW < 'a > { w : & 'a mut W , } impl < 'a > _RUW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RUW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51" ] # [ inline ] pub fn default ( self ) -> & 'a mut W { self . variant ( RUW :: DEFAULT ) } # [ doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information" ] # [ inline ] pub fn fast ( self ) -> & 'a mut W { self . variant ( RUW :: FAST ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DTX`" ] pub enum DTXW { # [ doc = "Transmit '1'" ] B1 , # [ doc = "Transmit '0'" ] B0 , # [ doc = "Transmit center frequency" ] CENTER } impl DTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { DTXW :: B1 => 0 , DTXW :: B0 => 1 , DTXW :: CENTER => 2 } } } # [ doc = r" Proxy" ] pub struct _DTXW < 'a > { w : & 'a mut W , } impl < 'a > _DTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DTXW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Transmit '1'" ] # [ inline ] pub fn b1 ( self ) -> & 'a mut W { self . variant ( DTXW :: B1 ) } # [ doc = "Transmit '0'" ] # [ inline ] pub fn b0 ( self ) -> & 'a mut W { self . variant ( DTXW :: B0 ) } # [ doc = "Transmit center frequency" ] # [ inline ] pub fn center ( self ) -> & 'a mut W { self . variant ( DTXW :: CENTER ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Radio ramp-up time" ] # [ inline ] pub fn ru ( & self ) -> RUR { RUR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 8:9 - Default TX value" ] # [ inline ] pub fn dtx ( & self ) -> DTXR { DTXR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0200 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Radio ramp-up time" ] # [ inline ] pub fn ru ( & mut self ) -> _RUW { _RUW { w : self } } # [ doc = "Bits 8:9 - Default TX value" ] # [ inline ] pub fn dtx ( & mut self ) -> _DTXW { _DTXW { w : self } } } } # [ doc = "Peripheral power control" ] pub struct POWER { register : VolatileCell < u32 > } # [ doc = "Peripheral power control" ] pub mod power { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: POWER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `POWER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POWERR { # [ doc = "Peripheral is powered off" ] DISABLED , # [ doc = "Peripheral is powered on" ] ENABLED } impl POWERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { POWERR :: DISABLED => false , POWERR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> POWERR { match value { false => POWERR :: DISABLED , true => POWERR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == POWERR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == POWERR :: ENABLED } } # [ doc = "Values that can be written to the field `POWER`" ] pub enum POWERW { # [ doc = "Peripheral is powered off" ] DISABLED , # [ doc = "Peripheral is powered on" ] ENABLED } impl POWERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { POWERW :: DISABLED => false , POWERW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _POWERW < 'a > { w : & 'a mut W , } impl < 'a > _POWERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : POWERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Peripheral is powered off" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( POWERW :: DISABLED ) } # [ doc = "Peripheral is powered on" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( POWERW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again." ] # [ inline ] pub fn power ( & self ) -> POWERR { POWERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again." ] # [ inline ] pub fn power ( & mut self ) -> _POWERW { _POWERW { w : self } } } } } # [ doc = "UART with EasyDMA" ] pub struct UARTE0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UARTE0 { } impl UARTE0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const uarte0 :: RegisterBlock { 0x4000_2000 as * const _ } } impl Deref for UARTE0 { type Target = uarte0 :: RegisterBlock ; fn deref ( & self ) -> & uarte0 :: RegisterBlock { unsafe { & * UARTE0 :: ptr ( ) } } } # [ doc = "UART with EasyDMA" ] pub mod uarte0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start UART receiver" ] pub tasks_startrx : TASKS_STARTRX , # [ doc = "0x04 - Stop UART receiver" ] pub tasks_stoprx : TASKS_STOPRX , # [ doc = "0x08 - Start UART transmitter" ] pub tasks_starttx : TASKS_STARTTX , # [ doc = "0x0c - Stop UART transmitter" ] pub tasks_stoptx : TASKS_STOPTX , _reserved0 : [ u8 ; 28usize ] , # [ doc = "0x2c - Flush RX FIFO into RX buffer" ] pub tasks_flushrx : TASKS_FLUSHRX , _reserved1 : [ u8 ; 208usize ] , # [ doc = "0x100 - CTS is activated (set low). Clear To Send." ] pub events_cts : EVENTS_CTS , # [ doc = "0x104 - CTS is deactivated (set high). Not Clear To Send." ] pub events_ncts : EVENTS_NCTS , # [ doc = "0x108 - Data received in RXD (but potentially not yet transferred to Data RAM)" ] pub events_rxdrdy : EVENTS_RXDRDY , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x110 - Receive buffer is filled up" ] pub events_endrx : EVENTS_ENDRX , _reserved3 : [ u8 ; 8usize ] , # [ doc = "0x11c - Data sent from TXD" ] pub events_txdrdy : EVENTS_TXDRDY , # [ doc = "0x120 - Last TX byte transmitted" ] pub events_endtx : EVENTS_ENDTX , # [ doc = "0x124 - Error detected" ] pub events_error : EVENTS_ERROR , _reserved4 : [ u8 ; 28usize ] , # [ doc = "0x144 - Receiver timeout" ] pub events_rxto : EVENTS_RXTO , _reserved5 : [ u8 ; 4usize ] , # [ doc = "0x14c - UART receiver has started" ] pub events_rxstarted : EVENTS_RXSTARTED , # [ doc = "0x150 - UART transmitter has started" ] pub events_txstarted : EVENTS_TXSTARTED , _reserved6 : [ u8 ; 4usize ] , # [ doc = "0x158 - Transmitter stopped" ] pub events_txstopped : EVENTS_TXSTOPPED , _reserved7 : [ u8 ; 164usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved8 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved9 : [ u8 ; 372usize ] , # [ doc = "0x480 - Error source" ] pub errorsrc : ERRORSRC , _reserved10 : [ u8 ; 124usize ] , # [ doc = "0x500 - Enable UART" ] pub enable : ENABLE , _reserved11 : [ u8 ; 32usize ] , # [ doc = "0x524 - Baud rate. Accuracy depends on the HFCLK source selected." ] pub baudrate : BAUDRATE , _reserved12 : [ u8 ; 68usize ] , # [ doc = "0x56c - Configuration of parity and hardware flow control" ] pub config : CONFIG , } # [ doc = "Start UART receiver" ] pub struct TASKS_STARTRX { register : VolatileCell < u32 > } # [ doc = "Start UART receiver" ] pub mod tasks_startrx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop UART receiver" ] pub struct TASKS_STOPRX { register : VolatileCell < u32 > } # [ doc = "Stop UART receiver" ] pub mod tasks_stoprx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOPRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start UART transmitter" ] pub struct TASKS_STARTTX { register : VolatileCell < u32 > } # [ doc = "Start UART transmitter" ] pub mod tasks_starttx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop UART transmitter" ] pub struct TASKS_STOPTX { register : VolatileCell < u32 > } # [ doc = "Stop UART transmitter" ] pub mod tasks_stoptx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOPTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Flush RX FIFO into RX buffer" ] pub struct TASKS_FLUSHRX { register : VolatileCell < u32 > } # [ doc = "Flush RX FIFO into RX buffer" ] pub mod tasks_flushrx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_FLUSHRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CTS is activated (set low). Clear To Send." ] pub struct EVENTS_CTS { register : VolatileCell < u32 > } # [ doc = "CTS is activated (set low). Clear To Send." ] pub mod events_cts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CTS is deactivated (set high). Not Clear To Send." ] pub struct EVENTS_NCTS { register : VolatileCell < u32 > } # [ doc = "CTS is deactivated (set high). Not Clear To Send." ] pub mod events_ncts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_NCTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Data received in RXD (but potentially not yet transferred to Data RAM)" ] pub struct EVENTS_RXDRDY { register : VolatileCell < u32 > } # [ doc = "Data received in RXD (but potentially not yet transferred to Data RAM)" ] pub mod events_rxdrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXDRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Receive buffer is filled up" ] pub struct EVENTS_ENDRX { register : VolatileCell < u32 > } # [ doc = "Receive buffer is filled up" ] pub mod events_endrx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDRX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Data sent from TXD" ] pub struct EVENTS_TXDRDY { register : VolatileCell < u32 > } # [ doc = "Data sent from TXD" ] pub mod events_txdrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXDRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Last TX byte transmitted" ] pub struct EVENTS_ENDTX { register : VolatileCell < u32 > } # [ doc = "Last TX byte transmitted" ] pub mod events_endtx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDTX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Error detected" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "Error detected" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Receiver timeout" ] pub struct EVENTS_RXTO { register : VolatileCell < u32 > } # [ doc = "Receiver timeout" ] pub mod events_rxto { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXTO { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "UART receiver has started" ] pub struct EVENTS_RXSTARTED { register : VolatileCell < u32 > } # [ doc = "UART receiver has started" ] pub mod events_rxstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "UART transmitter has started" ] pub struct EVENTS_TXSTARTED { register : VolatileCell < u32 > } # [ doc = "UART transmitter has started" ] pub mod events_txstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Transmitter stopped" ] pub struct EVENTS_TXSTOPPED { register : VolatileCell < u32 > } # [ doc = "Transmitter stopped" ] pub mod events_txstopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXSTOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDRX_STARTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRX_STARTRXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDRX_STARTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRX_STARTRXR :: DISABLED => false , ENDRX_STARTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRX_STARTRXR { match value { false => ENDRX_STARTRXR :: DISABLED , true => ENDRX_STARTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRX_STARTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRX_STARTRXR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX_STOPRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRX_STOPRXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDRX_STOPRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRX_STOPRXR :: DISABLED => false , ENDRX_STOPRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRX_STOPRXR { match value { false => ENDRX_STOPRXR :: DISABLED , true => ENDRX_STOPRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRX_STOPRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRX_STOPRXR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDRX_STARTRX`" ] pub enum ENDRX_STARTRXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDRX_STARTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRX_STARTRXW :: DISABLED => false , ENDRX_STARTRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDRX_STARTRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRX_STARTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRX_STARTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDRX_STARTRXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDRX_STARTRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX_STOPRX`" ] pub enum ENDRX_STOPRXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDRX_STOPRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRX_STOPRXW :: DISABLED => false , ENDRX_STOPRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDRX_STOPRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRX_STOPRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRX_STOPRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDRX_STOPRXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDRX_STOPRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 5 - Shortcut between ENDRX event and STARTRX task" ] # [ inline ] pub fn endrx_startrx ( & self ) -> ENDRX_STARTRXR { ENDRX_STARTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Shortcut between ENDRX event and STOPRX task" ] # [ inline ] pub fn endrx_stoprx ( & self ) -> ENDRX_STOPRXR { ENDRX_STOPRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 5 - Shortcut between ENDRX event and STARTRX task" ] # [ inline ] pub fn endrx_startrx ( & mut self ) -> _ENDRX_STARTRXW { _ENDRX_STARTRXW { w : self } } # [ doc = "Bit 6 - Shortcut between ENDRX event and STOPRX task" ] # [ inline ] pub fn endrx_stoprx ( & mut self ) -> _ENDRX_STOPRXW { _ENDRX_STOPRXW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTSR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTSR :: DISABLED => false , CTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTSR { match value { false => CTSR :: DISABLED , true => CTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTSR :: ENABLED } } # [ doc = "Possible values of the field `NCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTSR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl NCTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTSR :: DISABLED => false , NCTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTSR { match value { false => NCTSR :: DISABLED , true => NCTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTSR :: ENABLED } } # [ doc = "Possible values of the field `RXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDRDYR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDRDYR :: DISABLED => false , RXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDRDYR { match value { false => RXDRDYR :: DISABLED , true => RXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `TXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDRDYR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDRDYR :: DISABLED => false , TXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDRDYR { match value { false => TXDRDYR :: DISABLED , true => TXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTOR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXTOR :: DISABLED => false , RXTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXTOR { match value { false => RXTOR :: DISABLED , true => RXTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXTOR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTOPPEDR :: DISABLED => false , TXSTOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTOPPEDR { match value { false => TXSTOPPEDR :: DISABLED , true => TXSTOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTOPPEDR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS`" ] pub enum CTSW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTSW :: DISABLED => false , CTSW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CTSW < 'a > { w : & 'a mut W , } impl < 'a > _CTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CTSW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CTSW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS`" ] pub enum NCTSW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl NCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTSW :: DISABLED => false , NCTSW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _NCTSW < 'a > { w : & 'a mut W , } impl < 'a > _NCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( NCTSW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( NCTSW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDRDY`" ] pub enum RXDRDYW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDRDYW :: DISABLED => false , RXDRDYW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: DISABLED => false , ENDRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDRXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDRDY`" ] pub enum TXDRDYW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDRDYW :: DISABLED => false , TXDRDYW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _TXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: DISABLED => false , ENDTXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDTXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDTXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: DISABLED => false , ERRORW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXTO`" ] pub enum RXTOW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXTOW :: DISABLED => false , RXTOW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXTOW < 'a > { w : & 'a mut W , } impl < 'a > _RXTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXTOW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXTOW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: DISABLED => false , RXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: DISABLED => false , TXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTOPPED`" ] pub enum TXSTOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTOPPEDW :: DISABLED => false , TXSTOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXSTOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXSTOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXSTOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & self ) -> CTSR { CTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & self ) -> NCTSR { NCTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & self ) -> RXDRDYR { RXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & self ) -> TXDRDYR { TXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable or disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable or disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & self ) -> RXTOR { RXTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable or disable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & self ) -> TXSTOPPEDR { TXSTOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & mut self ) -> _CTSW { _CTSW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & mut self ) -> _NCTSW { _NCTSW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & mut self ) -> _RXDRDYW { _RXDRDYW { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & mut self ) -> _TXDRDYW { _TXDRDYW { w : self } } # [ doc = "Bit 8 - Enable or disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 17 - Enable or disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & mut self ) -> _RXTOW { _RXTOW { w : self } } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 22 - Enable or disable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & mut self ) -> _TXSTOPPEDW { _TXSTOPPEDW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTSR :: DISABLED => false , CTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTSR { match value { false => CTSR :: DISABLED , true => CTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTSR :: ENABLED } } # [ doc = "Possible values of the field `NCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NCTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTSR :: DISABLED => false , NCTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTSR { match value { false => NCTSR :: DISABLED , true => NCTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTSR :: ENABLED } } # [ doc = "Possible values of the field `RXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDRDYR :: DISABLED => false , RXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDRDYR { match value { false => RXDRDYR :: DISABLED , true => RXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `TXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDRDYR :: DISABLED => false , TXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDRDYR { match value { false => TXDRDYR :: DISABLED , true => TXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXTOR :: DISABLED => false , RXTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXTOR { match value { false => RXTOR :: DISABLED , true => RXTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXTOR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTOPPEDR :: DISABLED => false , TXSTOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTOPPEDR { match value { false => TXSTOPPEDR :: DISABLED , true => TXSTOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTOPPEDR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS`" ] pub enum CTSW { # [ doc = "Enable" ] SET } impl CTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CTSW < 'a > { w : & 'a mut W , } impl < 'a > _CTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CTSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS`" ] pub enum NCTSW { # [ doc = "Enable" ] SET } impl NCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _NCTSW < 'a > { w : & 'a mut W , } impl < 'a > _NCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( NCTSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDRDY`" ] pub enum RXDRDYW { # [ doc = "Enable" ] SET } impl RXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Enable" ] SET } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDRXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDRDY`" ] pub enum TXDRDYW { # [ doc = "Enable" ] SET } impl TXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _TXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Enable" ] SET } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDTXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXTO`" ] pub enum RXTOW { # [ doc = "Enable" ] SET } impl RXTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXTOW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXTOW < 'a > { w : & 'a mut W , } impl < 'a > _RXTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXTOW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Enable" ] SET } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Enable" ] SET } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTOPPED`" ] pub enum TXSTOPPEDW { # [ doc = "Enable" ] SET } impl TXSTOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXSTOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXSTOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for CTS event" ] # [ inline ] pub fn cts ( & self ) -> CTSR { CTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & self ) -> NCTSR { NCTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & self ) -> RXDRDYR { RXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & self ) -> TXDRDYR { TXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & self ) -> RXTOR { RXTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Write '1' to Enable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & self ) -> TXSTOPPEDR { TXSTOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for CTS event" ] # [ inline ] pub fn cts ( & mut self ) -> _CTSW { _CTSW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & mut self ) -> _NCTSW { _NCTSW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & mut self ) -> _RXDRDYW { _RXDRDYW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & mut self ) -> _TXDRDYW { _TXDRDYW { w : self } } # [ doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & mut self ) -> _RXTOW { _RXTOW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 22 - Write '1' to Enable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & mut self ) -> _TXSTOPPEDW { _TXSTOPPEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTSR :: DISABLED => false , CTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTSR { match value { false => CTSR :: DISABLED , true => CTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTSR :: ENABLED } } # [ doc = "Possible values of the field `NCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NCTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTSR :: DISABLED => false , NCTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTSR { match value { false => NCTSR :: DISABLED , true => NCTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTSR :: ENABLED } } # [ doc = "Possible values of the field `RXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDRDYR :: DISABLED => false , RXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDRDYR { match value { false => RXDRDYR :: DISABLED , true => RXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `TXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDRDYR :: DISABLED => false , TXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDRDYR { match value { false => TXDRDYR :: DISABLED , true => TXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXTOR :: DISABLED => false , RXTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXTOR { match value { false => RXTOR :: DISABLED , true => RXTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXTOR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTOPPEDR :: DISABLED => false , TXSTOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTOPPEDR { match value { false => TXSTOPPEDR :: DISABLED , true => TXSTOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTOPPEDR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS`" ] pub enum CTSW { # [ doc = "Disable" ] CLEAR } impl CTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CTSW < 'a > { w : & 'a mut W , } impl < 'a > _CTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CTSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS`" ] pub enum NCTSW { # [ doc = "Disable" ] CLEAR } impl NCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _NCTSW < 'a > { w : & 'a mut W , } impl < 'a > _NCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( NCTSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDRDY`" ] pub enum RXDRDYW { # [ doc = "Disable" ] CLEAR } impl RXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] CLEAR } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDRXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDRDY`" ] pub enum TXDRDYW { # [ doc = "Disable" ] CLEAR } impl TXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _TXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Disable" ] CLEAR } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDTXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXTO`" ] pub enum RXTOW { # [ doc = "Disable" ] CLEAR } impl RXTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXTOW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXTOW < 'a > { w : & 'a mut W , } impl < 'a > _RXTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXTOW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTOPPED`" ] pub enum TXSTOPPEDW { # [ doc = "Disable" ] CLEAR } impl TXSTOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXSTOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXSTOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & self ) -> CTSR { CTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & self ) -> NCTSR { NCTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & self ) -> RXDRDYR { RXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & self ) -> TXDRDYR { TXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & self ) -> RXTOR { RXTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Write '1' to Disable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & self ) -> TXSTOPPEDR { TXSTOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & mut self ) -> _CTSW { _CTSW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & mut self ) -> _NCTSW { _NCTSW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & mut self ) -> _RXDRDYW { _RXDRDYW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & mut self ) -> _TXDRDYW { _TXDRDYW { w : self } } # [ doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & mut self ) -> _RXTOW { _RXTOW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 22 - Write '1' to Disable interrupt for TXSTOPPED event" ] # [ inline ] pub fn txstopped ( & mut self ) -> _TXSTOPPEDW { _TXSTOPPEDW { w : self } } } } # [ doc = "Error source" ] pub struct ERRORSRC { register : VolatileCell < u32 > } # [ doc = "Error source" ] pub mod errorsrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERRUN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERRUNR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERRUNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERRUNR :: NOTPRESENT => false , OVERRUNR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERRUNR { match value { false => OVERRUNR :: NOTPRESENT , true => OVERRUNR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == OVERRUNR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == OVERRUNR :: PRESENT } } # [ doc = "Possible values of the field `PARITY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl PARITYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PARITYR :: NOTPRESENT => false , PARITYR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PARITYR { match value { false => PARITYR :: NOTPRESENT , true => PARITYR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == PARITYR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == PARITYR :: PRESENT } } # [ doc = "Possible values of the field `FRAMING`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRAMINGR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl FRAMINGR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FRAMINGR :: NOTPRESENT => false , FRAMINGR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FRAMINGR { match value { false => FRAMINGR :: NOTPRESENT , true => FRAMINGR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == FRAMINGR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == FRAMINGR :: PRESENT } } # [ doc = "Possible values of the field `BREAK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BREAKR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl BREAKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BREAKR :: NOTPRESENT => false , BREAKR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BREAKR { match value { false => BREAKR :: NOTPRESENT , true => BREAKR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == BREAKR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == BREAKR :: PRESENT } } # [ doc = "Values that can be written to the field `OVERRUN`" ] pub enum OVERRUNW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERRUNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERRUNW :: NOTPRESENT => false , OVERRUNW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _OVERRUNW < 'a > { w : & 'a mut W , } impl < 'a > _OVERRUNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERRUNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PARITY`" ] pub enum PARITYW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl PARITYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PARITYW :: NOTPRESENT => false , PARITYW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _PARITYW < 'a > { w : & 'a mut W , } impl < 'a > _PARITYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PARITYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( PARITYW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( PARITYW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FRAMING`" ] pub enum FRAMINGW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl FRAMINGW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FRAMINGW :: NOTPRESENT => false , FRAMINGW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _FRAMINGW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMINGW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FRAMINGW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( FRAMINGW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( FRAMINGW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BREAK`" ] pub enum BREAKW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl BREAKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BREAKW :: NOTPRESENT => false , BREAKW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _BREAKW < 'a > { w : & 'a mut W , } impl < 'a > _BREAKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BREAKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( BREAKW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( BREAKW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & self ) -> OVERRUNR { OVERRUNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Parity error" ] # [ inline ] pub fn parity ( & self ) -> PARITYR { PARITYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Framing error occurred" ] # [ inline ] pub fn framing ( & self ) -> FRAMINGR { FRAMINGR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Break condition" ] # [ inline ] pub fn break_ ( & self ) -> BREAKR { BREAKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & mut self ) -> _OVERRUNW { _OVERRUNW { w : self } } # [ doc = "Bit 1 - Parity error" ] # [ inline ] pub fn parity ( & mut self ) -> _PARITYW { _PARITYW { w : self } } # [ doc = "Bit 2 - Framing error occurred" ] # [ inline ] pub fn framing ( & mut self ) -> _FRAMINGW { _FRAMINGW { w : self } } # [ doc = "Bit 3 - Break condition" ] # [ inline ] pub fn break_ ( & mut self ) -> _BREAKW { _BREAKW { w : self } } } } # [ doc = "Enable UART" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable UART" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable UARTE" ] DISABLED , # [ doc = "Enable UARTE" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x08 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 8 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable UARTE" ] DISABLED , # [ doc = "Enable UARTE" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 8 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable UARTE" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable UARTE" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable UARTE" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable UARTE" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Baud rate. Accuracy depends on the HFCLK source selected." ] pub struct BAUDRATE { register : VolatileCell < u32 > } # [ doc = "Baud rate. Accuracy depends on the HFCLK source selected." ] pub mod baudrate { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BAUDRATE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `BAUDRATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BAUDRATER { # [ doc = "1200 baud (actual rate: 1205)" ] BAUD1200 , # [ doc = "2400 baud (actual rate: 2396)" ] BAUD2400 , # [ doc = "4800 baud (actual rate: 4808)" ] BAUD4800 , # [ doc = "9600 baud (actual rate: 9598)" ] BAUD9600 , # [ doc = "14400 baud (actual rate: 14401)" ] BAUD14400 , # [ doc = "19200 baud (actual rate: 19208)" ] BAUD19200 , # [ doc = "28800 baud (actual rate: 28777)" ] BAUD28800 , # [ doc = "31250 baud" ] BAUD31250 , # [ doc = "38400 baud (actual rate: 38369)" ] BAUD38400 , # [ doc = "56000 baud (actual rate: 55944)" ] BAUD56000 , # [ doc = "57600 baud (actual rate: 57554)" ] BAUD57600 , # [ doc = "76800 baud (actual rate: 76923)" ] BAUD76800 , # [ doc = "115200 baud (actual rate: 115108)" ] BAUD115200 , # [ doc = "230400 baud (actual rate: 231884)" ] BAUD230400 , # [ doc = "250000 baud" ] BAUD250000 , # [ doc = "460800 baud (actual rate: 457143)" ] BAUD460800 , # [ doc = "921600 baud (actual rate: 941176)" ] BAUD921600 , # [ doc = "1Mega baud" ] BAUD1M , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl BAUDRATER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { BAUDRATER :: BAUD1200 => 0x0004_f000 , BAUDRATER :: BAUD2400 => 0x0009_d000 , BAUDRATER :: BAUD4800 => 0x0013_b000 , BAUDRATER :: BAUD9600 => 0x0027_5000 , BAUDRATER :: BAUD14400 => 0x003a_f000 , BAUDRATER :: BAUD19200 => 0x004e_a000 , BAUDRATER :: BAUD28800 => 0x0075_c000 , BAUDRATER :: BAUD31250 => 0x0080_0000 , BAUDRATER :: BAUD38400 => 0x009d_0000 , BAUDRATER :: BAUD56000 => 0x00e5_0000 , BAUDRATER :: BAUD57600 => 0x00eb_0000 , BAUDRATER :: BAUD76800 => 0x013a_9000 , BAUDRATER :: BAUD115200 => 0x01d6_0000 , BAUDRATER :: BAUD230400 => 0x03b0_0000 , BAUDRATER :: BAUD250000 => 0x0400_0000 , BAUDRATER :: BAUD460800 => 0x0740_0000 , BAUDRATER :: BAUD921600 => 0x0f00_0000 , BAUDRATER :: BAUD1M => 0x1000_0000 , BAUDRATER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> BAUDRATER { match value { 323584 => BAUDRATER :: BAUD1200 , 643072 => BAUDRATER :: BAUD2400 , 1290240 => BAUDRATER :: BAUD4800 , 2576384 => BAUDRATER :: BAUD9600 , 3862528 => BAUDRATER :: BAUD14400 , 5152768 => BAUDRATER :: BAUD19200 , 7716864 => BAUDRATER :: BAUD28800 , 8388608 => BAUDRATER :: BAUD31250 , 10289152 => BAUDRATER :: BAUD38400 , 15007744 => BAUDRATER :: BAUD56000 , 15400960 => BAUDRATER :: BAUD57600 , 20615168 => BAUDRATER :: BAUD76800 , 30801920 => BAUDRATER :: BAUD115200 , 61865984 => BAUDRATER :: BAUD230400 , 67108864 => BAUDRATER :: BAUD250000 , 121634816 => BAUDRATER :: BAUD460800 , 251658240 => BAUDRATER :: BAUD921600 , 268435456 => BAUDRATER :: BAUD1M , i => BAUDRATER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `BAUD1200`" ] # [ inline ] pub fn is_baud1200 ( & self ) -> bool { * self == BAUDRATER :: BAUD1200 } # [ doc = "Checks if the value of the field is `BAUD2400`" ] # [ inline ] pub fn is_baud2400 ( & self ) -> bool { * self == BAUDRATER :: BAUD2400 } # [ doc = "Checks if the value of the field is `BAUD4800`" ] # [ inline ] pub fn is_baud4800 ( & self ) -> bool { * self == BAUDRATER :: BAUD4800 } # [ doc = "Checks if the value of the field is `BAUD9600`" ] # [ inline ] pub fn is_baud9600 ( & self ) -> bool { * self == BAUDRATER :: BAUD9600 } # [ doc = "Checks if the value of the field is `BAUD14400`" ] # [ inline ] pub fn is_baud14400 ( & self ) -> bool { * self == BAUDRATER :: BAUD14400 } # [ doc = "Checks if the value of the field is `BAUD19200`" ] # [ inline ] pub fn is_baud19200 ( & self ) -> bool { * self == BAUDRATER :: BAUD19200 } # [ doc = "Checks if the value of the field is `BAUD28800`" ] # [ inline ] pub fn is_baud28800 ( & self ) -> bool { * self == BAUDRATER :: BAUD28800 } # [ doc = "Checks if the value of the field is `BAUD31250`" ] # [ inline ] pub fn is_baud31250 ( & self ) -> bool { * self == BAUDRATER :: BAUD31250 } # [ doc = "Checks if the value of the field is `BAUD38400`" ] # [ inline ] pub fn is_baud38400 ( & self ) -> bool { * self == BAUDRATER :: BAUD38400 } # [ doc = "Checks if the value of the field is `BAUD56000`" ] # [ inline ] pub fn is_baud56000 ( & self ) -> bool { * self == BAUDRATER :: BAUD56000 } # [ doc = "Checks if the value of the field is `BAUD57600`" ] # [ inline ] pub fn is_baud57600 ( & self ) -> bool { * self == BAUDRATER :: BAUD57600 } # [ doc = "Checks if the value of the field is `BAUD76800`" ] # [ inline ] pub fn is_baud76800 ( & self ) -> bool { * self == BAUDRATER :: BAUD76800 } # [ doc = "Checks if the value of the field is `BAUD115200`" ] # [ inline ] pub fn is_baud115200 ( & self ) -> bool { * self == BAUDRATER :: BAUD115200 } # [ doc = "Checks if the value of the field is `BAUD230400`" ] # [ inline ] pub fn is_baud230400 ( & self ) -> bool { * self == BAUDRATER :: BAUD230400 } # [ doc = "Checks if the value of the field is `BAUD250000`" ] # [ inline ] pub fn is_baud250000 ( & self ) -> bool { * self == BAUDRATER :: BAUD250000 } # [ doc = "Checks if the value of the field is `BAUD460800`" ] # [ inline ] pub fn is_baud460800 ( & self ) -> bool { * self == BAUDRATER :: BAUD460800 } # [ doc = "Checks if the value of the field is `BAUD921600`" ] # [ inline ] pub fn is_baud921600 ( & self ) -> bool { * self == BAUDRATER :: BAUD921600 } # [ doc = "Checks if the value of the field is `BAUD1M`" ] # [ inline ] pub fn is_baud1m ( & self ) -> bool { * self == BAUDRATER :: BAUD1M } } # [ doc = "Values that can be written to the field `BAUDRATE`" ] pub enum BAUDRATEW { # [ doc = "1200 baud (actual rate: 1205)" ] BAUD1200 , # [ doc = "2400 baud (actual rate: 2396)" ] BAUD2400 , # [ doc = "4800 baud (actual rate: 4808)" ] BAUD4800 , # [ doc = "9600 baud (actual rate: 9598)" ] BAUD9600 , # [ doc = "14400 baud (actual rate: 14401)" ] BAUD14400 , # [ doc = "19200 baud (actual rate: 19208)" ] BAUD19200 , # [ doc = "28800 baud (actual rate: 28777)" ] BAUD28800 , # [ doc = "31250 baud" ] BAUD31250 , # [ doc = "38400 baud (actual rate: 38369)" ] BAUD38400 , # [ doc = "56000 baud (actual rate: 55944)" ] BAUD56000 , # [ doc = "57600 baud (actual rate: 57554)" ] BAUD57600 , # [ doc = "76800 baud (actual rate: 76923)" ] BAUD76800 , # [ doc = "115200 baud (actual rate: 115108)" ] BAUD115200 , # [ doc = "230400 baud (actual rate: 231884)" ] BAUD230400 , # [ doc = "250000 baud" ] BAUD250000 , # [ doc = "460800 baud (actual rate: 457143)" ] BAUD460800 , # [ doc = "921600 baud (actual rate: 941176)" ] BAUD921600 , # [ doc = "1Mega baud" ] BAUD1M } impl BAUDRATEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { BAUDRATEW :: BAUD1200 => 323584 , BAUDRATEW :: BAUD2400 => 643072 , BAUDRATEW :: BAUD4800 => 1290240 , BAUDRATEW :: BAUD9600 => 2576384 , BAUDRATEW :: BAUD14400 => 3862528 , BAUDRATEW :: BAUD19200 => 5152768 , BAUDRATEW :: BAUD28800 => 7716864 , BAUDRATEW :: BAUD31250 => 8388608 , BAUDRATEW :: BAUD38400 => 10289152 , BAUDRATEW :: BAUD56000 => 15007744 , BAUDRATEW :: BAUD57600 => 15400960 , BAUDRATEW :: BAUD76800 => 20615168 , BAUDRATEW :: BAUD115200 => 30801920 , BAUDRATEW :: BAUD230400 => 61865984 , BAUDRATEW :: BAUD250000 => 67108864 , BAUDRATEW :: BAUD460800 => 121634816 , BAUDRATEW :: BAUD921600 => 251658240 , BAUDRATEW :: BAUD1M => 268435456 } } } # [ doc = r" Proxy" ] pub struct _BAUDRATEW < 'a > { w : & 'a mut W , } impl < 'a > _BAUDRATEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BAUDRATEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "1200 baud (actual rate: 1205)" ] # [ inline ] pub fn baud1200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD1200 ) } # [ doc = "2400 baud (actual rate: 2396)" ] # [ inline ] pub fn baud2400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD2400 ) } # [ doc = "4800 baud (actual rate: 4808)" ] # [ inline ] pub fn baud4800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD4800 ) } # [ doc = "9600 baud (actual rate: 9598)" ] # [ inline ] pub fn baud9600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD9600 ) } # [ doc = "14400 baud (actual rate: 14401)" ] # [ inline ] pub fn baud14400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD14400 ) } # [ doc = "19200 baud (actual rate: 19208)" ] # [ inline ] pub fn baud19200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD19200 ) } # [ doc = "28800 baud (actual rate: 28777)" ] # [ inline ] pub fn baud28800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD28800 ) } # [ doc = "31250 baud" ] # [ inline ] pub fn baud31250 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD31250 ) } # [ doc = "38400 baud (actual rate: 38369)" ] # [ inline ] pub fn baud38400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD38400 ) } # [ doc = "56000 baud (actual rate: 55944)" ] # [ inline ] pub fn baud56000 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD56000 ) } # [ doc = "57600 baud (actual rate: 57554)" ] # [ inline ] pub fn baud57600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD57600 ) } # [ doc = "76800 baud (actual rate: 76923)" ] # [ inline ] pub fn baud76800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD76800 ) } # [ doc = "115200 baud (actual rate: 115108)" ] # [ inline ] pub fn baud115200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD115200 ) } # [ doc = "230400 baud (actual rate: 231884)" ] # [ inline ] pub fn baud230400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD230400 ) } # [ doc = "250000 baud" ] # [ inline ] pub fn baud250000 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD250000 ) } # [ doc = "460800 baud (actual rate: 457143)" ] # [ inline ] pub fn baud460800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD460800 ) } # [ doc = "921600 baud (actual rate: 941176)" ] # [ inline ] pub fn baud921600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD921600 ) } # [ doc = "1Mega baud" ] # [ inline ] pub fn baud1m ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD1M ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Baud rate" ] # [ inline ] pub fn baudrate ( & self ) -> BAUDRATER { BAUDRATER :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Baud rate" ] # [ inline ] pub fn baudrate ( & mut self ) -> _BAUDRATEW { _BAUDRATEW { w : self } } } } # [ doc = "Configuration of parity and hardware flow control" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration of parity and hardware flow control" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HWFC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWFCR { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl HWFCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HWFCR :: DISABLED => false , HWFCR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HWFCR { match value { false => HWFCR :: DISABLED , true => HWFCR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == HWFCR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == HWFCR :: ENABLED } } # [ doc = "Possible values of the field `PARITY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYR { # [ doc = "Exclude parity bit" ] EXCLUDED , # [ doc = "Include parity bit" ] INCLUDED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl PARITYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PARITYR :: EXCLUDED => 0 , PARITYR :: INCLUDED => 0x07 , PARITYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PARITYR { match value { 0 => PARITYR :: EXCLUDED , 7 => PARITYR :: INCLUDED , i => PARITYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == PARITYR :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == PARITYR :: INCLUDED } } # [ doc = "Values that can be written to the field `HWFC`" ] pub enum HWFCW { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl HWFCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HWFCW :: DISABLED => false , HWFCW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _HWFCW < 'a > { w : & 'a mut W , } impl < 'a > _HWFCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HWFCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( HWFCW :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( HWFCW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PARITY`" ] pub enum PARITYW { # [ doc = "Exclude parity bit" ] EXCLUDED , # [ doc = "Include parity bit" ] INCLUDED } impl PARITYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PARITYW :: EXCLUDED => 0 , PARITYW :: INCLUDED => 7 } } } # [ doc = r" Proxy" ] pub struct _PARITYW < 'a > { w : & 'a mut W , } impl < 'a > _PARITYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PARITYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Exclude parity bit" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( PARITYW :: EXCLUDED ) } # [ doc = "Include parity bit" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( PARITYW :: INCLUDED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Hardware flow control" ] # [ inline ] pub fn hwfc ( & self ) -> HWFCR { HWFCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 1:3 - Parity" ] # [ inline ] pub fn parity ( & self ) -> PARITYR { PARITYR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Hardware flow control" ] # [ inline ] pub fn hwfc ( & mut self ) -> _HWFCW { _HWFCW { w : self } } # [ doc = "Bits 1:3 - Parity" ] # [ inline ] pub fn parity ( & mut self ) -> _PARITYW { _PARITYW { w : self } } } } } # [ doc = "Universal Asynchronous Receiver/Transmitter" ] pub struct UART0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for UART0 { } impl UART0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const uart0 :: RegisterBlock { 0x4000_2000 as * const _ } } impl Deref for UART0 { type Target = uart0 :: RegisterBlock ; fn deref ( & self ) -> & uart0 :: RegisterBlock { unsafe { & * UART0 :: ptr ( ) } } } # [ doc = "Universal Asynchronous Receiver/Transmitter" ] pub mod uart0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start UART receiver" ] pub tasks_startrx : TASKS_STARTRX , # [ doc = "0x04 - Stop UART receiver" ] pub tasks_stoprx : TASKS_STOPRX , # [ doc = "0x08 - Start UART transmitter" ] pub tasks_starttx : TASKS_STARTTX , # [ doc = "0x0c - Stop UART transmitter" ] pub tasks_stoptx : TASKS_STOPTX , _reserved0 : [ u8 ; 12usize ] , # [ doc = "0x1c - Suspend UART" ] pub tasks_suspend : TASKS_SUSPEND , _reserved1 : [ u8 ; 224usize ] , # [ doc = "0x100 - CTS is activated (set low). Clear To Send." ] pub events_cts : EVENTS_CTS , # [ doc = "0x104 - CTS is deactivated (set high). Not Clear To Send." ] pub events_ncts : EVENTS_NCTS , # [ doc = "0x108 - Data received in RXD" ] pub events_rxdrdy : EVENTS_RXDRDY , _reserved2 : [ u8 ; 16usize ] , # [ doc = "0x11c - Data sent from TXD" ] pub events_txdrdy : EVENTS_TXDRDY , _reserved3 : [ u8 ; 4usize ] , # [ doc = "0x124 - Error detected" ] pub events_error : EVENTS_ERROR , _reserved4 : [ u8 ; 28usize ] , # [ doc = "0x144 - Receiver timeout" ] pub events_rxto : EVENTS_RXTO , _reserved5 : [ u8 ; 184usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved6 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved7 : [ u8 ; 372usize ] , # [ doc = "0x480 - Error source" ] pub errorsrc : ERRORSRC , _reserved8 : [ u8 ; 124usize ] , # [ doc = "0x500 - Enable UART" ] pub enable : ENABLE , _reserved9 : [ u8 ; 4usize ] , # [ doc = "0x508 - Pin select for RTS" ] pub pselrts : PSELRTS , # [ doc = "0x50c - Pin select for TXD" ] pub pseltxd : PSELTXD , # [ doc = "0x510 - Pin select for CTS" ] pub pselcts : PSELCTS , # [ doc = "0x514 - Pin select for RXD" ] pub pselrxd : PSELRXD , # [ doc = "0x518 - RXD register" ] pub rxd : RXD , # [ doc = "0x51c - TXD register" ] pub txd : TXD , _reserved10 : [ u8 ; 4usize ] , # [ doc = "0x524 - Baud rate" ] pub baudrate : BAUDRATE , _reserved11 : [ u8 ; 68usize ] , # [ doc = "0x56c - Configuration of parity and hardware flow control" ] pub config : CONFIG , } # [ doc = "Start UART receiver" ] pub struct TASKS_STARTRX { register : VolatileCell < u32 > } # [ doc = "Start UART receiver" ] pub mod tasks_startrx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop UART receiver" ] pub struct TASKS_STOPRX { register : VolatileCell < u32 > } # [ doc = "Stop UART receiver" ] pub mod tasks_stoprx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOPRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start UART transmitter" ] pub struct TASKS_STARTTX { register : VolatileCell < u32 > } # [ doc = "Start UART transmitter" ] pub mod tasks_starttx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop UART transmitter" ] pub struct TASKS_STOPTX { register : VolatileCell < u32 > } # [ doc = "Stop UART transmitter" ] pub mod tasks_stoptx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOPTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Suspend UART" ] pub struct TASKS_SUSPEND { register : VolatileCell < u32 > } # [ doc = "Suspend UART" ] pub mod tasks_suspend { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SUSPEND { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CTS is activated (set low). Clear To Send." ] pub struct EVENTS_CTS { register : VolatileCell < u32 > } # [ doc = "CTS is activated (set low). Clear To Send." ] pub mod events_cts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CTS is deactivated (set high). Not Clear To Send." ] pub struct EVENTS_NCTS { register : VolatileCell < u32 > } # [ doc = "CTS is deactivated (set high). Not Clear To Send." ] pub mod events_ncts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_NCTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Data received in RXD" ] pub struct EVENTS_RXDRDY { register : VolatileCell < u32 > } # [ doc = "Data received in RXD" ] pub mod events_rxdrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXDRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Data sent from TXD" ] pub struct EVENTS_TXDRDY { register : VolatileCell < u32 > } # [ doc = "Data sent from TXD" ] pub mod events_txdrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXDRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Error detected" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "Error detected" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Receiver timeout" ] pub struct EVENTS_RXTO { register : VolatileCell < u32 > } # [ doc = "Receiver timeout" ] pub mod events_rxto { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXTO { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS_STARTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTS_STARTRXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CTS_STARTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTS_STARTRXR :: DISABLED => false , CTS_STARTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTS_STARTRXR { match value { false => CTS_STARTRXR :: DISABLED , true => CTS_STARTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTS_STARTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTS_STARTRXR :: ENABLED } } # [ doc = "Possible values of the field `NCTS_STOPRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTS_STOPRXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl NCTS_STOPRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTS_STOPRXR :: DISABLED => false , NCTS_STOPRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTS_STOPRXR { match value { false => NCTS_STOPRXR :: DISABLED , true => NCTS_STOPRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTS_STOPRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTS_STOPRXR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS_STARTRX`" ] pub enum CTS_STARTRXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CTS_STARTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTS_STARTRXW :: DISABLED => false , CTS_STARTRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CTS_STARTRXW < 'a > { w : & 'a mut W , } impl < 'a > _CTS_STARTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTS_STARTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CTS_STARTRXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CTS_STARTRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS_STOPRX`" ] pub enum NCTS_STOPRXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl NCTS_STOPRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTS_STOPRXW :: DISABLED => false , NCTS_STOPRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _NCTS_STOPRXW < 'a > { w : & 'a mut W , } impl < 'a > _NCTS_STOPRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTS_STOPRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( NCTS_STOPRXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( NCTS_STOPRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 3 - Shortcut between CTS event and STARTRX task" ] # [ inline ] pub fn cts_startrx ( & self ) -> CTS_STARTRXR { CTS_STARTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between NCTS event and STOPRX task" ] # [ inline ] pub fn ncts_stoprx ( & self ) -> NCTS_STOPRXR { NCTS_STOPRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 3 - Shortcut between CTS event and STARTRX task" ] # [ inline ] pub fn cts_startrx ( & mut self ) -> _CTS_STARTRXW { _CTS_STARTRXW { w : self } } # [ doc = "Bit 4 - Shortcut between NCTS event and STOPRX task" ] # [ inline ] pub fn ncts_stoprx ( & mut self ) -> _NCTS_STOPRXW { _NCTS_STOPRXW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTSR :: DISABLED => false , CTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTSR { match value { false => CTSR :: DISABLED , true => CTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTSR :: ENABLED } } # [ doc = "Possible values of the field `NCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NCTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTSR :: DISABLED => false , NCTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTSR { match value { false => NCTSR :: DISABLED , true => NCTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTSR :: ENABLED } } # [ doc = "Possible values of the field `RXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDRDYR :: DISABLED => false , RXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDRDYR { match value { false => RXDRDYR :: DISABLED , true => RXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `TXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDRDYR :: DISABLED => false , TXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDRDYR { match value { false => TXDRDYR :: DISABLED , true => TXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXTOR :: DISABLED => false , RXTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXTOR { match value { false => RXTOR :: DISABLED , true => RXTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXTOR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS`" ] pub enum CTSW { # [ doc = "Enable" ] SET } impl CTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CTSW < 'a > { w : & 'a mut W , } impl < 'a > _CTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CTSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS`" ] pub enum NCTSW { # [ doc = "Enable" ] SET } impl NCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _NCTSW < 'a > { w : & 'a mut W , } impl < 'a > _NCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( NCTSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDRDY`" ] pub enum RXDRDYW { # [ doc = "Enable" ] SET } impl RXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDRDY`" ] pub enum TXDRDYW { # [ doc = "Enable" ] SET } impl TXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _TXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXTO`" ] pub enum RXTOW { # [ doc = "Enable" ] SET } impl RXTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXTOW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXTOW < 'a > { w : & 'a mut W , } impl < 'a > _RXTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXTOW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for CTS event" ] # [ inline ] pub fn cts ( & self ) -> CTSR { CTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & self ) -> NCTSR { NCTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & self ) -> RXDRDYR { RXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & self ) -> TXDRDYR { TXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & self ) -> RXTOR { RXTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for CTS event" ] # [ inline ] pub fn cts ( & mut self ) -> _CTSW { _CTSW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & mut self ) -> _NCTSW { _NCTSW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & mut self ) -> _RXDRDYW { _RXDRDYW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & mut self ) -> _TXDRDYW { _TXDRDYW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & mut self ) -> _RXTOW { _RXTOW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CTSR :: DISABLED => false , CTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CTSR { match value { false => CTSR :: DISABLED , true => CTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CTSR :: ENABLED } } # [ doc = "Possible values of the field `NCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NCTSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NCTSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NCTSR :: DISABLED => false , NCTSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NCTSR { match value { false => NCTSR :: DISABLED , true => NCTSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NCTSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NCTSR :: ENABLED } } # [ doc = "Possible values of the field `RXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDRDYR :: DISABLED => false , RXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDRDYR { match value { false => RXDRDYR :: DISABLED , true => RXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `TXDRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDRDYR :: DISABLED => false , TXDRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDRDYR { match value { false => TXDRDYR :: DISABLED , true => TXDRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDRDYR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXTO`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXTOR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXTOR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXTOR :: DISABLED => false , RXTOR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXTOR { match value { false => RXTOR :: DISABLED , true => RXTOR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXTOR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXTOR :: ENABLED } } # [ doc = "Values that can be written to the field `CTS`" ] pub enum CTSW { # [ doc = "Disable" ] CLEAR } impl CTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CTSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CTSW < 'a > { w : & 'a mut W , } impl < 'a > _CTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CTSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NCTS`" ] pub enum NCTSW { # [ doc = "Disable" ] CLEAR } impl NCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NCTSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _NCTSW < 'a > { w : & 'a mut W , } impl < 'a > _NCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NCTSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( NCTSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDRDY`" ] pub enum RXDRDYW { # [ doc = "Disable" ] CLEAR } impl RXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXDRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDRDY`" ] pub enum TXDRDYW { # [ doc = "Disable" ] CLEAR } impl TXDRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXDRDYW < 'a > { w : & 'a mut W , } impl < 'a > _TXDRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXDRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXTO`" ] pub enum RXTOW { # [ doc = "Disable" ] CLEAR } impl RXTOW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXTOW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXTOW < 'a > { w : & 'a mut W , } impl < 'a > _RXTOW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXTOW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXTOW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & self ) -> CTSR { CTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & self ) -> NCTSR { NCTSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & self ) -> RXDRDYR { RXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & self ) -> TXDRDYR { TXDRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & self ) -> RXTOR { RXTOR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for CTS event" ] # [ inline ] pub fn cts ( & mut self ) -> _CTSW { _CTSW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event" ] # [ inline ] pub fn ncts ( & mut self ) -> _NCTSW { _NCTSW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event" ] # [ inline ] pub fn rxdrdy ( & mut self ) -> _RXDRDYW { _RXDRDYW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event" ] # [ inline ] pub fn txdrdy ( & mut self ) -> _TXDRDYW { _TXDRDYW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event" ] # [ inline ] pub fn rxto ( & mut self ) -> _RXTOW { _RXTOW { w : self } } } } # [ doc = "Error source" ] pub struct ERRORSRC { register : VolatileCell < u32 > } # [ doc = "Error source" ] pub mod errorsrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERRUN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERRUNR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERRUNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERRUNR :: NOTPRESENT => false , OVERRUNR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERRUNR { match value { false => OVERRUNR :: NOTPRESENT , true => OVERRUNR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == OVERRUNR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == OVERRUNR :: PRESENT } } # [ doc = "Possible values of the field `PARITY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl PARITYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PARITYR :: NOTPRESENT => false , PARITYR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PARITYR { match value { false => PARITYR :: NOTPRESENT , true => PARITYR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == PARITYR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == PARITYR :: PRESENT } } # [ doc = "Possible values of the field `FRAMING`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRAMINGR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl FRAMINGR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FRAMINGR :: NOTPRESENT => false , FRAMINGR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FRAMINGR { match value { false => FRAMINGR :: NOTPRESENT , true => FRAMINGR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == FRAMINGR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == FRAMINGR :: PRESENT } } # [ doc = "Possible values of the field `BREAK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BREAKR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl BREAKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BREAKR :: NOTPRESENT => false , BREAKR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BREAKR { match value { false => BREAKR :: NOTPRESENT , true => BREAKR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == BREAKR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == BREAKR :: PRESENT } } # [ doc = "Values that can be written to the field `OVERRUN`" ] pub enum OVERRUNW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERRUNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERRUNW :: NOTPRESENT => false , OVERRUNW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _OVERRUNW < 'a > { w : & 'a mut W , } impl < 'a > _OVERRUNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERRUNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PARITY`" ] pub enum PARITYW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl PARITYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PARITYW :: NOTPRESENT => false , PARITYW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _PARITYW < 'a > { w : & 'a mut W , } impl < 'a > _PARITYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PARITYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( PARITYW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( PARITYW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FRAMING`" ] pub enum FRAMINGW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl FRAMINGW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FRAMINGW :: NOTPRESENT => false , FRAMINGW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _FRAMINGW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMINGW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FRAMINGW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( FRAMINGW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( FRAMINGW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BREAK`" ] pub enum BREAKW { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl BREAKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BREAKW :: NOTPRESENT => false , BREAKW :: PRESENT => true } } } # [ doc = r" Proxy" ] pub struct _BREAKW < 'a > { w : & 'a mut W , } impl < 'a > _BREAKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BREAKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Read: error not present" ] # [ inline ] pub fn not_present ( self ) -> & 'a mut W { self . variant ( BREAKW :: NOTPRESENT ) } # [ doc = "Read: error present" ] # [ inline ] pub fn present ( self ) -> & 'a mut W { self . variant ( BREAKW :: PRESENT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & self ) -> OVERRUNR { OVERRUNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Parity error" ] # [ inline ] pub fn parity ( & self ) -> PARITYR { PARITYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Framing error occurred" ] # [ inline ] pub fn framing ( & self ) -> FRAMINGR { FRAMINGR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Break condition" ] # [ inline ] pub fn break_ ( & self ) -> BREAKR { BREAKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & mut self ) -> _OVERRUNW { _OVERRUNW { w : self } } # [ doc = "Bit 1 - Parity error" ] # [ inline ] pub fn parity ( & mut self ) -> _PARITYW { _PARITYW { w : self } } # [ doc = "Bit 2 - Framing error occurred" ] # [ inline ] pub fn framing ( & mut self ) -> _FRAMINGW { _FRAMINGW { w : self } } # [ doc = "Bit 3 - Break condition" ] # [ inline ] pub fn break_ ( & mut self ) -> _BREAKW { _BREAKW { w : self } } } } # [ doc = "Enable UART" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable UART" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable UART" ] DISABLED , # [ doc = "Enable UART" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x04 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 4 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable UART" ] DISABLED , # [ doc = "Enable UART" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 4 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable UART" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable UART" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable UART" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable UART" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Pin select for RTS" ] pub struct PSELRTS { register : VolatileCell < u32 > } # [ doc = "Pin select for RTS" ] pub mod pselrts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELRTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELRTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELRTSR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELRTSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELRTSR :: DISCONNECTED => 0xffff_ffff , PSELRTSR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELRTSR { match value { 4294967295 => PSELRTSR :: DISCONNECTED , i => PSELRTSR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELRTSR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELRTS`" ] pub enum PSELRTSW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELRTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELRTSW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELRTSW < 'a > { w : & 'a mut W , } impl < 'a > _PSELRTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELRTSW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELRTSW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for UART RTS signal" ] # [ inline ] pub fn pselrts ( & self ) -> PSELRTSR { PSELRTSR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for UART RTS signal" ] # [ inline ] pub fn pselrts ( & mut self ) -> _PSELRTSW { _PSELRTSW { w : self } } } } # [ doc = "Pin select for TXD" ] pub struct PSELTXD { register : VolatileCell < u32 > } # [ doc = "Pin select for TXD" ] pub mod pseltxd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELTXD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELTXD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELTXDR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELTXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELTXDR :: DISCONNECTED => 0xffff_ffff , PSELTXDR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELTXDR { match value { 4294967295 => PSELTXDR :: DISCONNECTED , i => PSELTXDR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELTXDR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELTXD`" ] pub enum PSELTXDW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELTXDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELTXDW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELTXDW < 'a > { w : & 'a mut W , } impl < 'a > _PSELTXDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELTXDW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELTXDW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for UART TXD signal" ] # [ inline ] pub fn pseltxd ( & self ) -> PSELTXDR { PSELTXDR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for UART TXD signal" ] # [ inline ] pub fn pseltxd ( & mut self ) -> _PSELTXDW { _PSELTXDW { w : self } } } } # [ doc = "Pin select for CTS" ] pub struct PSELCTS { register : VolatileCell < u32 > } # [ doc = "Pin select for CTS" ] pub mod pselcts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELCTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELCTS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELCTSR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELCTSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELCTSR :: DISCONNECTED => 0xffff_ffff , PSELCTSR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELCTSR { match value { 4294967295 => PSELCTSR :: DISCONNECTED , i => PSELCTSR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELCTSR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELCTS`" ] pub enum PSELCTSW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELCTSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELCTSW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELCTSW < 'a > { w : & 'a mut W , } impl < 'a > _PSELCTSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELCTSW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELCTSW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for UART CTS signal" ] # [ inline ] pub fn pselcts ( & self ) -> PSELCTSR { PSELCTSR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for UART CTS signal" ] # [ inline ] pub fn pselcts ( & mut self ) -> _PSELCTSW { _PSELCTSW { w : self } } } } # [ doc = "Pin select for RXD" ] pub struct PSELRXD { register : VolatileCell < u32 > } # [ doc = "Pin select for RXD" ] pub mod pselrxd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELRXD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELRXD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELRXDR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELRXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELRXDR :: DISCONNECTED => 0xffff_ffff , PSELRXDR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELRXDR { match value { 4294967295 => PSELRXDR :: DISCONNECTED , i => PSELRXDR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELRXDR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELRXD`" ] pub enum PSELRXDW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELRXDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELRXDW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELRXDW < 'a > { w : & 'a mut W , } impl < 'a > _PSELRXDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELRXDW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELRXDW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for UART RXD signal" ] # [ inline ] pub fn pselrxd ( & self ) -> PSELRXDR { PSELRXDR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for UART RXD signal" ] # [ inline ] pub fn pselrxd ( & mut self ) -> _PSELRXDW { _PSELRXDW { w : self } } } } # [ doc = "RXD register" ] pub struct RXD { register : VolatileCell < u32 > } # [ doc = "RXD register" ] pub mod rxd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RXD { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RXDR { bits : u8 , } impl RXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - RX data received in previous transfers, double buffered" ] # [ inline ] pub fn rxd ( & self ) -> RXDR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RXDR { bits } } } } # [ doc = "TXD register" ] pub struct TXD { register : VolatileCell < u32 > } # [ doc = "TXD register" ] pub mod txd { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TXD { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } # [ doc = r" Proxy" ] pub struct _TXDW < 'a > { w : & 'a mut W , } impl < 'a > _TXDW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - TX data to be transferred" ] # [ inline ] pub fn txd ( & mut self ) -> _TXDW { _TXDW { w : self } } } } # [ doc = "Baud rate" ] pub struct BAUDRATE { register : VolatileCell < u32 > } # [ doc = "Baud rate" ] pub mod baudrate { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BAUDRATE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `BAUDRATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BAUDRATER { # [ doc = "1200 baud (actual rate: 1205)" ] BAUD1200 , # [ doc = "2400 baud (actual rate: 2396)" ] BAUD2400 , # [ doc = "4800 baud (actual rate: 4808)" ] BAUD4800 , # [ doc = "9600 baud (actual rate: 9598)" ] BAUD9600 , # [ doc = "14400 baud (actual rate: 14414)" ] BAUD14400 , # [ doc = "19200 baud (actual rate: 19208)" ] BAUD19200 , # [ doc = "28800 baud (actual rate: 28829)" ] BAUD28800 , # [ doc = "31250 baud" ] BAUD31250 , # [ doc = "38400 baud (actual rate: 38462)" ] BAUD38400 , # [ doc = "56000 baud (actual rate: 55944)" ] BAUD56000 , # [ doc = "57600 baud (actual rate: 57762)" ] BAUD57600 , # [ doc = "76800 baud (actual rate: 76923)" ] BAUD76800 , # [ doc = "115200 baud (actual rate: 115942)" ] BAUD115200 , # [ doc = "230400 baud (actual rate: 231884)" ] BAUD230400 , # [ doc = "250000 baud" ] BAUD250000 , # [ doc = "460800 baud (actual rate: 470588)" ] BAUD460800 , # [ doc = "921600 baud (actual rate: 941176)" ] BAUD921600 , # [ doc = "1Mega baud" ] BAUD1M , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl BAUDRATER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { BAUDRATER :: BAUD1200 => 0x0004_f000 , BAUDRATER :: BAUD2400 => 0x0009_d000 , BAUDRATER :: BAUD4800 => 0x0013_b000 , BAUDRATER :: BAUD9600 => 0x0027_5000 , BAUDRATER :: BAUD14400 => 0x003b_0000 , BAUDRATER :: BAUD19200 => 0x004e_a000 , BAUDRATER :: BAUD28800 => 0x0075_f000 , BAUDRATER :: BAUD31250 => 0x0080_0000 , BAUDRATER :: BAUD38400 => 0x009d_5000 , BAUDRATER :: BAUD56000 => 0x00e5_0000 , BAUDRATER :: BAUD57600 => 0x00eb_f000 , BAUDRATER :: BAUD76800 => 0x013a_9000 , BAUDRATER :: BAUD115200 => 0x01d7_e000 , BAUDRATER :: BAUD230400 => 0x03af_b000 , BAUDRATER :: BAUD250000 => 0x0400_0000 , BAUDRATER :: BAUD460800 => 0x075f_7000 , BAUDRATER :: BAUD921600 => 0x0ebe_d000 , BAUDRATER :: BAUD1M => 0x1000_0000 , BAUDRATER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> BAUDRATER { match value { 323584 => BAUDRATER :: BAUD1200 , 643072 => BAUDRATER :: BAUD2400 , 1290240 => BAUDRATER :: BAUD4800 , 2576384 => BAUDRATER :: BAUD9600 , 3866624 => BAUDRATER :: BAUD14400 , 5152768 => BAUDRATER :: BAUD19200 , 7729152 => BAUDRATER :: BAUD28800 , 8388608 => BAUDRATER :: BAUD31250 , 10309632 => BAUDRATER :: BAUD38400 , 15007744 => BAUDRATER :: BAUD56000 , 15462400 => BAUDRATER :: BAUD57600 , 20615168 => BAUDRATER :: BAUD76800 , 30924800 => BAUDRATER :: BAUD115200 , 61845504 => BAUDRATER :: BAUD230400 , 67108864 => BAUDRATER :: BAUD250000 , 123695104 => BAUDRATER :: BAUD460800 , 247386112 => BAUDRATER :: BAUD921600 , 268435456 => BAUDRATER :: BAUD1M , i => BAUDRATER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `BAUD1200`" ] # [ inline ] pub fn is_baud1200 ( & self ) -> bool { * self == BAUDRATER :: BAUD1200 } # [ doc = "Checks if the value of the field is `BAUD2400`" ] # [ inline ] pub fn is_baud2400 ( & self ) -> bool { * self == BAUDRATER :: BAUD2400 } # [ doc = "Checks if the value of the field is `BAUD4800`" ] # [ inline ] pub fn is_baud4800 ( & self ) -> bool { * self == BAUDRATER :: BAUD4800 } # [ doc = "Checks if the value of the field is `BAUD9600`" ] # [ inline ] pub fn is_baud9600 ( & self ) -> bool { * self == BAUDRATER :: BAUD9600 } # [ doc = "Checks if the value of the field is `BAUD14400`" ] # [ inline ] pub fn is_baud14400 ( & self ) -> bool { * self == BAUDRATER :: BAUD14400 } # [ doc = "Checks if the value of the field is `BAUD19200`" ] # [ inline ] pub fn is_baud19200 ( & self ) -> bool { * self == BAUDRATER :: BAUD19200 } # [ doc = "Checks if the value of the field is `BAUD28800`" ] # [ inline ] pub fn is_baud28800 ( & self ) -> bool { * self == BAUDRATER :: BAUD28800 } # [ doc = "Checks if the value of the field is `BAUD31250`" ] # [ inline ] pub fn is_baud31250 ( & self ) -> bool { * self == BAUDRATER :: BAUD31250 } # [ doc = "Checks if the value of the field is `BAUD38400`" ] # [ inline ] pub fn is_baud38400 ( & self ) -> bool { * self == BAUDRATER :: BAUD38400 } # [ doc = "Checks if the value of the field is `BAUD56000`" ] # [ inline ] pub fn is_baud56000 ( & self ) -> bool { * self == BAUDRATER :: BAUD56000 } # [ doc = "Checks if the value of the field is `BAUD57600`" ] # [ inline ] pub fn is_baud57600 ( & self ) -> bool { * self == BAUDRATER :: BAUD57600 } # [ doc = "Checks if the value of the field is `BAUD76800`" ] # [ inline ] pub fn is_baud76800 ( & self ) -> bool { * self == BAUDRATER :: BAUD76800 } # [ doc = "Checks if the value of the field is `BAUD115200`" ] # [ inline ] pub fn is_baud115200 ( & self ) -> bool { * self == BAUDRATER :: BAUD115200 } # [ doc = "Checks if the value of the field is `BAUD230400`" ] # [ inline ] pub fn is_baud230400 ( & self ) -> bool { * self == BAUDRATER :: BAUD230400 } # [ doc = "Checks if the value of the field is `BAUD250000`" ] # [ inline ] pub fn is_baud250000 ( & self ) -> bool { * self == BAUDRATER :: BAUD250000 } # [ doc = "Checks if the value of the field is `BAUD460800`" ] # [ inline ] pub fn is_baud460800 ( & self ) -> bool { * self == BAUDRATER :: BAUD460800 } # [ doc = "Checks if the value of the field is `BAUD921600`" ] # [ inline ] pub fn is_baud921600 ( & self ) -> bool { * self == BAUDRATER :: BAUD921600 } # [ doc = "Checks if the value of the field is `BAUD1M`" ] # [ inline ] pub fn is_baud1m ( & self ) -> bool { * self == BAUDRATER :: BAUD1M } } # [ doc = "Values that can be written to the field `BAUDRATE`" ] pub enum BAUDRATEW { # [ doc = "1200 baud (actual rate: 1205)" ] BAUD1200 , # [ doc = "2400 baud (actual rate: 2396)" ] BAUD2400 , # [ doc = "4800 baud (actual rate: 4808)" ] BAUD4800 , # [ doc = "9600 baud (actual rate: 9598)" ] BAUD9600 , # [ doc = "14400 baud (actual rate: 14414)" ] BAUD14400 , # [ doc = "19200 baud (actual rate: 19208)" ] BAUD19200 , # [ doc = "28800 baud (actual rate: 28829)" ] BAUD28800 , # [ doc = "31250 baud" ] BAUD31250 , # [ doc = "38400 baud (actual rate: 38462)" ] BAUD38400 , # [ doc = "56000 baud (actual rate: 55944)" ] BAUD56000 , # [ doc = "57600 baud (actual rate: 57762)" ] BAUD57600 , # [ doc = "76800 baud (actual rate: 76923)" ] BAUD76800 , # [ doc = "115200 baud (actual rate: 115942)" ] BAUD115200 , # [ doc = "230400 baud (actual rate: 231884)" ] BAUD230400 , # [ doc = "250000 baud" ] BAUD250000 , # [ doc = "460800 baud (actual rate: 470588)" ] BAUD460800 , # [ doc = "921600 baud (actual rate: 941176)" ] BAUD921600 , # [ doc = "1Mega baud" ] BAUD1M } impl BAUDRATEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { BAUDRATEW :: BAUD1200 => 323584 , BAUDRATEW :: BAUD2400 => 643072 , BAUDRATEW :: BAUD4800 => 1290240 , BAUDRATEW :: BAUD9600 => 2576384 , BAUDRATEW :: BAUD14400 => 3866624 , BAUDRATEW :: BAUD19200 => 5152768 , BAUDRATEW :: BAUD28800 => 7729152 , BAUDRATEW :: BAUD31250 => 8388608 , BAUDRATEW :: BAUD38400 => 10309632 , BAUDRATEW :: BAUD56000 => 15007744 , BAUDRATEW :: BAUD57600 => 15462400 , BAUDRATEW :: BAUD76800 => 20615168 , BAUDRATEW :: BAUD115200 => 30924800 , BAUDRATEW :: BAUD230400 => 61845504 , BAUDRATEW :: BAUD250000 => 67108864 , BAUDRATEW :: BAUD460800 => 123695104 , BAUDRATEW :: BAUD921600 => 247386112 , BAUDRATEW :: BAUD1M => 268435456 } } } # [ doc = r" Proxy" ] pub struct _BAUDRATEW < 'a > { w : & 'a mut W , } impl < 'a > _BAUDRATEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BAUDRATEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "1200 baud (actual rate: 1205)" ] # [ inline ] pub fn baud1200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD1200 ) } # [ doc = "2400 baud (actual rate: 2396)" ] # [ inline ] pub fn baud2400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD2400 ) } # [ doc = "4800 baud (actual rate: 4808)" ] # [ inline ] pub fn baud4800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD4800 ) } # [ doc = "9600 baud (actual rate: 9598)" ] # [ inline ] pub fn baud9600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD9600 ) } # [ doc = "14400 baud (actual rate: 14414)" ] # [ inline ] pub fn baud14400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD14400 ) } # [ doc = "19200 baud (actual rate: 19208)" ] # [ inline ] pub fn baud19200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD19200 ) } # [ doc = "28800 baud (actual rate: 28829)" ] # [ inline ] pub fn baud28800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD28800 ) } # [ doc = "31250 baud" ] # [ inline ] pub fn baud31250 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD31250 ) } # [ doc = "38400 baud (actual rate: 38462)" ] # [ inline ] pub fn baud38400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD38400 ) } # [ doc = "56000 baud (actual rate: 55944)" ] # [ inline ] pub fn baud56000 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD56000 ) } # [ doc = "57600 baud (actual rate: 57762)" ] # [ inline ] pub fn baud57600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD57600 ) } # [ doc = "76800 baud (actual rate: 76923)" ] # [ inline ] pub fn baud76800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD76800 ) } # [ doc = "115200 baud (actual rate: 115942)" ] # [ inline ] pub fn baud115200 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD115200 ) } # [ doc = "230400 baud (actual rate: 231884)" ] # [ inline ] pub fn baud230400 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD230400 ) } # [ doc = "250000 baud" ] # [ inline ] pub fn baud250000 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD250000 ) } # [ doc = "460800 baud (actual rate: 470588)" ] # [ inline ] pub fn baud460800 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD460800 ) } # [ doc = "921600 baud (actual rate: 941176)" ] # [ inline ] pub fn baud921600 ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD921600 ) } # [ doc = "1Mega baud" ] # [ inline ] pub fn baud1m ( self ) -> & 'a mut W { self . variant ( BAUDRATEW :: BAUD1M ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Baud rate" ] # [ inline ] pub fn baudrate ( & self ) -> BAUDRATER { BAUDRATER :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Baud rate" ] # [ inline ] pub fn baudrate ( & mut self ) -> _BAUDRATEW { _BAUDRATEW { w : self } } } } # [ doc = "Configuration of parity and hardware flow control" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration of parity and hardware flow control" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HWFC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HWFCR { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl HWFCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HWFCR :: DISABLED => false , HWFCR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HWFCR { match value { false => HWFCR :: DISABLED , true => HWFCR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == HWFCR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == HWFCR :: ENABLED } } # [ doc = "Possible values of the field `PARITY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PARITYR { # [ doc = "Exclude parity bit" ] EXCLUDED , # [ doc = "Include parity bit" ] INCLUDED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl PARITYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PARITYR :: EXCLUDED => 0 , PARITYR :: INCLUDED => 0x07 , PARITYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PARITYR { match value { 0 => PARITYR :: EXCLUDED , 7 => PARITYR :: INCLUDED , i => PARITYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == PARITYR :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == PARITYR :: INCLUDED } } # [ doc = "Values that can be written to the field `HWFC`" ] pub enum HWFCW { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl HWFCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HWFCW :: DISABLED => false , HWFCW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _HWFCW < 'a > { w : & 'a mut W , } impl < 'a > _HWFCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HWFCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( HWFCW :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( HWFCW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PARITY`" ] pub enum PARITYW { # [ doc = "Exclude parity bit" ] EXCLUDED , # [ doc = "Include parity bit" ] INCLUDED } impl PARITYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PARITYW :: EXCLUDED => 0 , PARITYW :: INCLUDED => 7 } } } # [ doc = r" Proxy" ] pub struct _PARITYW < 'a > { w : & 'a mut W , } impl < 'a > _PARITYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PARITYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Exclude parity bit" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( PARITYW :: EXCLUDED ) } # [ doc = "Include parity bit" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( PARITYW :: INCLUDED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Hardware flow control" ] # [ inline ] pub fn hwfc ( & self ) -> HWFCR { HWFCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 1:3 - Parity" ] # [ inline ] pub fn parity ( & self ) -> PARITYR { PARITYR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Hardware flow control" ] # [ inline ] pub fn hwfc ( & mut self ) -> _HWFCW { _HWFCW { w : self } } # [ doc = "Bits 1:3 - Parity" ] # [ inline ] pub fn parity ( & mut self ) -> _PARITYW { _PARITYW { w : self } } } } } # [ doc = "Serial Peripheral Interface Master with EasyDMA 0" ] pub struct SPIM0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIM0 { } impl SPIM0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spim0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for SPIM0 { type Target = spim0 :: RegisterBlock ; fn deref ( & self ) -> & spim0 :: RegisterBlock { unsafe { & * SPIM0 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface Master with EasyDMA 0" ] pub mod spim0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 16usize ] , # [ doc = "0x10 - Start SPI transaction" ] pub tasks_start : TASKS_START , # [ doc = "0x14 - Stop SPI transaction" ] pub tasks_stop : TASKS_STOP , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x1c - Suspend SPI transaction" ] pub tasks_suspend : TASKS_SUSPEND , # [ doc = "0x20 - Resume SPI transaction" ] pub tasks_resume : TASKS_RESUME , _reserved2 : [ u8 ; 224usize ] , # [ doc = "0x104 - SPI transaction has stopped" ] pub events_stopped : EVENTS_STOPPED , _reserved3 : [ u8 ; 8usize ] , # [ doc = "0x110 - End of RXD buffer reached" ] pub events_endrx : EVENTS_ENDRX , _reserved4 : [ u8 ; 4usize ] , # [ doc = "0x118 - End of RXD buffer and TXD buffer reached" ] pub events_end : EVENTS_END , _reserved5 : [ u8 ; 4usize ] , # [ doc = "0x120 - End of TXD buffer reached" ] pub events_endtx : EVENTS_ENDTX , _reserved6 : [ u8 ; 40usize ] , # [ doc = "0x14c - Transaction started" ] pub events_started : EVENTS_STARTED , _reserved7 : [ u8 ; 176usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved8 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved9 : [ u8 ; 500usize ] , # [ doc = "0x500 - Enable SPIM" ] pub enable : ENABLE , _reserved10 : [ u8 ; 32usize ] , # [ doc = "0x524 - SPI frequency" ] pub frequency : FREQUENCY , _reserved11 : [ u8 ; 44usize ] , # [ doc = "0x554 - Configuration register" ] pub config : CONFIG , _reserved12 : [ u8 ; 104usize ] , # [ doc = "0x5c0 - Over-read character. Character clocked out in case and over-read of the TXD buffer." ] pub orc : ORC , } # [ doc = "Start SPI transaction" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start SPI transaction" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop SPI transaction" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop SPI transaction" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Suspend SPI transaction" ] pub struct TASKS_SUSPEND { register : VolatileCell < u32 > } # [ doc = "Suspend SPI transaction" ] pub mod tasks_suspend { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SUSPEND { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Resume SPI transaction" ] pub struct TASKS_RESUME { register : VolatileCell < u32 > } # [ doc = "Resume SPI transaction" ] pub mod tasks_resume { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RESUME { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "SPI transaction has stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "SPI transaction has stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "End of RXD buffer reached" ] pub struct EVENTS_ENDRX { register : VolatileCell < u32 > } # [ doc = "End of RXD buffer reached" ] pub mod events_endrx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDRX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "End of RXD buffer and TXD buffer reached" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "End of RXD buffer and TXD buffer reached" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "End of TXD buffer reached" ] pub struct EVENTS_ENDTX { register : VolatileCell < u32 > } # [ doc = "End of TXD buffer reached" ] pub mod events_endtx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDTX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Transaction started" ] pub struct EVENTS_STARTED { register : VolatileCell < u32 > } # [ doc = "Transaction started" ] pub mod events_started { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END_START`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum END_STARTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_STARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { END_STARTR :: DISABLED => false , END_STARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> END_STARTR { match value { false => END_STARTR :: DISABLED , true => END_STARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == END_STARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == END_STARTR :: ENABLED } } # [ doc = "Values that can be written to the field `END_START`" ] pub enum END_STARTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_STARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { END_STARTW :: DISABLED => false , END_STARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _END_STARTW < 'a > { w : & 'a mut W , } impl < 'a > _END_STARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : END_STARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( END_STARTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( END_STARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 17 - Shortcut between END event and START task" ] # [ inline ] pub fn end_start ( & self ) -> END_STARTR { END_STARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 17 - Shortcut between END event and START task" ] # [ inline ] pub fn end_start ( & mut self ) -> _END_STARTW { _END_STARTW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Enable" ] SET } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDRXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Enable" ] SET } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDTXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Enable" ] SET } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] CLEAR } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDRXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Disable" ] CLEAR } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDTXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] CLEAR } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } } } # [ doc = "Enable SPIM" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable SPIM" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable SPIM" ] DISABLED , # [ doc = "Enable SPIM" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x07 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 7 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable SPIM" ] DISABLED , # [ doc = "Enable SPIM" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 7 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable SPIM" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable SPIM" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable SPIM" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable SPIM" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "SPI frequency" ] pub struct FREQUENCY { register : VolatileCell < u32 > } # [ doc = "SPI frequency" ] pub mod frequency { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FREQUENCY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FREQUENCY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FREQUENCYR { # [ doc = "125 kbps" ] K125 , # [ doc = "250 kbps" ] K250 , # [ doc = "500 kbps" ] K500 , # [ doc = "1 Mbps" ] M1 , # [ doc = "2 Mbps" ] M2 , # [ doc = "4 Mbps" ] M4 , # [ doc = "8 Mbps" ] M8 , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl FREQUENCYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { FREQUENCYR :: K125 => 0x0200_0000 , FREQUENCYR :: K250 => 0x0400_0000 , FREQUENCYR :: K500 => 0x0800_0000 , FREQUENCYR :: M1 => 0x1000_0000 , FREQUENCYR :: M2 => 0x2000_0000 , FREQUENCYR :: M4 => 0x4000_0000 , FREQUENCYR :: M8 => 0x8000_0000 , FREQUENCYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> FREQUENCYR { match value { 33554432 => FREQUENCYR :: K125 , 67108864 => FREQUENCYR :: K250 , 134217728 => FREQUENCYR :: K500 , 268435456 => FREQUENCYR :: M1 , 536870912 => FREQUENCYR :: M2 , 1073741824 => FREQUENCYR :: M4 , 2147483648 => FREQUENCYR :: M8 , i => FREQUENCYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `K125`" ] # [ inline ] pub fn is_k125 ( & self ) -> bool { * self == FREQUENCYR :: K125 } # [ doc = "Checks if the value of the field is `K250`" ] # [ inline ] pub fn is_k250 ( & self ) -> bool { * self == FREQUENCYR :: K250 } # [ doc = "Checks if the value of the field is `K500`" ] # [ inline ] pub fn is_k500 ( & self ) -> bool { * self == FREQUENCYR :: K500 } # [ doc = "Checks if the value of the field is `M1`" ] # [ inline ] pub fn is_m1 ( & self ) -> bool { * self == FREQUENCYR :: M1 } # [ doc = "Checks if the value of the field is `M2`" ] # [ inline ] pub fn is_m2 ( & self ) -> bool { * self == FREQUENCYR :: M2 } # [ doc = "Checks if the value of the field is `M4`" ] # [ inline ] pub fn is_m4 ( & self ) -> bool { * self == FREQUENCYR :: M4 } # [ doc = "Checks if the value of the field is `M8`" ] # [ inline ] pub fn is_m8 ( & self ) -> bool { * self == FREQUENCYR :: M8 } } # [ doc = "Values that can be written to the field `FREQUENCY`" ] pub enum FREQUENCYW { # [ doc = "125 kbps" ] K125 , # [ doc = "250 kbps" ] K250 , # [ doc = "500 kbps" ] K500 , # [ doc = "1 Mbps" ] M1 , # [ doc = "2 Mbps" ] M2 , # [ doc = "4 Mbps" ] M4 , # [ doc = "8 Mbps" ] M8 } impl FREQUENCYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { FREQUENCYW :: K125 => 33554432 , FREQUENCYW :: K250 => 67108864 , FREQUENCYW :: K500 => 134217728 , FREQUENCYW :: M1 => 268435456 , FREQUENCYW :: M2 => 536870912 , FREQUENCYW :: M4 => 1073741824 , FREQUENCYW :: M8 => 2147483648 } } } # [ doc = r" Proxy" ] pub struct _FREQUENCYW < 'a > { w : & 'a mut W , } impl < 'a > _FREQUENCYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FREQUENCYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "125 kbps" ] # [ inline ] pub fn k125 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K125 ) } # [ doc = "250 kbps" ] # [ inline ] pub fn k250 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K250 ) } # [ doc = "500 kbps" ] # [ inline ] pub fn k500 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K500 ) } # [ doc = "1 Mbps" ] # [ inline ] pub fn m1 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M1 ) } # [ doc = "2 Mbps" ] # [ inline ] pub fn m2 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M2 ) } # [ doc = "4 Mbps" ] # [ inline ] pub fn m4 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M4 ) } # [ doc = "8 Mbps" ] # [ inline ] pub fn m8 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M8 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - SPI master data rate" ] # [ inline ] pub fn frequency ( & self ) -> FREQUENCYR { FREQUENCYR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - SPI master data rate" ] # [ inline ] pub fn frequency ( & mut self ) -> _FREQUENCYW { _FREQUENCYW { w : self } } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ORDER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORDERR { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ORDERR :: MSBFIRST => false , ORDERR :: LSBFIRST => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ORDERR { match value { false => ORDERR :: MSBFIRST , true => ORDERR :: LSBFIRST , } } # [ doc = "Checks if the value of the field is `MSBFIRST`" ] # [ inline ] pub fn is_msb_first ( & self ) -> bool { * self == ORDERR :: MSBFIRST } # [ doc = "Checks if the value of the field is `LSBFIRST`" ] # [ inline ] pub fn is_lsb_first ( & self ) -> bool { * self == ORDERR :: LSBFIRST } } # [ doc = "Possible values of the field `CPHA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHAR { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPHAR :: LEADING => false , CPHAR :: TRAILING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPHAR { match value { false => CPHAR :: LEADING , true => CPHAR :: TRAILING , } } # [ doc = "Checks if the value of the field is `LEADING`" ] # [ inline ] pub fn is_leading ( & self ) -> bool { * self == CPHAR :: LEADING } # [ doc = "Checks if the value of the field is `TRAILING`" ] # [ inline ] pub fn is_trailing ( & self ) -> bool { * self == CPHAR :: TRAILING } } # [ doc = "Possible values of the field `CPOL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOLR { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPOLR :: ACTIVEHIGH => false , CPOLR :: ACTIVELOW => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPOLR { match value { false => CPOLR :: ACTIVEHIGH , true => CPOLR :: ACTIVELOW , } } # [ doc = "Checks if the value of the field is `ACTIVEHIGH`" ] # [ inline ] pub fn is_active_high ( & self ) -> bool { * self == CPOLR :: ACTIVEHIGH } # [ doc = "Checks if the value of the field is `ACTIVELOW`" ] # [ inline ] pub fn is_active_low ( & self ) -> bool { * self == CPOLR :: ACTIVELOW } } # [ doc = "Values that can be written to the field `ORDER`" ] pub enum ORDERW { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ORDERW :: MSBFIRST => false , ORDERW :: LSBFIRST => true } } } # [ doc = r" Proxy" ] pub struct _ORDERW < 'a > { w : & 'a mut W , } impl < 'a > _ORDERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ORDERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Most significant bit shifted out first" ] # [ inline ] pub fn msb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: MSBFIRST ) } # [ doc = "Least significant bit shifted out first" ] # [ inline ] pub fn lsb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: LSBFIRST ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPHA`" ] pub enum CPHAW { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPHAW :: LEADING => false , CPHAW :: TRAILING => true } } } # [ doc = r" Proxy" ] pub struct _CPHAW < 'a > { w : & 'a mut W , } impl < 'a > _CPHAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPHAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] # [ inline ] pub fn leading ( self ) -> & 'a mut W { self . variant ( CPHAW :: LEADING ) } # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] # [ inline ] pub fn trailing ( self ) -> & 'a mut W { self . variant ( CPHAW :: TRAILING ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPOL`" ] pub enum CPOLW { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPOLW :: ACTIVEHIGH => false , CPOLW :: ACTIVELOW => true } } } # [ doc = r" Proxy" ] pub struct _CPOLW < 'a > { w : & 'a mut W , } impl < 'a > _CPOLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPOLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Active high" ] # [ inline ] pub fn active_high ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVEHIGH ) } # [ doc = "Active low" ] # [ inline ] pub fn active_low ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVELOW ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & self ) -> ORDERR { ORDERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & self ) -> CPHAR { CPHAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & self ) -> CPOLR { CPOLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & mut self ) -> _ORDERW { _ORDERW { w : self } } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & mut self ) -> _CPHAW { _CPHAW { w : self } } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & mut self ) -> _CPOLW { _CPOLW { w : self } } } } # [ doc = "Over-read character. Character clocked out in case and over-read of the TXD buffer." ] pub struct ORC { register : VolatileCell < u32 > } # [ doc = "Over-read character. Character clocked out in case and over-read of the TXD buffer." ] pub mod orc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ORC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ORCR { bits : u8 , } impl ORCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ORCW < 'a > { w : & 'a mut W , } impl < 'a > _ORCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer." ] # [ inline ] pub fn orc ( & self ) -> ORCR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ORCR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer." ] # [ inline ] pub fn orc ( & mut self ) -> _ORCW { _ORCW { w : self } } } } } # [ doc = "SPI Slave 0" ] pub struct SPIS0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIS0 { } impl SPIS0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spis0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for SPIS0 { type Target = spis0 :: RegisterBlock ; fn deref ( & self ) -> & spis0 :: RegisterBlock { unsafe { & * SPIS0 :: ptr ( ) } } } # [ doc = "SPI Slave 0" ] pub mod spis0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 36usize ] , # [ doc = "0x24 - Acquire SPI semaphore" ] pub tasks_acquire : TASKS_ACQUIRE , # [ doc = "0x28 - Release SPI semaphore, enabling the SPI slave to acquire it" ] pub tasks_release : TASKS_RELEASE , _reserved1 : [ u8 ; 216usize ] , # [ doc = "0x104 - Granted transaction completed" ] pub events_end : EVENTS_END , _reserved2 : [ u8 ; 8usize ] , # [ doc = "0x110 - End of RXD buffer reached" ] pub events_endrx : EVENTS_ENDRX , _reserved3 : [ u8 ; 20usize ] , # [ doc = "0x128 - Semaphore acquired" ] pub events_acquired : EVENTS_ACQUIRED , _reserved4 : [ u8 ; 212usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved5 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved6 : [ u8 ; 244usize ] , # [ doc = "0x400 - Semaphore status register" ] pub semstat : SEMSTAT , _reserved7 : [ u8 ; 60usize ] , # [ doc = "0x440 - Status from last transaction" ] pub status : STATUS , _reserved8 : [ u8 ; 188usize ] , # [ doc = "0x500 - Enable SPI slave" ] pub enable : ENABLE , _reserved9 : [ u8 ; 80usize ] , # [ doc = "0x554 - Configuration register" ] pub config : CONFIG , _reserved10 : [ u8 ; 4usize ] , # [ doc = "0x55c - Default character. Character clocked out in case of an ignored transaction." ] pub def : DEF , _reserved11 : [ u8 ; 96usize ] , # [ doc = "0x5c0 - Over-read character" ] pub orc : ORC , } # [ doc = "Acquire SPI semaphore" ] pub struct TASKS_ACQUIRE { register : VolatileCell < u32 > } # [ doc = "Acquire SPI semaphore" ] pub mod tasks_acquire { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_ACQUIRE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Release SPI semaphore, enabling the SPI slave to acquire it" ] pub struct TASKS_RELEASE { register : VolatileCell < u32 > } # [ doc = "Release SPI semaphore, enabling the SPI slave to acquire it" ] pub mod tasks_release { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RELEASE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Granted transaction completed" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "Granted transaction completed" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "End of RXD buffer reached" ] pub struct EVENTS_ENDRX { register : VolatileCell < u32 > } # [ doc = "End of RXD buffer reached" ] pub mod events_endrx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDRX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Semaphore acquired" ] pub struct EVENTS_ACQUIRED { register : VolatileCell < u32 > } # [ doc = "Semaphore acquired" ] pub mod events_acquired { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ACQUIRED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END_ACQUIRE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum END_ACQUIRER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_ACQUIRER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { END_ACQUIRER :: DISABLED => false , END_ACQUIRER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> END_ACQUIRER { match value { false => END_ACQUIRER :: DISABLED , true => END_ACQUIRER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == END_ACQUIRER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == END_ACQUIRER :: ENABLED } } # [ doc = "Values that can be written to the field `END_ACQUIRE`" ] pub enum END_ACQUIREW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl END_ACQUIREW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { END_ACQUIREW :: DISABLED => false , END_ACQUIREW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _END_ACQUIREW < 'a > { w : & 'a mut W , } impl < 'a > _END_ACQUIREW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : END_ACQUIREW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( END_ACQUIREW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( END_ACQUIREW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 2 - Shortcut between END event and ACQUIRE task" ] # [ inline ] pub fn end_acquire ( & self ) -> END_ACQUIRER { END_ACQUIRER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 2 - Shortcut between END event and ACQUIRE task" ] # [ inline ] pub fn end_acquire ( & mut self ) -> _END_ACQUIREW { _END_ACQUIREW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `ACQUIRED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACQUIREDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ACQUIREDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ACQUIREDR :: DISABLED => false , ACQUIREDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ACQUIREDR { match value { false => ACQUIREDR :: DISABLED , true => ACQUIREDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ACQUIREDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ACQUIREDR :: ENABLED } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Enable" ] SET } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDRXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ACQUIRED`" ] pub enum ACQUIREDW { # [ doc = "Enable" ] SET } impl ACQUIREDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ACQUIREDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ACQUIREDW < 'a > { w : & 'a mut W , } impl < 'a > _ACQUIREDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ACQUIREDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ACQUIREDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Enable interrupt for ACQUIRED event" ] # [ inline ] pub fn acquired ( & self ) -> ACQUIREDR { ACQUIREDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 10 - Write '1' to Enable interrupt for ACQUIRED event" ] # [ inline ] pub fn acquired ( & mut self ) -> _ACQUIREDW { _ACQUIREDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `ACQUIRED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACQUIREDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ACQUIREDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ACQUIREDR :: DISABLED => false , ACQUIREDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ACQUIREDR { match value { false => ACQUIREDR :: DISABLED , true => ACQUIREDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ACQUIREDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ACQUIREDR :: ENABLED } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] CLEAR } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDRXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ACQUIRED`" ] pub enum ACQUIREDW { # [ doc = "Disable" ] CLEAR } impl ACQUIREDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ACQUIREDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ACQUIREDW < 'a > { w : & 'a mut W , } impl < 'a > _ACQUIREDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ACQUIREDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ACQUIREDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Disable interrupt for ACQUIRED event" ] # [ inline ] pub fn acquired ( & self ) -> ACQUIREDR { ACQUIREDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 10 - Write '1' to Disable interrupt for ACQUIRED event" ] # [ inline ] pub fn acquired ( & mut self ) -> _ACQUIREDW { _ACQUIREDW { w : self } } } } # [ doc = "Semaphore status register" ] pub struct SEMSTAT { register : VolatileCell < u32 > } # [ doc = "Semaphore status register" ] pub mod semstat { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: SEMSTAT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `SEMSTAT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEMSTATR { # [ doc = "Semaphore is free" ] FREE , # [ doc = "Semaphore is assigned to CPU" ] CPU , # [ doc = "Semaphore is assigned to SPI slave" ] SPIS , # [ doc = "Semaphore is assigned to SPI but a handover to the CPU is pending" ] CPUPENDING } impl SEMSTATR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SEMSTATR :: FREE => 0 , SEMSTATR :: CPU => 0x01 , SEMSTATR :: SPIS => 0x02 , SEMSTATR :: CPUPENDING => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SEMSTATR { match value { 0 => SEMSTATR :: FREE , 1 => SEMSTATR :: CPU , 2 => SEMSTATR :: SPIS , 3 => SEMSTATR :: CPUPENDING , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `FREE`" ] # [ inline ] pub fn is_free ( & self ) -> bool { * self == SEMSTATR :: FREE } # [ doc = "Checks if the value of the field is `CPU`" ] # [ inline ] pub fn is_cpu ( & self ) -> bool { * self == SEMSTATR :: CPU } # [ doc = "Checks if the value of the field is `SPIS`" ] # [ inline ] pub fn is_spis ( & self ) -> bool { * self == SEMSTATR :: SPIS } # [ doc = "Checks if the value of the field is `CPUPENDING`" ] # [ inline ] pub fn is_cpupending ( & self ) -> bool { * self == SEMSTATR :: CPUPENDING } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Semaphore status" ] # [ inline ] pub fn semstat ( & self ) -> SEMSTATR { SEMSTATR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } } # [ doc = "Status from last transaction" ] pub struct STATUS { register : VolatileCell < u32 > } # [ doc = "Status from last transaction" ] pub mod status { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: STATUS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERREAD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERREADR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERREADR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERREADR :: NOTPRESENT => false , OVERREADR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERREADR { match value { false => OVERREADR :: NOTPRESENT , true => OVERREADR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == OVERREADR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == OVERREADR :: PRESENT } } # [ doc = "Possible values of the field `OVERFLOW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERFLOWR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl OVERFLOWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERFLOWR :: NOTPRESENT => false , OVERFLOWR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERFLOWR { match value { false => OVERFLOWR :: NOTPRESENT , true => OVERFLOWR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == OVERFLOWR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == OVERFLOWR :: PRESENT } } # [ doc = "Values that can be written to the field `OVERREAD`" ] pub enum OVERREADW { # [ doc = "Write: clear error on writing '1'" ] CLEAR } impl OVERREADW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERREADW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _OVERREADW < 'a > { w : & 'a mut W , } impl < 'a > _OVERREADW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERREADW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: clear error on writing '1'" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( OVERREADW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVERFLOW`" ] pub enum OVERFLOWW { # [ doc = "Write: clear error on writing '1'" ] CLEAR } impl OVERFLOWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERFLOWW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _OVERFLOWW < 'a > { w : & 'a mut W , } impl < 'a > _OVERFLOWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERFLOWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: clear error on writing '1'" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( OVERFLOWW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - TX buffer over-read detected, and prevented" ] # [ inline ] pub fn overread ( & self ) -> OVERREADR { OVERREADR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - RX buffer overflow detected, and prevented" ] # [ inline ] pub fn overflow ( & self ) -> OVERFLOWR { OVERFLOWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - TX buffer over-read detected, and prevented" ] # [ inline ] pub fn overread ( & mut self ) -> _OVERREADW { _OVERREADW { w : self } } # [ doc = "Bit 1 - RX buffer overflow detected, and prevented" ] # [ inline ] pub fn overflow ( & mut self ) -> _OVERFLOWW { _OVERFLOWW { w : self } } } } # [ doc = "Enable SPI slave" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable SPI slave" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable SPI slave" ] DISABLED , # [ doc = "Enable SPI slave" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x02 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 2 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable SPI slave" ] DISABLED , # [ doc = "Enable SPI slave" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 2 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable SPI slave" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable SPI slave" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable SPI slave" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable SPI slave" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ORDER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORDERR { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ORDERR :: MSBFIRST => false , ORDERR :: LSBFIRST => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ORDERR { match value { false => ORDERR :: MSBFIRST , true => ORDERR :: LSBFIRST , } } # [ doc = "Checks if the value of the field is `MSBFIRST`" ] # [ inline ] pub fn is_msb_first ( & self ) -> bool { * self == ORDERR :: MSBFIRST } # [ doc = "Checks if the value of the field is `LSBFIRST`" ] # [ inline ] pub fn is_lsb_first ( & self ) -> bool { * self == ORDERR :: LSBFIRST } } # [ doc = "Possible values of the field `CPHA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHAR { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPHAR :: LEADING => false , CPHAR :: TRAILING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPHAR { match value { false => CPHAR :: LEADING , true => CPHAR :: TRAILING , } } # [ doc = "Checks if the value of the field is `LEADING`" ] # [ inline ] pub fn is_leading ( & self ) -> bool { * self == CPHAR :: LEADING } # [ doc = "Checks if the value of the field is `TRAILING`" ] # [ inline ] pub fn is_trailing ( & self ) -> bool { * self == CPHAR :: TRAILING } } # [ doc = "Possible values of the field `CPOL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOLR { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPOLR :: ACTIVEHIGH => false , CPOLR :: ACTIVELOW => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPOLR { match value { false => CPOLR :: ACTIVEHIGH , true => CPOLR :: ACTIVELOW , } } # [ doc = "Checks if the value of the field is `ACTIVEHIGH`" ] # [ inline ] pub fn is_active_high ( & self ) -> bool { * self == CPOLR :: ACTIVEHIGH } # [ doc = "Checks if the value of the field is `ACTIVELOW`" ] # [ inline ] pub fn is_active_low ( & self ) -> bool { * self == CPOLR :: ACTIVELOW } } # [ doc = "Values that can be written to the field `ORDER`" ] pub enum ORDERW { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ORDERW :: MSBFIRST => false , ORDERW :: LSBFIRST => true } } } # [ doc = r" Proxy" ] pub struct _ORDERW < 'a > { w : & 'a mut W , } impl < 'a > _ORDERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ORDERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Most significant bit shifted out first" ] # [ inline ] pub fn msb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: MSBFIRST ) } # [ doc = "Least significant bit shifted out first" ] # [ inline ] pub fn lsb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: LSBFIRST ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPHA`" ] pub enum CPHAW { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPHAW :: LEADING => false , CPHAW :: TRAILING => true } } } # [ doc = r" Proxy" ] pub struct _CPHAW < 'a > { w : & 'a mut W , } impl < 'a > _CPHAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPHAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] # [ inline ] pub fn leading ( self ) -> & 'a mut W { self . variant ( CPHAW :: LEADING ) } # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] # [ inline ] pub fn trailing ( self ) -> & 'a mut W { self . variant ( CPHAW :: TRAILING ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPOL`" ] pub enum CPOLW { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPOLW :: ACTIVEHIGH => false , CPOLW :: ACTIVELOW => true } } } # [ doc = r" Proxy" ] pub struct _CPOLW < 'a > { w : & 'a mut W , } impl < 'a > _CPOLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPOLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Active high" ] # [ inline ] pub fn active_high ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVEHIGH ) } # [ doc = "Active low" ] # [ inline ] pub fn active_low ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVELOW ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & self ) -> ORDERR { ORDERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & self ) -> CPHAR { CPHAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & self ) -> CPOLR { CPOLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & mut self ) -> _ORDERW { _ORDERW { w : self } } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & mut self ) -> _CPHAW { _CPHAW { w : self } } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & mut self ) -> _CPOLW { _CPOLW { w : self } } } } # [ doc = "Default character. Character clocked out in case of an ignored transaction." ] pub struct DEF { register : VolatileCell < u32 > } # [ doc = "Default character. Character clocked out in case of an ignored transaction." ] pub mod def { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DEF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct DEFR { bits : u8 , } impl DEFR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _DEFW < 'a > { w : & 'a mut W , } impl < 'a > _DEFW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction." ] # [ inline ] pub fn def ( & self ) -> DEFR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; DEFR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction." ] # [ inline ] pub fn def ( & mut self ) -> _DEFW { _DEFW { w : self } } } } # [ doc = "Over-read character" ] pub struct ORC { register : VolatileCell < u32 > } # [ doc = "Over-read character" ] pub mod orc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ORC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ORCR { bits : u8 , } impl ORCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ORCW < 'a > { w : & 'a mut W , } impl < 'a > _ORCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer." ] # [ inline ] pub fn orc ( & self ) -> ORCR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ORCR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer." ] # [ inline ] pub fn orc ( & mut self ) -> _ORCW { _ORCW { w : self } } } } } # [ doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0" ] pub struct TWIM0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWIM0 { } impl TWIM0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twim0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for TWIM0 { type Target = twim0 :: RegisterBlock ; fn deref ( & self ) -> & twim0 :: RegisterBlock { unsafe { & * TWIM0 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0" ] pub mod twim0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start TWI receive sequence" ] pub tasks_startrx : TASKS_STARTRX , _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x08 - Start TWI transmit sequence" ] pub tasks_starttx : TASKS_STARTTX , _reserved1 : [ u8 ; 8usize ] , # [ doc = "0x14 - Stop TWI transaction. Must be issued while the TWI master is not suspended." ] pub tasks_stop : TASKS_STOP , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x1c - Suspend TWI transaction" ] pub tasks_suspend : TASKS_SUSPEND , # [ doc = "0x20 - Resume TWI transaction" ] pub tasks_resume : TASKS_RESUME , _reserved3 : [ u8 ; 224usize ] , # [ doc = "0x104 - TWI stopped" ] pub events_stopped : EVENTS_STOPPED , _reserved4 : [ u8 ; 28usize ] , # [ doc = "0x124 - TWI error" ] pub events_error : EVENTS_ERROR , _reserved5 : [ u8 ; 32usize ] , # [ doc = "0x148 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended." ] pub events_suspended : EVENTS_SUSPENDED , # [ doc = "0x14c - Receive sequence started" ] pub events_rxstarted : EVENTS_RXSTARTED , # [ doc = "0x150 - Transmit sequence started" ] pub events_txstarted : EVENTS_TXSTARTED , _reserved6 : [ u8 ; 8usize ] , # [ doc = "0x15c - Byte boundary, starting to receive the last byte" ] pub events_lastrx : EVENTS_LASTRX , # [ doc = "0x160 - Byte boundary, starting to transmit the last byte" ] pub events_lasttx : EVENTS_LASTTX , _reserved7 : [ u8 ; 156usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved8 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved9 : [ u8 ; 440usize ] , # [ doc = "0x4c4 - Error source" ] pub errorsrc : ERRORSRC , _reserved10 : [ u8 ; 56usize ] , # [ doc = "0x500 - Enable TWIM" ] pub enable : ENABLE , _reserved11 : [ u8 ; 32usize ] , # [ doc = "0x524 - TWI frequency" ] pub frequency : FREQUENCY , _reserved12 : [ u8 ; 96usize ] , # [ doc = "0x588 - Address used in the TWI transfer" ] pub address : ADDRESS , } # [ doc = "Start TWI receive sequence" ] pub struct TASKS_STARTRX { register : VolatileCell < u32 > } # [ doc = "Start TWI receive sequence" ] pub mod tasks_startrx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start TWI transmit sequence" ] pub struct TASKS_STARTTX { register : VolatileCell < u32 > } # [ doc = "Start TWI transmit sequence" ] pub mod tasks_starttx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended." ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended." ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Suspend TWI transaction" ] pub struct TASKS_SUSPEND { register : VolatileCell < u32 > } # [ doc = "Suspend TWI transaction" ] pub mod tasks_suspend { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SUSPEND { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Resume TWI transaction" ] pub struct TASKS_RESUME { register : VolatileCell < u32 > } # [ doc = "Resume TWI transaction" ] pub mod tasks_resume { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RESUME { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "TWI stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI error" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "TWI error" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended." ] pub struct EVENTS_SUSPENDED { register : VolatileCell < u32 > } # [ doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended." ] pub mod events_suspended { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SUSPENDED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Receive sequence started" ] pub struct EVENTS_RXSTARTED { register : VolatileCell < u32 > } # [ doc = "Receive sequence started" ] pub mod events_rxstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Transmit sequence started" ] pub struct EVENTS_TXSTARTED { register : VolatileCell < u32 > } # [ doc = "Transmit sequence started" ] pub mod events_txstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Byte boundary, starting to receive the last byte" ] pub struct EVENTS_LASTRX { register : VolatileCell < u32 > } # [ doc = "Byte boundary, starting to receive the last byte" ] pub mod events_lastrx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_LASTRX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Byte boundary, starting to transmit the last byte" ] pub struct EVENTS_LASTTX { register : VolatileCell < u32 > } # [ doc = "Byte boundary, starting to transmit the last byte" ] pub mod events_lasttx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_LASTTX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `LASTTX_STARTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTX_STARTRXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_STARTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTX_STARTRXR :: DISABLED => false , LASTTX_STARTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTX_STARTRXR { match value { false => LASTTX_STARTRXR :: DISABLED , true => LASTTX_STARTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTX_STARTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTX_STARTRXR :: ENABLED } } # [ doc = "Possible values of the field `LASTTX_SUSPEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTX_SUSPENDR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_SUSPENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTX_SUSPENDR :: DISABLED => false , LASTTX_SUSPENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTX_SUSPENDR { match value { false => LASTTX_SUSPENDR :: DISABLED , true => LASTTX_SUSPENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTX_SUSPENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTX_SUSPENDR :: ENABLED } } # [ doc = "Possible values of the field `LASTTX_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTX_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTX_STOPR :: DISABLED => false , LASTTX_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTX_STOPR { match value { false => LASTTX_STOPR :: DISABLED , true => LASTTX_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTX_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTX_STOPR :: ENABLED } } # [ doc = "Possible values of the field `LASTRX_STARTTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTRX_STARTTXR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTRX_STARTTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTRX_STARTTXR :: DISABLED => false , LASTRX_STARTTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTRX_STARTTXR { match value { false => LASTRX_STARTTXR :: DISABLED , true => LASTRX_STARTTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTRX_STARTTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTRX_STARTTXR :: ENABLED } } # [ doc = "Possible values of the field `LASTRX_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTRX_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTRX_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTRX_STOPR :: DISABLED => false , LASTRX_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTRX_STOPR { match value { false => LASTRX_STOPR :: DISABLED , true => LASTRX_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTRX_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTRX_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `LASTTX_STARTRX`" ] pub enum LASTTX_STARTRXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_STARTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTX_STARTRXW :: DISABLED => false , LASTTX_STARTRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTTX_STARTRXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTX_STARTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTX_STARTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTTX_STARTRXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTTX_STARTRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTTX_SUSPEND`" ] pub enum LASTTX_SUSPENDW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_SUSPENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTX_SUSPENDW :: DISABLED => false , LASTTX_SUSPENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTTX_SUSPENDW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTX_SUSPENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTX_SUSPENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTTX_SUSPENDW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTTX_SUSPENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTTX_STOP`" ] pub enum LASTTX_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTTX_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTX_STOPW :: DISABLED => false , LASTTX_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTTX_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTX_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTX_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTTX_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTTX_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTRX_STARTTX`" ] pub enum LASTRX_STARTTXW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTRX_STARTTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTRX_STARTTXW :: DISABLED => false , LASTRX_STARTTXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTRX_STARTTXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTRX_STARTTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTRX_STARTTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTRX_STARTTXW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTRX_STARTTXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTRX_STOP`" ] pub enum LASTRX_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LASTRX_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTRX_STOPW :: DISABLED => false , LASTRX_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTRX_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _LASTRX_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTRX_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTRX_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTRX_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 7 - Shortcut between LASTTX event and STARTRX task" ] # [ inline ] pub fn lasttx_startrx ( & self ) -> LASTTX_STARTRXR { LASTTX_STARTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Shortcut between LASTTX event and SUSPEND task" ] # [ inline ] pub fn lasttx_suspend ( & self ) -> LASTTX_SUSPENDR { LASTTX_SUSPENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Shortcut between LASTTX event and STOP task" ] # [ inline ] pub fn lasttx_stop ( & self ) -> LASTTX_STOPR { LASTTX_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Shortcut between LASTRX event and STARTTX task" ] # [ inline ] pub fn lastrx_starttx ( & self ) -> LASTRX_STARTTXR { LASTRX_STARTTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Shortcut between LASTRX event and STOP task" ] # [ inline ] pub fn lastrx_stop ( & self ) -> LASTRX_STOPR { LASTRX_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 7 - Shortcut between LASTTX event and STARTRX task" ] # [ inline ] pub fn lasttx_startrx ( & mut self ) -> _LASTTX_STARTRXW { _LASTTX_STARTRXW { w : self } } # [ doc = "Bit 8 - Shortcut between LASTTX event and SUSPEND task" ] # [ inline ] pub fn lasttx_suspend ( & mut self ) -> _LASTTX_SUSPENDW { _LASTTX_SUSPENDW { w : self } } # [ doc = "Bit 9 - Shortcut between LASTTX event and STOP task" ] # [ inline ] pub fn lasttx_stop ( & mut self ) -> _LASTTX_STOPW { _LASTTX_STOPW { w : self } } # [ doc = "Bit 10 - Shortcut between LASTRX event and STARTTX task" ] # [ inline ] pub fn lastrx_starttx ( & mut self ) -> _LASTRX_STARTTXW { _LASTRX_STARTTXW { w : self } } # [ doc = "Bit 12 - Shortcut between LASTRX event and STOP task" ] # [ inline ] pub fn lastrx_stop ( & mut self ) -> _LASTRX_STOPW { _LASTRX_STOPW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `SUSPENDED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSPENDEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SUSPENDEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SUSPENDEDR :: DISABLED => false , SUSPENDEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SUSPENDEDR { match value { false => SUSPENDEDR :: DISABLED , true => SUSPENDEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SUSPENDEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SUSPENDEDR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `LASTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTRXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LASTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTRXR :: DISABLED => false , LASTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTRXR { match value { false => LASTRXR :: DISABLED , true => LASTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTRXR :: ENABLED } } # [ doc = "Possible values of the field `LASTTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LASTTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTXR :: DISABLED => false , LASTTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTXR { match value { false => LASTTXR :: DISABLED , true => LASTTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTXR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: DISABLED => false , ERRORW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SUSPENDED`" ] pub enum SUSPENDEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SUSPENDEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SUSPENDEDW :: DISABLED => false , SUSPENDEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SUSPENDEDW < 'a > { w : & 'a mut W , } impl < 'a > _SUSPENDEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SUSPENDEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: DISABLED => false , RXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: DISABLED => false , TXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTRX`" ] pub enum LASTRXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LASTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTRXW :: DISABLED => false , LASTRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTRXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTRXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTTX`" ] pub enum LASTTXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LASTTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTXW :: DISABLED => false , LASTTXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LASTTXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LASTTXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LASTTXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable or disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & self ) -> SUSPENDEDR { SUSPENDEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable or disable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & self ) -> LASTRXR { LASTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable or disable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & self ) -> LASTTXR { LASTTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 18 - Enable or disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & mut self ) -> _SUSPENDEDW { _SUSPENDEDW { w : self } } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 23 - Enable or disable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & mut self ) -> _LASTRXW { _LASTRXW { w : self } } # [ doc = "Bit 24 - Enable or disable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & mut self ) -> _LASTTXW { _LASTTXW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `SUSPENDED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSPENDEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SUSPENDEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SUSPENDEDR :: DISABLED => false , SUSPENDEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SUSPENDEDR { match value { false => SUSPENDEDR :: DISABLED , true => SUSPENDEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SUSPENDEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SUSPENDEDR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `LASTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LASTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTRXR :: DISABLED => false , LASTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTRXR { match value { false => LASTRXR :: DISABLED , true => LASTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTRXR :: ENABLED } } # [ doc = "Possible values of the field `LASTTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LASTTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTXR :: DISABLED => false , LASTTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTXR { match value { false => LASTTXR :: DISABLED , true => LASTTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTXR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SUSPENDED`" ] pub enum SUSPENDEDW { # [ doc = "Enable" ] SET } impl SUSPENDEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SUSPENDEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SUSPENDEDW < 'a > { w : & 'a mut W , } impl < 'a > _SUSPENDEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SUSPENDEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Enable" ] SET } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Enable" ] SET } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTRX`" ] pub enum LASTRXW { # [ doc = "Enable" ] SET } impl LASTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTRXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _LASTRXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( LASTRXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTTX`" ] pub enum LASTTXW { # [ doc = "Enable" ] SET } impl LASTTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _LASTTXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( LASTTXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & self ) -> SUSPENDEDR { SUSPENDEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Write '1' to Enable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & self ) -> LASTRXR { LASTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Enable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & self ) -> LASTTXR { LASTTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & mut self ) -> _SUSPENDEDW { _SUSPENDEDW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 23 - Write '1' to Enable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & mut self ) -> _LASTRXW { _LASTRXW { w : self } } # [ doc = "Bit 24 - Write '1' to Enable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & mut self ) -> _LASTTXW { _LASTTXW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `SUSPENDED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSPENDEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SUSPENDEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SUSPENDEDR :: DISABLED => false , SUSPENDEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SUSPENDEDR { match value { false => SUSPENDEDR :: DISABLED , true => SUSPENDEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SUSPENDEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SUSPENDEDR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `LASTRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LASTRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTRXR :: DISABLED => false , LASTRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTRXR { match value { false => LASTRXR :: DISABLED , true => LASTRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTRXR :: ENABLED } } # [ doc = "Possible values of the field `LASTTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LASTTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LASTTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LASTTXR :: DISABLED => false , LASTTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LASTTXR { match value { false => LASTTXR :: DISABLED , true => LASTTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LASTTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LASTTXR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SUSPENDED`" ] pub enum SUSPENDEDW { # [ doc = "Disable" ] CLEAR } impl SUSPENDEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SUSPENDEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SUSPENDEDW < 'a > { w : & 'a mut W , } impl < 'a > _SUSPENDEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SUSPENDEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTRX`" ] pub enum LASTRXW { # [ doc = "Disable" ] CLEAR } impl LASTRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTRXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _LASTRXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( LASTRXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LASTTX`" ] pub enum LASTTXW { # [ doc = "Disable" ] CLEAR } impl LASTTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LASTTXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _LASTTXW < 'a > { w : & 'a mut W , } impl < 'a > _LASTTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LASTTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( LASTTXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & self ) -> SUSPENDEDR { SUSPENDEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Write '1' to Disable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & self ) -> LASTRXR { LASTRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Disable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & self ) -> LASTTXR { LASTTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & mut self ) -> _SUSPENDEDW { _SUSPENDEDW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 23 - Write '1' to Disable interrupt for LASTRX event" ] # [ inline ] pub fn lastrx ( & mut self ) -> _LASTRXW { _LASTRXW { w : self } } # [ doc = "Bit 24 - Write '1' to Disable interrupt for LASTTX event" ] # [ inline ] pub fn lasttx ( & mut self ) -> _LASTTXW { _LASTTXW { w : self } } } } # [ doc = "Error source" ] pub struct ERRORSRC { register : VolatileCell < u32 > } # [ doc = "Error source" ] pub mod errorsrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERRUN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERRUNR { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl OVERRUNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERRUNR :: NOTRECEIVED => false , OVERRUNR :: RECEIVED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERRUNR { match value { false => OVERRUNR :: NOTRECEIVED , true => OVERRUNR :: RECEIVED , } } # [ doc = "Checks if the value of the field is `NOTRECEIVED`" ] # [ inline ] pub fn is_not_received ( & self ) -> bool { * self == OVERRUNR :: NOTRECEIVED } # [ doc = "Checks if the value of the field is `RECEIVED`" ] # [ inline ] pub fn is_received ( & self ) -> bool { * self == OVERRUNR :: RECEIVED } } # [ doc = "Possible values of the field `ANACK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ANACKR { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl ANACKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ANACKR :: NOTRECEIVED => false , ANACKR :: RECEIVED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ANACKR { match value { false => ANACKR :: NOTRECEIVED , true => ANACKR :: RECEIVED , } } # [ doc = "Checks if the value of the field is `NOTRECEIVED`" ] # [ inline ] pub fn is_not_received ( & self ) -> bool { * self == ANACKR :: NOTRECEIVED } # [ doc = "Checks if the value of the field is `RECEIVED`" ] # [ inline ] pub fn is_received ( & self ) -> bool { * self == ANACKR :: RECEIVED } } # [ doc = "Possible values of the field `DNACK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DNACKR { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl DNACKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DNACKR :: NOTRECEIVED => false , DNACKR :: RECEIVED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DNACKR { match value { false => DNACKR :: NOTRECEIVED , true => DNACKR :: RECEIVED , } } # [ doc = "Checks if the value of the field is `NOTRECEIVED`" ] # [ inline ] pub fn is_not_received ( & self ) -> bool { * self == DNACKR :: NOTRECEIVED } # [ doc = "Checks if the value of the field is `RECEIVED`" ] # [ inline ] pub fn is_received ( & self ) -> bool { * self == DNACKR :: RECEIVED } } # [ doc = "Values that can be written to the field `OVERRUN`" ] pub enum OVERRUNW { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl OVERRUNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERRUNW :: NOTRECEIVED => false , OVERRUNW :: RECEIVED => true } } } # [ doc = r" Proxy" ] pub struct _OVERRUNW < 'a > { w : & 'a mut W , } impl < 'a > _OVERRUNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERRUNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_received ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: NOTRECEIVED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn received ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: RECEIVED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ANACK`" ] pub enum ANACKW { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl ANACKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ANACKW :: NOTRECEIVED => false , ANACKW :: RECEIVED => true } } } # [ doc = r" Proxy" ] pub struct _ANACKW < 'a > { w : & 'a mut W , } impl < 'a > _ANACKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ANACKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_received ( self ) -> & 'a mut W { self . variant ( ANACKW :: NOTRECEIVED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn received ( self ) -> & 'a mut W { self . variant ( ANACKW :: RECEIVED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DNACK`" ] pub enum DNACKW { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl DNACKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DNACKW :: NOTRECEIVED => false , DNACKW :: RECEIVED => true } } } # [ doc = r" Proxy" ] pub struct _DNACKW < 'a > { w : & 'a mut W , } impl < 'a > _DNACKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DNACKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_received ( self ) -> & 'a mut W { self . variant ( DNACKW :: NOTRECEIVED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn received ( self ) -> & 'a mut W { self . variant ( DNACKW :: RECEIVED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & self ) -> OVERRUNR { OVERRUNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - NACK received after sending the address (write '1' to clear)" ] # [ inline ] pub fn anack ( & self ) -> ANACKR { ANACKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)" ] # [ inline ] pub fn dnack ( & self ) -> DNACKR { DNACKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & mut self ) -> _OVERRUNW { _OVERRUNW { w : self } } # [ doc = "Bit 1 - NACK received after sending the address (write '1' to clear)" ] # [ inline ] pub fn anack ( & mut self ) -> _ANACKW { _ANACKW { w : self } } # [ doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)" ] # [ inline ] pub fn dnack ( & mut self ) -> _DNACKW { _DNACKW { w : self } } } } # [ doc = "Enable TWIM" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable TWIM" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable TWIM" ] DISABLED , # [ doc = "Enable TWIM" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x06 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 6 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable TWIM" ] DISABLED , # [ doc = "Enable TWIM" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 6 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable TWIM" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable TWIM" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable TWIM" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable TWIM" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "TWI frequency" ] pub struct FREQUENCY { register : VolatileCell < u32 > } # [ doc = "TWI frequency" ] pub mod frequency { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FREQUENCY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FREQUENCY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FREQUENCYR { # [ doc = "100 kbps" ] K100 , # [ doc = "250 kbps" ] K250 , # [ doc = "400 kbps" ] K400 , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl FREQUENCYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { FREQUENCYR :: K100 => 0x0198_0000 , FREQUENCYR :: K250 => 0x0400_0000 , FREQUENCYR :: K400 => 0x0640_0000 , FREQUENCYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> FREQUENCYR { match value { 26738688 => FREQUENCYR :: K100 , 67108864 => FREQUENCYR :: K250 , 104857600 => FREQUENCYR :: K400 , i => FREQUENCYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `K100`" ] # [ inline ] pub fn is_k100 ( & self ) -> bool { * self == FREQUENCYR :: K100 } # [ doc = "Checks if the value of the field is `K250`" ] # [ inline ] pub fn is_k250 ( & self ) -> bool { * self == FREQUENCYR :: K250 } # [ doc = "Checks if the value of the field is `K400`" ] # [ inline ] pub fn is_k400 ( & self ) -> bool { * self == FREQUENCYR :: K400 } } # [ doc = "Values that can be written to the field `FREQUENCY`" ] pub enum FREQUENCYW { # [ doc = "100 kbps" ] K100 , # [ doc = "250 kbps" ] K250 , # [ doc = "400 kbps" ] K400 } impl FREQUENCYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { FREQUENCYW :: K100 => 26738688 , FREQUENCYW :: K250 => 67108864 , FREQUENCYW :: K400 => 104857600 } } } # [ doc = r" Proxy" ] pub struct _FREQUENCYW < 'a > { w : & 'a mut W , } impl < 'a > _FREQUENCYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FREQUENCYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "100 kbps" ] # [ inline ] pub fn k100 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K100 ) } # [ doc = "250 kbps" ] # [ inline ] pub fn k250 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K250 ) } # [ doc = "400 kbps" ] # [ inline ] pub fn k400 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K400 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - TWI master clock frequency" ] # [ inline ] pub fn frequency ( & self ) -> FREQUENCYR { FREQUENCYR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - TWI master clock frequency" ] # [ inline ] pub fn frequency ( & mut self ) -> _FREQUENCYW { _FREQUENCYW { w : self } } } } # [ doc = "Address used in the TWI transfer" ] pub struct ADDRESS { register : VolatileCell < u32 > } # [ doc = "Address used in the TWI transfer" ] pub mod address { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ADDRESS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ADDRESSR { bits : u8 , } impl ADDRESSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Address used in the TWI transfer" ] # [ inline ] pub fn address ( & self ) -> ADDRESSR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ADDRESSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Address used in the TWI transfer" ] # [ inline ] pub fn address ( & mut self ) -> _ADDRESSW { _ADDRESSW { w : self } } } } } # [ doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0" ] pub struct TWIS0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWIS0 { } impl TWIS0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twis0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for TWIS0 { type Target = twis0 :: RegisterBlock ; fn deref ( & self ) -> & twis0 :: RegisterBlock { unsafe { & * TWIS0 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0" ] pub mod twis0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 20usize ] , # [ doc = "0x14 - Stop TWI transaction" ] pub tasks_stop : TASKS_STOP , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x1c - Suspend TWI transaction" ] pub tasks_suspend : TASKS_SUSPEND , # [ doc = "0x20 - Resume TWI transaction" ] pub tasks_resume : TASKS_RESUME , _reserved2 : [ u8 ; 12usize ] , # [ doc = "0x30 - Prepare the TWI slave to respond to a write command" ] pub tasks_preparerx : TASKS_PREPARERX , # [ doc = "0x34 - Prepare the TWI slave to respond to a read command" ] pub tasks_preparetx : TASKS_PREPARETX , _reserved3 : [ u8 ; 204usize ] , # [ doc = "0x104 - TWI stopped" ] pub events_stopped : EVENTS_STOPPED , _reserved4 : [ u8 ; 28usize ] , # [ doc = "0x124 - TWI error" ] pub events_error : EVENTS_ERROR , _reserved5 : [ u8 ; 36usize ] , # [ doc = "0x14c - Receive sequence started" ] pub events_rxstarted : EVENTS_RXSTARTED , # [ doc = "0x150 - Transmit sequence started" ] pub events_txstarted : EVENTS_TXSTARTED , _reserved6 : [ u8 ; 16usize ] , # [ doc = "0x164 - Write command received" ] pub events_write : EVENTS_WRITE , # [ doc = "0x168 - Read command received" ] pub events_read : EVENTS_READ , _reserved7 : [ u8 ; 148usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved8 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved9 : [ u8 ; 452usize ] , # [ doc = "0x4d0 - Error source" ] pub errorsrc : ERRORSRC , # [ doc = "0x4d4 - Status register indicating which address had a match" ] pub match_ : MATCH , _reserved10 : [ u8 ; 40usize ] , # [ doc = "0x500 - Enable TWIS" ] pub enable : ENABLE , _reserved11 : [ u8 ; 132usize ] , # [ doc = "0x588 - Description collection[0]: TWI slave address 0" ] pub address : [ ADDRESS ; 2 ] , _reserved12 : [ u8 ; 4usize ] , # [ doc = "0x594 - Configuration register for the address match mechanism" ] pub config : CONFIG , _reserved13 : [ u8 ; 40usize ] , # [ doc = "0x5c0 - Over-read character. Character sent out in case of an over-read of the transmit buffer." ] pub orc : ORC , } # [ doc = "Stop TWI transaction" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop TWI transaction" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Suspend TWI transaction" ] pub struct TASKS_SUSPEND { register : VolatileCell < u32 > } # [ doc = "Suspend TWI transaction" ] pub mod tasks_suspend { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SUSPEND { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Resume TWI transaction" ] pub struct TASKS_RESUME { register : VolatileCell < u32 > } # [ doc = "Resume TWI transaction" ] pub mod tasks_resume { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RESUME { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Prepare the TWI slave to respond to a write command" ] pub struct TASKS_PREPARERX { register : VolatileCell < u32 > } # [ doc = "Prepare the TWI slave to respond to a write command" ] pub mod tasks_preparerx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_PREPARERX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Prepare the TWI slave to respond to a read command" ] pub struct TASKS_PREPARETX { register : VolatileCell < u32 > } # [ doc = "Prepare the TWI slave to respond to a read command" ] pub mod tasks_preparetx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_PREPARETX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "TWI stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI error" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "TWI error" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Receive sequence started" ] pub struct EVENTS_RXSTARTED { register : VolatileCell < u32 > } # [ doc = "Receive sequence started" ] pub mod events_rxstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Transmit sequence started" ] pub struct EVENTS_TXSTARTED { register : VolatileCell < u32 > } # [ doc = "Transmit sequence started" ] pub mod events_txstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Write command received" ] pub struct EVENTS_WRITE { register : VolatileCell < u32 > } # [ doc = "Write command received" ] pub mod events_write { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_WRITE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Read command received" ] pub struct EVENTS_READ { register : VolatileCell < u32 > } # [ doc = "Read command received" ] pub mod events_read { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READ { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `WRITE_SUSPEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRITE_SUSPENDR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl WRITE_SUSPENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { WRITE_SUSPENDR :: DISABLED => false , WRITE_SUSPENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> WRITE_SUSPENDR { match value { false => WRITE_SUSPENDR :: DISABLED , true => WRITE_SUSPENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == WRITE_SUSPENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == WRITE_SUSPENDR :: ENABLED } } # [ doc = "Possible values of the field `READ_SUSPEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READ_SUSPENDR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READ_SUSPENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READ_SUSPENDR :: DISABLED => false , READ_SUSPENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READ_SUSPENDR { match value { false => READ_SUSPENDR :: DISABLED , true => READ_SUSPENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READ_SUSPENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READ_SUSPENDR :: ENABLED } } # [ doc = "Values that can be written to the field `WRITE_SUSPEND`" ] pub enum WRITE_SUSPENDW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl WRITE_SUSPENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { WRITE_SUSPENDW :: DISABLED => false , WRITE_SUSPENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _WRITE_SUSPENDW < 'a > { w : & 'a mut W , } impl < 'a > _WRITE_SUSPENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WRITE_SUSPENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( WRITE_SUSPENDW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( WRITE_SUSPENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READ_SUSPEND`" ] pub enum READ_SUSPENDW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READ_SUSPENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READ_SUSPENDW :: DISABLED => false , READ_SUSPENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READ_SUSPENDW < 'a > { w : & 'a mut W , } impl < 'a > _READ_SUSPENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READ_SUSPENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READ_SUSPENDW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READ_SUSPENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 13 - Shortcut between WRITE event and SUSPEND task" ] # [ inline ] pub fn write_suspend ( & self ) -> WRITE_SUSPENDR { WRITE_SUSPENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Shortcut between READ event and SUSPEND task" ] # [ inline ] pub fn read_suspend ( & self ) -> READ_SUSPENDR { READ_SUSPENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 13 - Shortcut between WRITE event and SUSPEND task" ] # [ inline ] pub fn write_suspend ( & mut self ) -> _WRITE_SUSPENDW { _WRITE_SUSPENDW { w : self } } # [ doc = "Bit 14 - Shortcut between READ event and SUSPEND task" ] # [ inline ] pub fn read_suspend ( & mut self ) -> _READ_SUSPENDW { _READ_SUSPENDW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `WRITE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRITER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl WRITER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { WRITER :: DISABLED => false , WRITER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> WRITER { match value { false => WRITER :: DISABLED , true => WRITER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == WRITER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == WRITER :: ENABLED } } # [ doc = "Possible values of the field `READ`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READR :: DISABLED => false , READR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READR { match value { false => READR :: DISABLED , true => READR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: DISABLED => false , ERRORW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: DISABLED => false , RXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: DISABLED => false , TXSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `WRITE`" ] pub enum WRITEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl WRITEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { WRITEW :: DISABLED => false , WRITEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _WRITEW < 'a > { w : & 'a mut W , } impl < 'a > _WRITEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WRITEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( WRITEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( WRITEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READ`" ] pub enum READW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READW :: DISABLED => false , READW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READW < 'a > { w : & 'a mut W , } impl < 'a > _READW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable or disable interrupt for WRITE event" ] # [ inline ] pub fn write ( & self ) -> WRITER { WRITER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable or disable interrupt for READ event" ] # [ inline ] pub fn read ( & self ) -> READR { READR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 25 - Enable or disable interrupt for WRITE event" ] # [ inline ] pub fn write ( & mut self ) -> _WRITEW { _WRITEW { w : self } } # [ doc = "Bit 26 - Enable or disable interrupt for READ event" ] # [ inline ] pub fn read ( & mut self ) -> _READW { _READW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `WRITE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRITER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl WRITER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { WRITER :: DISABLED => false , WRITER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> WRITER { match value { false => WRITER :: DISABLED , true => WRITER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == WRITER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == WRITER :: ENABLED } } # [ doc = "Possible values of the field `READ`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READR :: DISABLED => false , READR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READR { match value { false => READR :: DISABLED , true => READR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Enable" ] SET } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Enable" ] SET } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `WRITE`" ] pub enum WRITEW { # [ doc = "Enable" ] SET } impl WRITEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { WRITEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _WRITEW < 'a > { w : & 'a mut W , } impl < 'a > _WRITEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WRITEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( WRITEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READ`" ] pub enum READW { # [ doc = "Enable" ] SET } impl READW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READW < 'a > { w : & 'a mut W , } impl < 'a > _READW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Enable interrupt for WRITE event" ] # [ inline ] pub fn write ( & self ) -> WRITER { WRITER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Enable interrupt for READ event" ] # [ inline ] pub fn read ( & self ) -> READR { READR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 25 - Write '1' to Enable interrupt for WRITE event" ] # [ inline ] pub fn write ( & mut self ) -> _WRITEW { _WRITEW { w : self } } # [ doc = "Bit 26 - Write '1' to Enable interrupt for READ event" ] # [ inline ] pub fn read ( & mut self ) -> _READW { _READW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXSTARTEDR :: DISABLED => false , RXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXSTARTEDR { match value { false => RXSTARTEDR :: DISABLED , true => RXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `TXSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXSTARTEDR :: DISABLED => false , TXSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXSTARTEDR { match value { false => TXSTARTEDR :: DISABLED , true => TXSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `WRITE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WRITER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl WRITER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { WRITER :: DISABLED => false , WRITER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> WRITER { match value { false => WRITER :: DISABLED , true => WRITER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == WRITER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == WRITER :: ENABLED } } # [ doc = "Possible values of the field `READ`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READR :: DISABLED => false , READR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READR { match value { false => READR :: DISABLED , true => READR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXSTARTED`" ] pub enum RXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl RXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _RXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXSTARTED`" ] pub enum TXSTARTEDW { # [ doc = "Disable" ] CLEAR } impl TXSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _TXSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `WRITE`" ] pub enum WRITEW { # [ doc = "Disable" ] CLEAR } impl WRITEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { WRITEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _WRITEW < 'a > { w : & 'a mut W , } impl < 'a > _WRITEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WRITEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( WRITEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READ`" ] pub enum READW { # [ doc = "Disable" ] CLEAR } impl READW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READW < 'a > { w : & 'a mut W , } impl < 'a > _READW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & self ) -> RXSTARTEDR { RXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & self ) -> TXSTARTEDR { TXSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Disable interrupt for WRITE event" ] # [ inline ] pub fn write ( & self ) -> WRITER { WRITER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Disable interrupt for READ event" ] # [ inline ] pub fn read ( & self ) -> READR { READR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event" ] # [ inline ] pub fn rxstarted ( & mut self ) -> _RXSTARTEDW { _RXSTARTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event" ] # [ inline ] pub fn txstarted ( & mut self ) -> _TXSTARTEDW { _TXSTARTEDW { w : self } } # [ doc = "Bit 25 - Write '1' to Disable interrupt for WRITE event" ] # [ inline ] pub fn write ( & mut self ) -> _WRITEW { _WRITEW { w : self } } # [ doc = "Bit 26 - Write '1' to Disable interrupt for READ event" ] # [ inline ] pub fn read ( & mut self ) -> _READW { _READW { w : self } } } } # [ doc = "Error source" ] pub struct ERRORSRC { register : VolatileCell < u32 > } # [ doc = "Error source" ] pub mod errorsrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERFLOW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERFLOWR { # [ doc = "Error did not occur" ] NOTDETECTED , # [ doc = "Error occurred" ] DETECTED } impl OVERFLOWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERFLOWR :: NOTDETECTED => false , OVERFLOWR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERFLOWR { match value { false => OVERFLOWR :: NOTDETECTED , true => OVERFLOWR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == OVERFLOWR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == OVERFLOWR :: DETECTED } } # [ doc = "Possible values of the field `DNACK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DNACKR { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl DNACKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DNACKR :: NOTRECEIVED => false , DNACKR :: RECEIVED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DNACKR { match value { false => DNACKR :: NOTRECEIVED , true => DNACKR :: RECEIVED , } } # [ doc = "Checks if the value of the field is `NOTRECEIVED`" ] # [ inline ] pub fn is_not_received ( & self ) -> bool { * self == DNACKR :: NOTRECEIVED } # [ doc = "Checks if the value of the field is `RECEIVED`" ] # [ inline ] pub fn is_received ( & self ) -> bool { * self == DNACKR :: RECEIVED } } # [ doc = "Possible values of the field `OVERREAD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERREADR { # [ doc = "Error did not occur" ] NOTDETECTED , # [ doc = "Error occurred" ] DETECTED } impl OVERREADR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERREADR :: NOTDETECTED => false , OVERREADR :: DETECTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERREADR { match value { false => OVERREADR :: NOTDETECTED , true => OVERREADR :: DETECTED , } } # [ doc = "Checks if the value of the field is `NOTDETECTED`" ] # [ inline ] pub fn is_not_detected ( & self ) -> bool { * self == OVERREADR :: NOTDETECTED } # [ doc = "Checks if the value of the field is `DETECTED`" ] # [ inline ] pub fn is_detected ( & self ) -> bool { * self == OVERREADR :: DETECTED } } # [ doc = "Values that can be written to the field `OVERFLOW`" ] pub enum OVERFLOWW { # [ doc = "Error did not occur" ] NOTDETECTED , # [ doc = "Error occurred" ] DETECTED } impl OVERFLOWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERFLOWW :: NOTDETECTED => false , OVERFLOWW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _OVERFLOWW < 'a > { w : & 'a mut W , } impl < 'a > _OVERFLOWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERFLOWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( OVERFLOWW :: NOTDETECTED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( OVERFLOWW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DNACK`" ] pub enum DNACKW { # [ doc = "Error did not occur" ] NOTRECEIVED , # [ doc = "Error occurred" ] RECEIVED } impl DNACKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DNACKW :: NOTRECEIVED => false , DNACKW :: RECEIVED => true } } } # [ doc = r" Proxy" ] pub struct _DNACKW < 'a > { w : & 'a mut W , } impl < 'a > _DNACKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DNACKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_received ( self ) -> & 'a mut W { self . variant ( DNACKW :: NOTRECEIVED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn received ( self ) -> & 'a mut W { self . variant ( DNACKW :: RECEIVED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVERREAD`" ] pub enum OVERREADW { # [ doc = "Error did not occur" ] NOTDETECTED , # [ doc = "Error occurred" ] DETECTED } impl OVERREADW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERREADW :: NOTDETECTED => false , OVERREADW :: DETECTED => true } } } # [ doc = r" Proxy" ] pub struct _OVERREADW < 'a > { w : & 'a mut W , } impl < 'a > _OVERREADW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERREADW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Error did not occur" ] # [ inline ] pub fn not_detected ( self ) -> & 'a mut W { self . variant ( OVERREADW :: NOTDETECTED ) } # [ doc = "Error occurred" ] # [ inline ] pub fn detected ( self ) -> & 'a mut W { self . variant ( OVERREADW :: DETECTED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - RX buffer overflow detected, and prevented" ] # [ inline ] pub fn overflow ( & self ) -> OVERFLOWR { OVERFLOWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - NACK sent after receiving a data byte" ] # [ inline ] pub fn dnack ( & self ) -> DNACKR { DNACKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - TX buffer over-read detected, and prevented" ] # [ inline ] pub fn overread ( & self ) -> OVERREADR { OVERREADR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - RX buffer overflow detected, and prevented" ] # [ inline ] pub fn overflow ( & mut self ) -> _OVERFLOWW { _OVERFLOWW { w : self } } # [ doc = "Bit 2 - NACK sent after receiving a data byte" ] # [ inline ] pub fn dnack ( & mut self ) -> _DNACKW { _DNACKW { w : self } } # [ doc = "Bit 3 - TX buffer over-read detected, and prevented" ] # [ inline ] pub fn overread ( & mut self ) -> _OVERREADW { _OVERREADW { w : self } } } } # [ doc = "Status register indicating which address had a match" ] pub struct MATCH { register : VolatileCell < u32 > } # [ doc = "Status register indicating which address had a match" ] pub mod match_ { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: MATCH { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct MATCHR { bits : bool , } impl MATCHR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Which of the addresses in {ADDRESS} matched the incoming address" ] # [ inline ] pub fn match_ ( & self ) -> MATCHR { let bits = { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; MATCHR { bits } } } } # [ doc = "Enable TWIS" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable TWIS" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable TWIS" ] DISABLED , # [ doc = "Enable TWIS" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x09 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 9 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable TWIS" ] DISABLED , # [ doc = "Enable TWIS" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 9 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable TWIS" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable TWIS" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable TWIS" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable TWIS" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Description collection[0]: TWI slave address 0" ] pub struct ADDRESS { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: TWI slave address 0" ] pub mod address { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ADDRESS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ADDRESSR { bits : u8 , } impl ADDRESSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - TWI slave address" ] # [ inline ] pub fn address ( & self ) -> ADDRESSR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ADDRESSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - TWI slave address" ] # [ inline ] pub fn address ( & mut self ) -> _ADDRESSW { _ADDRESSW { w : self } } } } # [ doc = "Configuration register for the address match mechanism" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register for the address match mechanism" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ADDRESS0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESS0R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ADDRESS0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESS0R :: DISABLED => false , ADDRESS0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESS0R { match value { false => ADDRESS0R :: DISABLED , true => ADDRESS0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESS0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESS0R :: ENABLED } } # [ doc = "Possible values of the field `ADDRESS1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ADDRESS1R { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ADDRESS1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ADDRESS1R :: DISABLED => false , ADDRESS1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ADDRESS1R { match value { false => ADDRESS1R :: DISABLED , true => ADDRESS1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ADDRESS1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ADDRESS1R :: ENABLED } } # [ doc = "Values that can be written to the field `ADDRESS0`" ] pub enum ADDRESS0W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ADDRESS0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESS0W :: DISABLED => false , ADDRESS0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESS0W < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESS0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESS0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDRESS0W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDRESS0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ADDRESS1`" ] pub enum ADDRESS1W { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl ADDRESS1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ADDRESS1W :: DISABLED => false , ADDRESS1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ADDRESS1W < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESS1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ADDRESS1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ADDRESS1W :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ADDRESS1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable address matching on ADDRESS[0]" ] # [ inline ] pub fn address0 ( & self ) -> ADDRESS0R { ADDRESS0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable address matching on ADDRESS[1]" ] # [ inline ] pub fn address1 ( & self ) -> ADDRESS1R { ADDRESS1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable address matching on ADDRESS[0]" ] # [ inline ] pub fn address0 ( & mut self ) -> _ADDRESS0W { _ADDRESS0W { w : self } } # [ doc = "Bit 1 - Enable or disable address matching on ADDRESS[1]" ] # [ inline ] pub fn address1 ( & mut self ) -> _ADDRESS1W { _ADDRESS1W { w : self } } } } # [ doc = "Over-read character. Character sent out in case of an over-read of the transmit buffer." ] pub struct ORC { register : VolatileCell < u32 > } # [ doc = "Over-read character. Character sent out in case of an over-read of the transmit buffer." ] pub mod orc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ORC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ORCR { bits : u8 , } impl ORCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ORCW < 'a > { w : & 'a mut W , } impl < 'a > _ORCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer." ] # [ inline ] pub fn orc ( & self ) -> ORCR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ORCR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer." ] # [ inline ] pub fn orc ( & mut self ) -> _ORCW { _ORCW { w : self } } } } } # [ doc = "Serial Peripheral Interface 0" ] pub struct SPI0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI0 { } impl SPI0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spi0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for SPI0 { type Target = spi0 :: RegisterBlock ; fn deref ( & self ) -> & spi0 :: RegisterBlock { unsafe { & * SPI0 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface 0" ] pub mod spi0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 264usize ] , # [ doc = "0x108 - TXD byte sent and RXD byte received" ] pub events_ready : EVENTS_READY , _reserved1 : [ u8 ; 504usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 500usize ] , # [ doc = "0x500 - Enable SPI" ] pub enable : ENABLE , _reserved3 : [ u8 ; 20usize ] , # [ doc = "0x518 - RXD register" ] pub rxd : RXD , # [ doc = "0x51c - TXD register" ] pub txd : TXD , _reserved4 : [ u8 ; 4usize ] , # [ doc = "0x524 - SPI frequency" ] pub frequency : FREQUENCY , _reserved5 : [ u8 ; 44usize ] , # [ doc = "0x554 - Configuration register" ] pub config : CONFIG , } # [ doc = "TXD byte sent and RXD byte received" ] pub struct EVENTS_READY { register : VolatileCell < u32 > } # [ doc = "TXD byte sent and RXD byte received" ] pub mod events_ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Enable" ] SET } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 2 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 2 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] CLEAR } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 2 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 2 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } } } # [ doc = "Enable SPI" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable SPI" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable SPI" ] DISABLED , # [ doc = "Enable SPI" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x01 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 1 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable SPI" ] DISABLED , # [ doc = "Enable SPI" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 1 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable SPI" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable SPI" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable SPI" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable SPI" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "RXD register" ] pub struct RXD { register : VolatileCell < u32 > } # [ doc = "RXD register" ] pub mod rxd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RXD { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RXDR { bits : u8 , } impl RXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - RX data received. Double buffered" ] # [ inline ] pub fn rxd ( & self ) -> RXDR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RXDR { bits } } } } # [ doc = "TXD register" ] pub struct TXD { register : VolatileCell < u32 > } # [ doc = "TXD register" ] pub mod txd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TXD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct TXDR { bits : u8 , } impl TXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _TXDW < 'a > { w : & 'a mut W , } impl < 'a > _TXDW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - TX data to send. Double buffered" ] # [ inline ] pub fn txd ( & self ) -> TXDR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; TXDR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - TX data to send. Double buffered" ] # [ inline ] pub fn txd ( & mut self ) -> _TXDW { _TXDW { w : self } } } } # [ doc = "SPI frequency" ] pub struct FREQUENCY { register : VolatileCell < u32 > } # [ doc = "SPI frequency" ] pub mod frequency { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FREQUENCY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FREQUENCY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FREQUENCYR { # [ doc = "125 kbps" ] K125 , # [ doc = "250 kbps" ] K250 , # [ doc = "500 kbps" ] K500 , # [ doc = "1 Mbps" ] M1 , # [ doc = "2 Mbps" ] M2 , # [ doc = "4 Mbps" ] M4 , # [ doc = "8 Mbps" ] M8 , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl FREQUENCYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { FREQUENCYR :: K125 => 0x0200_0000 , FREQUENCYR :: K250 => 0x0400_0000 , FREQUENCYR :: K500 => 0x0800_0000 , FREQUENCYR :: M1 => 0x1000_0000 , FREQUENCYR :: M2 => 0x2000_0000 , FREQUENCYR :: M4 => 0x4000_0000 , FREQUENCYR :: M8 => 0x8000_0000 , FREQUENCYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> FREQUENCYR { match value { 33554432 => FREQUENCYR :: K125 , 67108864 => FREQUENCYR :: K250 , 134217728 => FREQUENCYR :: K500 , 268435456 => FREQUENCYR :: M1 , 536870912 => FREQUENCYR :: M2 , 1073741824 => FREQUENCYR :: M4 , 2147483648 => FREQUENCYR :: M8 , i => FREQUENCYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `K125`" ] # [ inline ] pub fn is_k125 ( & self ) -> bool { * self == FREQUENCYR :: K125 } # [ doc = "Checks if the value of the field is `K250`" ] # [ inline ] pub fn is_k250 ( & self ) -> bool { * self == FREQUENCYR :: K250 } # [ doc = "Checks if the value of the field is `K500`" ] # [ inline ] pub fn is_k500 ( & self ) -> bool { * self == FREQUENCYR :: K500 } # [ doc = "Checks if the value of the field is `M1`" ] # [ inline ] pub fn is_m1 ( & self ) -> bool { * self == FREQUENCYR :: M1 } # [ doc = "Checks if the value of the field is `M2`" ] # [ inline ] pub fn is_m2 ( & self ) -> bool { * self == FREQUENCYR :: M2 } # [ doc = "Checks if the value of the field is `M4`" ] # [ inline ] pub fn is_m4 ( & self ) -> bool { * self == FREQUENCYR :: M4 } # [ doc = "Checks if the value of the field is `M8`" ] # [ inline ] pub fn is_m8 ( & self ) -> bool { * self == FREQUENCYR :: M8 } } # [ doc = "Values that can be written to the field `FREQUENCY`" ] pub enum FREQUENCYW { # [ doc = "125 kbps" ] K125 , # [ doc = "250 kbps" ] K250 , # [ doc = "500 kbps" ] K500 , # [ doc = "1 Mbps" ] M1 , # [ doc = "2 Mbps" ] M2 , # [ doc = "4 Mbps" ] M4 , # [ doc = "8 Mbps" ] M8 } impl FREQUENCYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { FREQUENCYW :: K125 => 33554432 , FREQUENCYW :: K250 => 67108864 , FREQUENCYW :: K500 => 134217728 , FREQUENCYW :: M1 => 268435456 , FREQUENCYW :: M2 => 536870912 , FREQUENCYW :: M4 => 1073741824 , FREQUENCYW :: M8 => 2147483648 } } } # [ doc = r" Proxy" ] pub struct _FREQUENCYW < 'a > { w : & 'a mut W , } impl < 'a > _FREQUENCYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FREQUENCYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "125 kbps" ] # [ inline ] pub fn k125 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K125 ) } # [ doc = "250 kbps" ] # [ inline ] pub fn k250 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K250 ) } # [ doc = "500 kbps" ] # [ inline ] pub fn k500 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K500 ) } # [ doc = "1 Mbps" ] # [ inline ] pub fn m1 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M1 ) } # [ doc = "2 Mbps" ] # [ inline ] pub fn m2 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M2 ) } # [ doc = "4 Mbps" ] # [ inline ] pub fn m4 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M4 ) } # [ doc = "8 Mbps" ] # [ inline ] pub fn m8 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: M8 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - SPI master data rate" ] # [ inline ] pub fn frequency ( & self ) -> FREQUENCYR { FREQUENCYR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - SPI master data rate" ] # [ inline ] pub fn frequency ( & mut self ) -> _FREQUENCYW { _FREQUENCYW { w : self } } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ORDER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ORDERR { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ORDERR :: MSBFIRST => false , ORDERR :: LSBFIRST => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ORDERR { match value { false => ORDERR :: MSBFIRST , true => ORDERR :: LSBFIRST , } } # [ doc = "Checks if the value of the field is `MSBFIRST`" ] # [ inline ] pub fn is_msb_first ( & self ) -> bool { * self == ORDERR :: MSBFIRST } # [ doc = "Checks if the value of the field is `LSBFIRST`" ] # [ inline ] pub fn is_lsb_first ( & self ) -> bool { * self == ORDERR :: LSBFIRST } } # [ doc = "Possible values of the field `CPHA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPHAR { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPHAR :: LEADING => false , CPHAR :: TRAILING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPHAR { match value { false => CPHAR :: LEADING , true => CPHAR :: TRAILING , } } # [ doc = "Checks if the value of the field is `LEADING`" ] # [ inline ] pub fn is_leading ( & self ) -> bool { * self == CPHAR :: LEADING } # [ doc = "Checks if the value of the field is `TRAILING`" ] # [ inline ] pub fn is_trailing ( & self ) -> bool { * self == CPHAR :: TRAILING } } # [ doc = "Possible values of the field `CPOL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CPOLR { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CPOLR :: ACTIVEHIGH => false , CPOLR :: ACTIVELOW => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CPOLR { match value { false => CPOLR :: ACTIVEHIGH , true => CPOLR :: ACTIVELOW , } } # [ doc = "Checks if the value of the field is `ACTIVEHIGH`" ] # [ inline ] pub fn is_active_high ( & self ) -> bool { * self == CPOLR :: ACTIVEHIGH } # [ doc = "Checks if the value of the field is `ACTIVELOW`" ] # [ inline ] pub fn is_active_low ( & self ) -> bool { * self == CPOLR :: ACTIVELOW } } # [ doc = "Values that can be written to the field `ORDER`" ] pub enum ORDERW { # [ doc = "Most significant bit shifted out first" ] MSBFIRST , # [ doc = "Least significant bit shifted out first" ] LSBFIRST } impl ORDERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ORDERW :: MSBFIRST => false , ORDERW :: LSBFIRST => true } } } # [ doc = r" Proxy" ] pub struct _ORDERW < 'a > { w : & 'a mut W , } impl < 'a > _ORDERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ORDERW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Most significant bit shifted out first" ] # [ inline ] pub fn msb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: MSBFIRST ) } # [ doc = "Least significant bit shifted out first" ] # [ inline ] pub fn lsb_first ( self ) -> & 'a mut W { self . variant ( ORDERW :: LSBFIRST ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPHA`" ] pub enum CPHAW { # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] LEADING , # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] TRAILING } impl CPHAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPHAW :: LEADING => false , CPHAW :: TRAILING => true } } } # [ doc = r" Proxy" ] pub struct _CPHAW < 'a > { w : & 'a mut W , } impl < 'a > _CPHAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPHAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Sample on leading edge of clock, shift serial data on trailing edge" ] # [ inline ] pub fn leading ( self ) -> & 'a mut W { self . variant ( CPHAW :: LEADING ) } # [ doc = "Sample on trailing edge of clock, shift serial data on leading edge" ] # [ inline ] pub fn trailing ( self ) -> & 'a mut W { self . variant ( CPHAW :: TRAILING ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CPOL`" ] pub enum CPOLW { # [ doc = "Active high" ] ACTIVEHIGH , # [ doc = "Active low" ] ACTIVELOW } impl CPOLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CPOLW :: ACTIVEHIGH => false , CPOLW :: ACTIVELOW => true } } } # [ doc = r" Proxy" ] pub struct _CPOLW < 'a > { w : & 'a mut W , } impl < 'a > _CPOLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CPOLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Active high" ] # [ inline ] pub fn active_high ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVEHIGH ) } # [ doc = "Active low" ] # [ inline ] pub fn active_low ( self ) -> & 'a mut W { self . variant ( CPOLW :: ACTIVELOW ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & self ) -> ORDERR { ORDERR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & self ) -> CPHAR { CPHAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & self ) -> CPOLR { CPOLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Bit order" ] # [ inline ] pub fn order ( & mut self ) -> _ORDERW { _ORDERW { w : self } } # [ doc = "Bit 1 - Serial clock (SCK) phase" ] # [ inline ] pub fn cpha ( & mut self ) -> _CPHAW { _CPHAW { w : self } } # [ doc = "Bit 2 - Serial clock (SCK) polarity" ] # [ inline ] pub fn cpol ( & mut self ) -> _CPOLW { _CPOLW { w : self } } } } } # [ doc = "I2C compatible Two-Wire Interface 0" ] pub struct TWI0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWI0 { } impl TWI0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twi0 :: RegisterBlock { 0x4000_3000 as * const _ } } impl Deref for TWI0 { type Target = twi0 :: RegisterBlock ; fn deref ( & self ) -> & twi0 :: RegisterBlock { unsafe { & * TWI0 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Interface 0" ] pub mod twi0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start TWI receive sequence" ] pub tasks_startrx : TASKS_STARTRX , _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x08 - Start TWI transmit sequence" ] pub tasks_starttx : TASKS_STARTTX , _reserved1 : [ u8 ; 8usize ] , # [ doc = "0x14 - Stop TWI transaction" ] pub tasks_stop : TASKS_STOP , _reserved2 : [ u8 ; 4usize ] , # [ doc = "0x1c - Suspend TWI transaction" ] pub tasks_suspend : TASKS_SUSPEND , # [ doc = "0x20 - Resume TWI transaction" ] pub tasks_resume : TASKS_RESUME , _reserved3 : [ u8 ; 224usize ] , # [ doc = "0x104 - TWI stopped" ] pub events_stopped : EVENTS_STOPPED , # [ doc = "0x108 - TWI RXD byte received" ] pub events_rxdready : EVENTS_RXDREADY , _reserved4 : [ u8 ; 16usize ] , # [ doc = "0x11c - TWI TXD byte sent" ] pub events_txdsent : EVENTS_TXDSENT , _reserved5 : [ u8 ; 4usize ] , # [ doc = "0x124 - TWI error" ] pub events_error : EVENTS_ERROR , _reserved6 : [ u8 ; 16usize ] , # [ doc = "0x138 - TWI byte boundary, generated before each byte that is sent or received" ] pub events_bb : EVENTS_BB , _reserved7 : [ u8 ; 12usize ] , # [ doc = "0x148 - TWI entered the suspended state" ] pub events_suspended : EVENTS_SUSPENDED , _reserved8 : [ u8 ; 180usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved9 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved10 : [ u8 ; 440usize ] , # [ doc = "0x4c4 - Error source" ] pub errorsrc : ERRORSRC , _reserved11 : [ u8 ; 56usize ] , # [ doc = "0x500 - Enable TWI" ] pub enable : ENABLE , _reserved12 : [ u8 ; 4usize ] , # [ doc = "0x508 - Pin select for SCL" ] pub pselscl : PSELSCL , # [ doc = "0x50c - Pin select for SDA" ] pub pselsda : PSELSDA , _reserved13 : [ u8 ; 8usize ] , # [ doc = "0x518 - RXD register" ] pub rxd : RXD , # [ doc = "0x51c - TXD register" ] pub txd : TXD , _reserved14 : [ u8 ; 4usize ] , # [ doc = "0x524 - TWI frequency" ] pub frequency : FREQUENCY , _reserved15 : [ u8 ; 96usize ] , # [ doc = "0x588 - Address used in the TWI transfer" ] pub address : ADDRESS , } # [ doc = "Start TWI receive sequence" ] pub struct TASKS_STARTRX { register : VolatileCell < u32 > } # [ doc = "Start TWI receive sequence" ] pub mod tasks_startrx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTRX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start TWI transmit sequence" ] pub struct TASKS_STARTTX { register : VolatileCell < u32 > } # [ doc = "Start TWI transmit sequence" ] pub mod tasks_starttx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop TWI transaction" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop TWI transaction" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Suspend TWI transaction" ] pub struct TASKS_SUSPEND { register : VolatileCell < u32 > } # [ doc = "Suspend TWI transaction" ] pub mod tasks_suspend { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SUSPEND { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Resume TWI transaction" ] pub struct TASKS_RESUME { register : VolatileCell < u32 > } # [ doc = "Resume TWI transaction" ] pub mod tasks_resume { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RESUME { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "TWI stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI RXD byte received" ] pub struct EVENTS_RXDREADY { register : VolatileCell < u32 > } # [ doc = "TWI RXD byte received" ] pub mod events_rxdready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXDREADY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI TXD byte sent" ] pub struct EVENTS_TXDSENT { register : VolatileCell < u32 > } # [ doc = "TWI TXD byte sent" ] pub mod events_txdsent { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXDSENT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI error" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "TWI error" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI byte boundary, generated before each byte that is sent or received" ] pub struct EVENTS_BB { register : VolatileCell < u32 > } # [ doc = "TWI byte boundary, generated before each byte that is sent or received" ] pub mod events_bb { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_BB { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "TWI entered the suspended state" ] pub struct EVENTS_SUSPENDED { register : VolatileCell < u32 > } # [ doc = "TWI entered the suspended state" ] pub mod events_suspended { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SUSPENDED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `BB_SUSPEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB_SUSPENDR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl BB_SUSPENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BB_SUSPENDR :: DISABLED => false , BB_SUSPENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BB_SUSPENDR { match value { false => BB_SUSPENDR :: DISABLED , true => BB_SUSPENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BB_SUSPENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BB_SUSPENDR :: ENABLED } } # [ doc = "Possible values of the field `BB_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BB_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl BB_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BB_STOPR :: DISABLED => false , BB_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BB_STOPR { match value { false => BB_STOPR :: DISABLED , true => BB_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BB_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BB_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `BB_SUSPEND`" ] pub enum BB_SUSPENDW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl BB_SUSPENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BB_SUSPENDW :: DISABLED => false , BB_SUSPENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _BB_SUSPENDW < 'a > { w : & 'a mut W , } impl < 'a > _BB_SUSPENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BB_SUSPENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( BB_SUSPENDW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( BB_SUSPENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BB_STOP`" ] pub enum BB_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl BB_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BB_STOPW :: DISABLED => false , BB_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _BB_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _BB_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BB_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( BB_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( BB_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between BB event and SUSPEND task" ] # [ inline ] pub fn bb_suspend ( & self ) -> BB_SUSPENDR { BB_SUSPENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between BB event and STOP task" ] # [ inline ] pub fn bb_stop ( & self ) -> BB_STOPR { BB_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between BB event and SUSPEND task" ] # [ inline ] pub fn bb_suspend ( & mut self ) -> _BB_SUSPENDW { _BB_SUSPENDW { w : self } } # [ doc = "Bit 1 - Shortcut between BB event and STOP task" ] # [ inline ] pub fn bb_stop ( & mut self ) -> _BB_STOPW { _BB_STOPW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `RXDREADY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDREADYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDREADYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDREADYR :: DISABLED => false , RXDREADYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDREADYR { match value { false => RXDREADYR :: DISABLED , true => RXDREADYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDREADYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDREADYR :: ENABLED } } # [ doc = "Possible values of the field `TXDSENT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDSENTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDSENTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDSENTR :: DISABLED => false , TXDSENTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDSENTR { match value { false => TXDSENTR :: DISABLED , true => TXDSENTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDSENTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDSENTR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `BB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl BBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BBR :: DISABLED => false , BBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BBR { match value { false => BBR :: DISABLED , true => BBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BBR :: ENABLED } } # [ doc = "Possible values of the field `SUSPENDED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSPENDEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SUSPENDEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SUSPENDEDR :: DISABLED => false , SUSPENDEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SUSPENDEDR { match value { false => SUSPENDEDR :: DISABLED , true => SUSPENDEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SUSPENDEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SUSPENDEDR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDREADY`" ] pub enum RXDREADYW { # [ doc = "Enable" ] SET } impl RXDREADYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDREADYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXDREADYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDREADYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDREADYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXDREADYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDSENT`" ] pub enum TXDSENTW { # [ doc = "Enable" ] SET } impl TXDSENTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDSENTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXDSENTW < 'a > { w : & 'a mut W , } impl < 'a > _TXDSENTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDSENTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXDSENTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BB`" ] pub enum BBW { # [ doc = "Enable" ] SET } impl BBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BBW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _BBW < 'a > { w : & 'a mut W , } impl < 'a > _BBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( BBW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SUSPENDED`" ] pub enum SUSPENDEDW { # [ doc = "Enable" ] SET } impl SUSPENDEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SUSPENDEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SUSPENDEDW < 'a > { w : & 'a mut W , } impl < 'a > _SUSPENDEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SUSPENDEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDREADY event" ] # [ inline ] pub fn rxdready ( & self ) -> RXDREADYR { RXDREADYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDSENT event" ] # [ inline ] pub fn txdsent ( & self ) -> TXDSENTR { TXDSENTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Enable interrupt for BB event" ] # [ inline ] pub fn bb ( & self ) -> BBR { BBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & self ) -> SUSPENDEDR { SUSPENDEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for RXDREADY event" ] # [ inline ] pub fn rxdready ( & mut self ) -> _RXDREADYW { _RXDREADYW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TXDSENT event" ] # [ inline ] pub fn txdsent ( & mut self ) -> _TXDSENTW { _TXDSENTW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 14 - Write '1' to Enable interrupt for BB event" ] # [ inline ] pub fn bb ( & mut self ) -> _BBW { _BBW { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & mut self ) -> _SUSPENDEDW { _SUSPENDEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `RXDREADY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXDREADYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXDREADYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXDREADYR :: DISABLED => false , RXDREADYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXDREADYR { match value { false => RXDREADYR :: DISABLED , true => RXDREADYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXDREADYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXDREADYR :: ENABLED } } # [ doc = "Possible values of the field `TXDSENT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXDSENTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXDSENTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXDSENTR :: DISABLED => false , TXDSENTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXDSENTR { match value { false => TXDSENTR :: DISABLED , true => TXDSENTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXDSENTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXDSENTR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `BB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl BBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { BBR :: DISABLED => false , BBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> BBR { match value { false => BBR :: DISABLED , true => BBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == BBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == BBR :: ENABLED } } # [ doc = "Possible values of the field `SUSPENDED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SUSPENDEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SUSPENDEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SUSPENDEDR :: DISABLED => false , SUSPENDEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SUSPENDEDR { match value { false => SUSPENDEDR :: DISABLED , true => SUSPENDEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SUSPENDEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SUSPENDEDR :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXDREADY`" ] pub enum RXDREADYW { # [ doc = "Disable" ] CLEAR } impl RXDREADYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXDREADYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXDREADYW < 'a > { w : & 'a mut W , } impl < 'a > _RXDREADYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXDREADYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXDREADYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXDSENT`" ] pub enum TXDSENTW { # [ doc = "Disable" ] CLEAR } impl TXDSENTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXDSENTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXDSENTW < 'a > { w : & 'a mut W , } impl < 'a > _TXDSENTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXDSENTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXDSENTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `BB`" ] pub enum BBW { # [ doc = "Disable" ] CLEAR } impl BBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { BBW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _BBW < 'a > { w : & 'a mut W , } impl < 'a > _BBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( BBW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SUSPENDED`" ] pub enum SUSPENDEDW { # [ doc = "Disable" ] CLEAR } impl SUSPENDEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SUSPENDEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SUSPENDEDW < 'a > { w : & 'a mut W , } impl < 'a > _SUSPENDEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SUSPENDEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SUSPENDEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDREADY event" ] # [ inline ] pub fn rxdready ( & self ) -> RXDREADYR { RXDREADYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDSENT event" ] # [ inline ] pub fn txdsent ( & self ) -> TXDSENTR { TXDSENTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Disable interrupt for BB event" ] # [ inline ] pub fn bb ( & self ) -> BBR { BBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & self ) -> SUSPENDEDR { SUSPENDEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for RXDREADY event" ] # [ inline ] pub fn rxdready ( & mut self ) -> _RXDREADYW { _RXDREADYW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TXDSENT event" ] # [ inline ] pub fn txdsent ( & mut self ) -> _TXDSENTW { _TXDSENTW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 14 - Write '1' to Disable interrupt for BB event" ] # [ inline ] pub fn bb ( & mut self ) -> _BBW { _BBW { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for SUSPENDED event" ] # [ inline ] pub fn suspended ( & mut self ) -> _SUSPENDEDW { _SUSPENDEDW { w : self } } } } # [ doc = "Error source" ] pub struct ERRORSRC { register : VolatileCell < u32 > } # [ doc = "Error source" ] pub mod errorsrc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSRC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERRUN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERRUNR { # [ doc = "Read: no overrun occured" ] NOTPRESENT , # [ doc = "Read: overrun occured" ] PRESENT } impl OVERRUNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVERRUNR :: NOTPRESENT => false , OVERRUNR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVERRUNR { match value { false => OVERRUNR :: NOTPRESENT , true => OVERRUNR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == OVERRUNR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == OVERRUNR :: PRESENT } } # [ doc = "Possible values of the field `ANACK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ANACKR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl ANACKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ANACKR :: NOTPRESENT => false , ANACKR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ANACKR { match value { false => ANACKR :: NOTPRESENT , true => ANACKR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == ANACKR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == ANACKR :: PRESENT } } # [ doc = "Possible values of the field `DNACK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DNACKR { # [ doc = "Read: error not present" ] NOTPRESENT , # [ doc = "Read: error present" ] PRESENT } impl DNACKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DNACKR :: NOTPRESENT => false , DNACKR :: PRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DNACKR { match value { false => DNACKR :: NOTPRESENT , true => DNACKR :: PRESENT , } } # [ doc = "Checks if the value of the field is `NOTPRESENT`" ] # [ inline ] pub fn is_not_present ( & self ) -> bool { * self == DNACKR :: NOTPRESENT } # [ doc = "Checks if the value of the field is `PRESENT`" ] # [ inline ] pub fn is_present ( & self ) -> bool { * self == DNACKR :: PRESENT } } # [ doc = "Values that can be written to the field `OVERRUN`" ] pub enum OVERRUNW { # [ doc = "Write: clear error on writing '1'" ] CLEAR } impl OVERRUNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVERRUNW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _OVERRUNW < 'a > { w : & 'a mut W , } impl < 'a > _OVERRUNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERRUNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: clear error on writing '1'" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( OVERRUNW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ANACK`" ] pub enum ANACKW { # [ doc = "Write: clear error on writing '1'" ] CLEAR } impl ANACKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ANACKW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ANACKW < 'a > { w : & 'a mut W , } impl < 'a > _ANACKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ANACKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: clear error on writing '1'" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ANACKW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DNACK`" ] pub enum DNACKW { # [ doc = "Write: clear error on writing '1'" ] CLEAR } impl DNACKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DNACKW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DNACKW < 'a > { w : & 'a mut W , } impl < 'a > _DNACKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DNACKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: clear error on writing '1'" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DNACKW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & self ) -> OVERRUNR { OVERRUNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - NACK received after sending the address (write '1' to clear)" ] # [ inline ] pub fn anack ( & self ) -> ANACKR { ANACKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)" ] # [ inline ] pub fn dnack ( & self ) -> DNACKR { DNACKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Overrun error" ] # [ inline ] pub fn overrun ( & mut self ) -> _OVERRUNW { _OVERRUNW { w : self } } # [ doc = "Bit 1 - NACK received after sending the address (write '1' to clear)" ] # [ inline ] pub fn anack ( & mut self ) -> _ANACKW { _ANACKW { w : self } } # [ doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)" ] # [ inline ] pub fn dnack ( & mut self ) -> _DNACKW { _DNACKW { w : self } } } } # [ doc = "Enable TWI" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable TWI" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable TWI" ] DISABLED , # [ doc = "Enable TWI" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x05 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 5 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable TWI" ] DISABLED , # [ doc = "Enable TWI" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 5 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable TWI" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable TWI" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Enable or disable TWI" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Enable or disable TWI" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Pin select for SCL" ] pub struct PSELSCL { register : VolatileCell < u32 > } # [ doc = "Pin select for SCL" ] pub mod pselscl { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELSCL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELSCL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELSCLR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELSCLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELSCLR :: DISCONNECTED => 0xffff_ffff , PSELSCLR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELSCLR { match value { 4294967295 => PSELSCLR :: DISCONNECTED , i => PSELSCLR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELSCLR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELSCL`" ] pub enum PSELSCLW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELSCLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELSCLW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELSCLW < 'a > { w : & 'a mut W , } impl < 'a > _PSELSCLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELSCLW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELSCLW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for TWI SCL signal" ] # [ inline ] pub fn pselscl ( & self ) -> PSELSCLR { PSELSCLR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for TWI SCL signal" ] # [ inline ] pub fn pselscl ( & mut self ) -> _PSELSCLW { _PSELSCLW { w : self } } } } # [ doc = "Pin select for SDA" ] pub struct PSELSDA { register : VolatileCell < u32 > } # [ doc = "Pin select for SDA" ] pub mod pselsda { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSELSDA { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSELSDA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELSDAR { # [ doc = "Disconnect" ] DISCONNECTED , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl PSELSDAR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { PSELSDAR :: DISCONNECTED => 0xffff_ffff , PSELSDAR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> PSELSDAR { match value { 4294967295 => PSELSDAR :: DISCONNECTED , i => PSELSDAR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISCONNECTED`" ] # [ inline ] pub fn is_disconnected ( & self ) -> bool { * self == PSELSDAR :: DISCONNECTED } } # [ doc = "Values that can be written to the field `PSELSDA`" ] pub enum PSELSDAW { # [ doc = "Disconnect" ] DISCONNECTED } impl PSELSDAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { PSELSDAW :: DISCONNECTED => 4294967295 } } } # [ doc = r" Proxy" ] pub struct _PSELSDAW < 'a > { w : & 'a mut W , } impl < 'a > _PSELSDAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELSDAW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disconnect" ] # [ inline ] pub fn disconnected ( self ) -> & 'a mut W { self . variant ( PSELSDAW :: DISCONNECTED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pin number configuration for TWI SDA signal" ] # [ inline ] pub fn pselsda ( & self ) -> PSELSDAR { PSELSDAR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pin number configuration for TWI SDA signal" ] # [ inline ] pub fn pselsda ( & mut self ) -> _PSELSDAW { _PSELSDAW { w : self } } } } # [ doc = "RXD register" ] pub struct RXD { register : VolatileCell < u32 > } # [ doc = "RXD register" ] pub mod rxd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RXD { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct RXDR { bits : u8 , } impl RXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - RXD register" ] # [ inline ] pub fn rxd ( & self ) -> RXDR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RXDR { bits } } } } # [ doc = "TXD register" ] pub struct TXD { register : VolatileCell < u32 > } # [ doc = "TXD register" ] pub mod txd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TXD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct TXDR { bits : u8 , } impl TXDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _TXDW < 'a > { w : & 'a mut W , } impl < 'a > _TXDW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - TXD register" ] # [ inline ] pub fn txd ( & self ) -> TXDR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; TXDR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - TXD register" ] # [ inline ] pub fn txd ( & mut self ) -> _TXDW { _TXDW { w : self } } } } # [ doc = "TWI frequency" ] pub struct FREQUENCY { register : VolatileCell < u32 > } # [ doc = "TWI frequency" ] pub mod frequency { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FREQUENCY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FREQUENCY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FREQUENCYR { # [ doc = "100 kbps" ] K100 , # [ doc = "250 kbps" ] K250 , # [ doc = "400 kbps (actual rate 410.256 kbps)" ] K400 , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl FREQUENCYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { FREQUENCYR :: K100 => 0x0198_0000 , FREQUENCYR :: K250 => 0x0400_0000 , FREQUENCYR :: K400 => 0x0668_0000 , FREQUENCYR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> FREQUENCYR { match value { 26738688 => FREQUENCYR :: K100 , 67108864 => FREQUENCYR :: K250 , 107479040 => FREQUENCYR :: K400 , i => FREQUENCYR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `K100`" ] # [ inline ] pub fn is_k100 ( & self ) -> bool { * self == FREQUENCYR :: K100 } # [ doc = "Checks if the value of the field is `K250`" ] # [ inline ] pub fn is_k250 ( & self ) -> bool { * self == FREQUENCYR :: K250 } # [ doc = "Checks if the value of the field is `K400`" ] # [ inline ] pub fn is_k400 ( & self ) -> bool { * self == FREQUENCYR :: K400 } } # [ doc = "Values that can be written to the field `FREQUENCY`" ] pub enum FREQUENCYW { # [ doc = "100 kbps" ] K100 , # [ doc = "250 kbps" ] K250 , # [ doc = "400 kbps (actual rate 410.256 kbps)" ] K400 } impl FREQUENCYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { FREQUENCYW :: K100 => 26738688 , FREQUENCYW :: K250 => 67108864 , FREQUENCYW :: K400 => 107479040 } } } # [ doc = r" Proxy" ] pub struct _FREQUENCYW < 'a > { w : & 'a mut W , } impl < 'a > _FREQUENCYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FREQUENCYW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "100 kbps" ] # [ inline ] pub fn k100 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K100 ) } # [ doc = "250 kbps" ] # [ inline ] pub fn k250 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K250 ) } # [ doc = "400 kbps (actual rate 410.256 kbps)" ] # [ inline ] pub fn k400 ( self ) -> & 'a mut W { self . variant ( FREQUENCYW :: K400 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - TWI master clock frequency" ] # [ inline ] pub fn frequency ( & self ) -> FREQUENCYR { FREQUENCYR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - TWI master clock frequency" ] # [ inline ] pub fn frequency ( & mut self ) -> _FREQUENCYW { _FREQUENCYW { w : self } } } } # [ doc = "Address used in the TWI transfer" ] pub struct ADDRESS { register : VolatileCell < u32 > } # [ doc = "Address used in the TWI transfer" ] pub mod address { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ADDRESS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ADDRESSR { bits : u8 , } impl ADDRESSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _ADDRESSW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRESSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Address used in the TWI transfer" ] # [ inline ] pub fn address ( & self ) -> ADDRESSR { let bits = { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ADDRESSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Address used in the TWI transfer" ] # [ inline ] pub fn address ( & mut self ) -> _ADDRESSW { _ADDRESSW { w : self } } } } } # [ doc = "Serial Peripheral Interface Master with EasyDMA 1" ] pub struct SPIM1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIM1 { } impl SPIM1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spim0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for SPIM1 { type Target = spim0 :: RegisterBlock ; fn deref ( & self ) -> & spim0 :: RegisterBlock { unsafe { & * SPIM1 :: ptr ( ) } } } # [ doc = "SPI Slave 1" ] pub struct SPIS1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIS1 { } impl SPIS1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spis0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for SPIS1 { type Target = spis0 :: RegisterBlock ; fn deref ( & self ) -> & spis0 :: RegisterBlock { unsafe { & * SPIS1 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Master Interface with EasyDMA 1" ] pub struct TWIM1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWIM1 { } impl TWIM1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twim0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for TWIM1 { type Target = twim0 :: RegisterBlock ; fn deref ( & self ) -> & twim0 :: RegisterBlock { unsafe { & * TWIM1 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 1" ] pub struct TWIS1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWIS1 { } impl TWIS1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twis0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for TWIS1 { type Target = twis0 :: RegisterBlock ; fn deref ( & self ) -> & twis0 :: RegisterBlock { unsafe { & * TWIS1 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface 1" ] pub struct SPI1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI1 { } impl SPI1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spi0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for SPI1 { type Target = spi0 :: RegisterBlock ; fn deref ( & self ) -> & spi0 :: RegisterBlock { unsafe { & * SPI1 :: ptr ( ) } } } # [ doc = "I2C compatible Two-Wire Interface 1" ] pub struct TWI1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TWI1 { } impl TWI1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const twi0 :: RegisterBlock { 0x4000_4000 as * const _ } } impl Deref for TWI1 { type Target = twi0 :: RegisterBlock ; fn deref ( & self ) -> & twi0 :: RegisterBlock { unsafe { & * TWI1 :: ptr ( ) } } } # [ doc = "NFC-A compatible radio" ] pub struct NFCT { _marker : PhantomData < * const ( ) > } unsafe impl Send for NFCT { } impl NFCT { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const nfct :: RegisterBlock { 0x4000_5000 as * const _ } } impl Deref for NFCT { type Target = nfct :: RegisterBlock ; fn deref ( & self ) -> & nfct :: RegisterBlock { unsafe { & * NFCT :: ptr ( ) } } } # [ doc = "NFC-A compatible radio" ] pub mod nfct { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Activate NFC peripheral for incoming and outgoing frames, change state to activated" ] pub tasks_activate : TASKS_ACTIVATE , # [ doc = "0x04 - Disable NFC peripheral" ] pub tasks_disable : TASKS_DISABLE , # [ doc = "0x08 - Enable NFC sense field mode, change state to sense mode" ] pub tasks_sense : TASKS_SENSE , # [ doc = "0x0c - Start transmission of a outgoing frame, change state to transmit" ] pub tasks_starttx : TASKS_STARTTX , _reserved0 : [ u8 ; 12usize ] , # [ doc = "0x1c - Initializes the EasyDMA for receive." ] pub tasks_enablerxdata : TASKS_ENABLERXDATA , _reserved1 : [ u8 ; 4usize ] , # [ doc = "0x24 - Force state machine to IDLE state" ] pub tasks_goidle : TASKS_GOIDLE , # [ doc = "0x28 - Force state machine to SLEEP_A state" ] pub tasks_gosleep : TASKS_GOSLEEP , _reserved2 : [ u8 ; 212usize ] , # [ doc = "0x100 - The NFC peripheral is ready to receive and send frames" ] pub events_ready : EVENTS_READY , # [ doc = "0x104 - Remote NFC field detected" ] pub events_fielddetected : EVENTS_FIELDDETECTED , # [ doc = "0x108 - Remote NFC field lost" ] pub events_fieldlost : EVENTS_FIELDLOST , # [ doc = "0x10c - Marks the start of the first symbol of a transmitted frame" ] pub events_txframestart : EVENTS_TXFRAMESTART , # [ doc = "0x110 - Marks the end of the last transmitted on-air symbol of a frame" ] pub events_txframeend : EVENTS_TXFRAMEEND , # [ doc = "0x114 - Marks the end of the first symbol of a received frame" ] pub events_rxframestart : EVENTS_RXFRAMESTART , # [ doc = "0x118 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer" ] pub events_rxframeend : EVENTS_RXFRAMEEND , # [ doc = "0x11c - NFC error reported. The ERRORSTATUS register contains details on the source of the error." ] pub events_error : EVENTS_ERROR , _reserved3 : [ u8 ; 8usize ] , # [ doc = "0x128 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error." ] pub events_rxerror : EVENTS_RXERROR , # [ doc = "0x12c - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full." ] pub events_endrx : EVENTS_ENDRX , # [ doc = "0x130 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer" ] pub events_endtx : EVENTS_ENDTX , _reserved4 : [ u8 ; 4usize ] , # [ doc = "0x138 - Auto collision resolution process has started" ] pub events_autocolresstarted : EVENTS_AUTOCOLRESSTARTED , _reserved5 : [ u8 ; 12usize ] , # [ doc = "0x148 - NFC Auto collision resolution error reported." ] pub events_collision : EVENTS_COLLISION , # [ doc = "0x14c - NFC Auto collision resolution successfully completed" ] pub events_selected : EVENTS_SELECTED , # [ doc = "0x150 - EasyDMA is ready to receive or send frames." ] pub events_started : EVENTS_STARTED , _reserved6 : [ u8 ; 172usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved7 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved8 : [ u8 ; 248usize ] , # [ doc = "0x404 - NFC Error Status register" ] pub errorstatus : ERRORSTATUS , _reserved9 : [ u8 ; 40usize ] , # [ doc = "0x430 - Current value driven to the NFC Load Control" ] pub currentloadctrl : CURRENTLOADCTRL , _reserved10 : [ u8 ; 8usize ] , # [ doc = "0x43c - Indicates the presence or not of a valid field" ] pub fieldpresent : FIELDPRESENT , _reserved11 : [ u8 ; 196usize ] , # [ doc = "0x504 - Minimum frame delay" ] pub framedelaymin : FRAMEDELAYMIN , # [ doc = "0x508 - Maximum frame delay" ] pub framedelaymax : FRAMEDELAYMAX , # [ doc = "0x50c - Configuration register for the Frame Delay Timer" ] pub framedelaymode : FRAMEDELAYMODE , # [ doc = "0x510 - Packet pointer for TXD and RXD data storage in Data RAM" ] pub packetptr : PACKETPTR , # [ doc = "0x514 - Size of allocated for TXD and RXD data storage buffer in Data RAM" ] pub maxlen : MAXLEN , _reserved12 : [ u8 ; 120usize ] , # [ doc = "0x590 - Last NFCID1 part (4, 7 or 10 bytes ID)" ] pub nfcid1_last : NFCID1_LAST , # [ doc = "0x594 - Second last NFCID1 part (7 or 10 bytes ID)" ] pub nfcid1_2nd_last : NFCID1_2ND_LAST , # [ doc = "0x598 - Third last NFCID1 part (10 bytes ID)" ] pub nfcid1_3rd_last : NFCID1_3RD_LAST , _reserved13 : [ u8 ; 4usize ] , # [ doc = "0x5a0 - NFC-A SENS_RES auto-response settings" ] pub sensres : SENSRES , # [ doc = "0x5a4 - NFC-A SEL_RES auto-response settings" ] pub selres : SELRES , } # [ doc = "Activate NFC peripheral for incoming and outgoing frames, change state to activated" ] pub struct TASKS_ACTIVATE { register : VolatileCell < u32 > } # [ doc = "Activate NFC peripheral for incoming and outgoing frames, change state to activated" ] pub mod tasks_activate { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_ACTIVATE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Disable NFC peripheral" ] pub struct TASKS_DISABLE { register : VolatileCell < u32 > } # [ doc = "Disable NFC peripheral" ] pub mod tasks_disable { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_DISABLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable NFC sense field mode, change state to sense mode" ] pub struct TASKS_SENSE { register : VolatileCell < u32 > } # [ doc = "Enable NFC sense field mode, change state to sense mode" ] pub mod tasks_sense { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SENSE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start transmission of a outgoing frame, change state to transmit" ] pub struct TASKS_STARTTX { register : VolatileCell < u32 > } # [ doc = "Start transmission of a outgoing frame, change state to transmit" ] pub mod tasks_starttx { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTTX { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Initializes the EasyDMA for receive." ] pub struct TASKS_ENABLERXDATA { register : VolatileCell < u32 > } # [ doc = "Initializes the EasyDMA for receive." ] pub mod tasks_enablerxdata { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_ENABLERXDATA { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Force state machine to IDLE state" ] pub struct TASKS_GOIDLE { register : VolatileCell < u32 > } # [ doc = "Force state machine to IDLE state" ] pub mod tasks_goidle { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_GOIDLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Force state machine to SLEEP_A state" ] pub struct TASKS_GOSLEEP { register : VolatileCell < u32 > } # [ doc = "Force state machine to SLEEP_A state" ] pub mod tasks_gosleep { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_GOSLEEP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The NFC peripheral is ready to receive and send frames" ] pub struct EVENTS_READY { register : VolatileCell < u32 > } # [ doc = "The NFC peripheral is ready to receive and send frames" ] pub mod events_ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Remote NFC field detected" ] pub struct EVENTS_FIELDDETECTED { register : VolatileCell < u32 > } # [ doc = "Remote NFC field detected" ] pub mod events_fielddetected { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_FIELDDETECTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Remote NFC field lost" ] pub struct EVENTS_FIELDLOST { register : VolatileCell < u32 > } # [ doc = "Remote NFC field lost" ] pub mod events_fieldlost { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_FIELDLOST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Marks the start of the first symbol of a transmitted frame" ] pub struct EVENTS_TXFRAMESTART { register : VolatileCell < u32 > } # [ doc = "Marks the start of the first symbol of a transmitted frame" ] pub mod events_txframestart { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXFRAMESTART { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Marks the end of the last transmitted on-air symbol of a frame" ] pub struct EVENTS_TXFRAMEEND { register : VolatileCell < u32 > } # [ doc = "Marks the end of the last transmitted on-air symbol of a frame" ] pub mod events_txframeend { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXFRAMEEND { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Marks the end of the first symbol of a received frame" ] pub struct EVENTS_RXFRAMESTART { register : VolatileCell < u32 > } # [ doc = "Marks the end of the first symbol of a received frame" ] pub mod events_rxframestart { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXFRAMESTART { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer" ] pub struct EVENTS_RXFRAMEEND { register : VolatileCell < u32 > } # [ doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer" ] pub mod events_rxframeend { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXFRAMEEND { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error." ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error." ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error." ] pub struct EVENTS_RXERROR { register : VolatileCell < u32 > } # [ doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error." ] pub mod events_rxerror { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full." ] pub struct EVENTS_ENDRX { register : VolatileCell < u32 > } # [ doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full." ] pub mod events_endrx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDRX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer" ] pub struct EVENTS_ENDTX { register : VolatileCell < u32 > } # [ doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer" ] pub mod events_endtx { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDTX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Auto collision resolution process has started" ] pub struct EVENTS_AUTOCOLRESSTARTED { register : VolatileCell < u32 > } # [ doc = "Auto collision resolution process has started" ] pub mod events_autocolresstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_AUTOCOLRESSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "NFC Auto collision resolution error reported." ] pub struct EVENTS_COLLISION { register : VolatileCell < u32 > } # [ doc = "NFC Auto collision resolution error reported." ] pub mod events_collision { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_COLLISION { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "NFC Auto collision resolution successfully completed" ] pub struct EVENTS_SELECTED { register : VolatileCell < u32 > } # [ doc = "NFC Auto collision resolution successfully completed" ] pub mod events_selected { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SELECTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "EasyDMA is ready to receive or send frames." ] pub struct EVENTS_STARTED { register : VolatileCell < u32 > } # [ doc = "EasyDMA is ready to receive or send frames." ] pub mod events_started { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FIELDDETECTED_ACTIVATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDDETECTED_ACTIVATER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl FIELDDETECTED_ACTIVATER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDDETECTED_ACTIVATER :: DISABLED => false , FIELDDETECTED_ACTIVATER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDDETECTED_ACTIVATER { match value { false => FIELDDETECTED_ACTIVATER :: DISABLED , true => FIELDDETECTED_ACTIVATER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDDETECTED_ACTIVATER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDDETECTED_ACTIVATER :: ENABLED } } # [ doc = "Possible values of the field `FIELDLOST_SENSE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDLOST_SENSER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl FIELDLOST_SENSER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDLOST_SENSER :: DISABLED => false , FIELDLOST_SENSER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDLOST_SENSER { match value { false => FIELDLOST_SENSER :: DISABLED , true => FIELDLOST_SENSER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDLOST_SENSER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDLOST_SENSER :: ENABLED } } # [ doc = "Values that can be written to the field `FIELDDETECTED_ACTIVATE`" ] pub enum FIELDDETECTED_ACTIVATEW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl FIELDDETECTED_ACTIVATEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDDETECTED_ACTIVATEW :: DISABLED => false , FIELDDETECTED_ACTIVATEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _FIELDDETECTED_ACTIVATEW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDDETECTED_ACTIVATEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDDETECTED_ACTIVATEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( FIELDDETECTED_ACTIVATEW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( FIELDDETECTED_ACTIVATEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDLOST_SENSE`" ] pub enum FIELDLOST_SENSEW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl FIELDLOST_SENSEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDLOST_SENSEW :: DISABLED => false , FIELDLOST_SENSEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _FIELDLOST_SENSEW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDLOST_SENSEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDLOST_SENSEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( FIELDLOST_SENSEW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( FIELDLOST_SENSEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between FIELDDETECTED event and ACTIVATE task" ] # [ inline ] pub fn fielddetected_activate ( & self ) -> FIELDDETECTED_ACTIVATER { FIELDDETECTED_ACTIVATER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between FIELDLOST event and SENSE task" ] # [ inline ] pub fn fieldlost_sense ( & self ) -> FIELDLOST_SENSER { FIELDLOST_SENSER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between FIELDDETECTED event and ACTIVATE task" ] # [ inline ] pub fn fielddetected_activate ( & mut self ) -> _FIELDDETECTED_ACTIVATEW { _FIELDDETECTED_ACTIVATEW { w : self } } # [ doc = "Bit 1 - Shortcut between FIELDLOST event and SENSE task" ] # [ inline ] pub fn fieldlost_sense ( & mut self ) -> _FIELDLOST_SENSEW { _FIELDLOST_SENSEW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `FIELDDETECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDDETECTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl FIELDDETECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDDETECTEDR :: DISABLED => false , FIELDDETECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDDETECTEDR { match value { false => FIELDDETECTEDR :: DISABLED , true => FIELDDETECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDDETECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDDETECTEDR :: ENABLED } } # [ doc = "Possible values of the field `FIELDLOST`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDLOSTR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl FIELDLOSTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDLOSTR :: DISABLED => false , FIELDLOSTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDLOSTR { match value { false => FIELDLOSTR :: DISABLED , true => FIELDLOSTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDLOSTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDLOSTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMESTARTR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMESTARTR :: DISABLED => false , TXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMESTARTR { match value { false => TXFRAMESTARTR :: DISABLED , true => TXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMEENDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMEENDR :: DISABLED => false , TXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMEENDR { match value { false => TXFRAMEENDR :: DISABLED , true => TXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMESTARTR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMESTARTR :: DISABLED => false , RXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMESTARTR { match value { false => RXFRAMESTARTR :: DISABLED , true => RXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMEENDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMEENDR :: DISABLED => false , RXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMEENDR { match value { false => RXFRAMEENDR :: DISABLED , true => RXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXERRORR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXERRORR :: DISABLED => false , RXERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXERRORR { match value { false => RXERRORR :: DISABLED , true => RXERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXERRORR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `AUTOCOLRESSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AUTOCOLRESSTARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl AUTOCOLRESSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDR :: DISABLED => false , AUTOCOLRESSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> AUTOCOLRESSTARTEDR { match value { false => AUTOCOLRESSTARTEDR :: DISABLED , true => AUTOCOLRESSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `COLLISION`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COLLISIONR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COLLISIONR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COLLISIONR :: DISABLED => false , COLLISIONR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COLLISIONR { match value { false => COLLISIONR :: DISABLED , true => COLLISIONR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COLLISIONR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COLLISIONR :: ENABLED } } # [ doc = "Possible values of the field `SELECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SELECTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SELECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SELECTEDR :: DISABLED => false , SELECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SELECTEDR { match value { false => SELECTEDR :: DISABLED , true => SELECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SELECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SELECTEDR :: ENABLED } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: DISABLED => false , READYW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READYW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READYW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDDETECTED`" ] pub enum FIELDDETECTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl FIELDDETECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDDETECTEDW :: DISABLED => false , FIELDDETECTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _FIELDDETECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDDETECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDDETECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( FIELDDETECTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( FIELDDETECTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDLOST`" ] pub enum FIELDLOSTW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl FIELDLOSTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDLOSTW :: DISABLED => false , FIELDLOSTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _FIELDLOSTW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDLOSTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDLOSTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( FIELDLOSTW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( FIELDLOSTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMESTART`" ] pub enum TXFRAMESTARTW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMESTARTW :: DISABLED => false , TXFRAMESTARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXFRAMESTARTW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXFRAMESTARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMEEND`" ] pub enum TXFRAMEENDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMEENDW :: DISABLED => false , TXFRAMEENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXFRAMEENDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXFRAMEENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMESTART`" ] pub enum RXFRAMESTARTW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMESTARTW :: DISABLED => false , RXFRAMESTARTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXFRAMESTARTW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXFRAMESTARTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMEEND`" ] pub enum RXFRAMEENDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMEENDW :: DISABLED => false , RXFRAMEENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXFRAMEENDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXFRAMEENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: DISABLED => false , ERRORW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ERRORW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXERROR`" ] pub enum RXERRORW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXERRORW :: DISABLED => false , RXERRORW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXERRORW < 'a > { w : & 'a mut W , } impl < 'a > _RXERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXERRORW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXERRORW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: DISABLED => false , ENDRXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDRXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDRXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: DISABLED => false , ENDTXW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDTXW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDTXW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `AUTOCOLRESSTARTED`" ] pub enum AUTOCOLRESSTARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl AUTOCOLRESSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDW :: DISABLED => false , AUTOCOLRESSTARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _AUTOCOLRESSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _AUTOCOLRESSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : AUTOCOLRESSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( AUTOCOLRESSTARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( AUTOCOLRESSTARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COLLISION`" ] pub enum COLLISIONW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COLLISIONW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COLLISIONW :: DISABLED => false , COLLISIONW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COLLISIONW < 'a > { w : & 'a mut W , } impl < 'a > _COLLISIONW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COLLISIONW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COLLISIONW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COLLISIONW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SELECTED`" ] pub enum SELECTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SELECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SELECTEDW :: DISABLED => false , SELECTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SELECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _SELECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SELECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SELECTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SELECTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: DISABLED => false , STARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & self ) -> FIELDDETECTEDR { FIELDDETECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & self ) -> FIELDLOSTR { FIELDLOSTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & self ) -> TXFRAMESTARTR { TXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & self ) -> TXFRAMEENDR { TXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & self ) -> RXFRAMESTARTR { RXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & self ) -> RXFRAMEENDR { RXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable or disable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & self ) -> RXERRORR { RXERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable or disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable or disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & self ) -> AUTOCOLRESSTARTEDR { AUTOCOLRESSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable or disable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & self ) -> COLLISIONR { COLLISIONR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & self ) -> SELECTEDR { SELECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & mut self ) -> _FIELDDETECTEDW { _FIELDDETECTEDW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & mut self ) -> _FIELDLOSTW { _FIELDLOSTW { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & mut self ) -> _TXFRAMESTARTW { _TXFRAMESTARTW { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & mut self ) -> _TXFRAMEENDW { _TXFRAMEENDW { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & mut self ) -> _RXFRAMESTARTW { _RXFRAMESTARTW { w : self } } # [ doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & mut self ) -> _RXFRAMEENDW { _RXFRAMEENDW { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 10 - Enable or disable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & mut self ) -> _RXERRORW { _RXERRORW { w : self } } # [ doc = "Bit 11 - Enable or disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 12 - Enable or disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & mut self ) -> _AUTOCOLRESSTARTEDW { _AUTOCOLRESSTARTEDW { w : self } } # [ doc = "Bit 18 - Enable or disable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & mut self ) -> _COLLISIONW { _COLLISIONW { w : self } } # [ doc = "Bit 19 - Enable or disable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & mut self ) -> _SELECTEDW { _SELECTEDW { w : self } } # [ doc = "Bit 20 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `FIELDDETECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDDETECTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl FIELDDETECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDDETECTEDR :: DISABLED => false , FIELDDETECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDDETECTEDR { match value { false => FIELDDETECTEDR :: DISABLED , true => FIELDDETECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDDETECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDDETECTEDR :: ENABLED } } # [ doc = "Possible values of the field `FIELDLOST`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDLOSTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl FIELDLOSTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDLOSTR :: DISABLED => false , FIELDLOSTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDLOSTR { match value { false => FIELDLOSTR :: DISABLED , true => FIELDLOSTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDLOSTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDLOSTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMESTARTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMESTARTR :: DISABLED => false , TXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMESTARTR { match value { false => TXFRAMESTARTR :: DISABLED , true => TXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMEENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMEENDR :: DISABLED => false , TXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMEENDR { match value { false => TXFRAMEENDR :: DISABLED , true => TXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMESTARTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMESTARTR :: DISABLED => false , RXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMESTARTR { match value { false => RXFRAMESTARTR :: DISABLED , true => RXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMEENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMEENDR :: DISABLED => false , RXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMEENDR { match value { false => RXFRAMEENDR :: DISABLED , true => RXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXERRORR :: DISABLED => false , RXERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXERRORR { match value { false => RXERRORR :: DISABLED , true => RXERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXERRORR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `AUTOCOLRESSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AUTOCOLRESSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl AUTOCOLRESSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDR :: DISABLED => false , AUTOCOLRESSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> AUTOCOLRESSTARTEDR { match value { false => AUTOCOLRESSTARTEDR :: DISABLED , true => AUTOCOLRESSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `COLLISION`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COLLISIONR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COLLISIONR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COLLISIONR :: DISABLED => false , COLLISIONR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COLLISIONR { match value { false => COLLISIONR :: DISABLED , true => COLLISIONR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COLLISIONR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COLLISIONR :: ENABLED } } # [ doc = "Possible values of the field `SELECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SELECTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SELECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SELECTEDR :: DISABLED => false , SELECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SELECTEDR { match value { false => SELECTEDR :: DISABLED , true => SELECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SELECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SELECTEDR :: ENABLED } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Enable" ] SET } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDDETECTED`" ] pub enum FIELDDETECTEDW { # [ doc = "Enable" ] SET } impl FIELDDETECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDDETECTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _FIELDDETECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDDETECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDDETECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( FIELDDETECTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDLOST`" ] pub enum FIELDLOSTW { # [ doc = "Enable" ] SET } impl FIELDLOSTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDLOSTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _FIELDLOSTW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDLOSTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDLOSTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( FIELDLOSTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMESTART`" ] pub enum TXFRAMESTARTW { # [ doc = "Enable" ] SET } impl TXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMESTARTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXFRAMESTARTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMEEND`" ] pub enum TXFRAMEENDW { # [ doc = "Enable" ] SET } impl TXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMEENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXFRAMEENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMESTART`" ] pub enum RXFRAMESTARTW { # [ doc = "Enable" ] SET } impl RXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMESTARTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXFRAMESTARTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMEEND`" ] pub enum RXFRAMEENDW { # [ doc = "Enable" ] SET } impl RXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMEENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXFRAMEENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXERROR`" ] pub enum RXERRORW { # [ doc = "Enable" ] SET } impl RXERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXERRORW < 'a > { w : & 'a mut W , } impl < 'a > _RXERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Enable" ] SET } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDRXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Enable" ] SET } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDTXW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `AUTOCOLRESSTARTED`" ] pub enum AUTOCOLRESSTARTEDW { # [ doc = "Enable" ] SET } impl AUTOCOLRESSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _AUTOCOLRESSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _AUTOCOLRESSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : AUTOCOLRESSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( AUTOCOLRESSTARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COLLISION`" ] pub enum COLLISIONW { # [ doc = "Enable" ] SET } impl COLLISIONW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COLLISIONW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COLLISIONW < 'a > { w : & 'a mut W , } impl < 'a > _COLLISIONW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COLLISIONW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COLLISIONW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SELECTED`" ] pub enum SELECTEDW { # [ doc = "Enable" ] SET } impl SELECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SELECTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SELECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _SELECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SELECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SELECTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Enable" ] SET } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & self ) -> FIELDDETECTEDR { FIELDDETECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & self ) -> FIELDLOSTR { FIELDLOSTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & self ) -> TXFRAMESTARTR { TXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & self ) -> TXFRAMEENDR { TXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & self ) -> RXFRAMESTARTR { RXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & self ) -> RXFRAMEENDR { RXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Enable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & self ) -> RXERRORR { RXERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Enable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & self ) -> AUTOCOLRESSTARTEDR { AUTOCOLRESSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & self ) -> COLLISIONR { COLLISIONR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & self ) -> SELECTEDR { SELECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & mut self ) -> _FIELDDETECTEDW { _FIELDDETECTEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & mut self ) -> _FIELDLOSTW { _FIELDLOSTW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & mut self ) -> _TXFRAMESTARTW { _TXFRAMESTARTW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & mut self ) -> _TXFRAMEENDW { _TXFRAMEENDW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & mut self ) -> _RXFRAMESTARTW { _RXFRAMESTARTW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & mut self ) -> _RXFRAMEENDW { _RXFRAMEENDW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 10 - Write '1' to Enable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & mut self ) -> _RXERRORW { _RXERRORW { w : self } } # [ doc = "Bit 11 - Write '1' to Enable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 12 - Write '1' to Enable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 14 - Write '1' to Enable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & mut self ) -> _AUTOCOLRESSTARTEDW { _AUTOCOLRESSTARTEDW { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & mut self ) -> _COLLISIONW { _COLLISIONW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & mut self ) -> _SELECTEDW { _SELECTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `FIELDDETECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDDETECTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl FIELDDETECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDDETECTEDR :: DISABLED => false , FIELDDETECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDDETECTEDR { match value { false => FIELDDETECTEDR :: DISABLED , true => FIELDDETECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDDETECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDDETECTEDR :: ENABLED } } # [ doc = "Possible values of the field `FIELDLOST`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDLOSTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl FIELDLOSTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDLOSTR :: DISABLED => false , FIELDLOSTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDLOSTR { match value { false => FIELDLOSTR :: DISABLED , true => FIELDLOSTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == FIELDLOSTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == FIELDLOSTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMESTARTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMESTARTR :: DISABLED => false , TXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMESTARTR { match value { false => TXFRAMESTARTR :: DISABLED , true => TXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `TXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXFRAMEENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXFRAMEENDR :: DISABLED => false , TXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXFRAMEENDR { match value { false => TXFRAMEENDR :: DISABLED , true => TXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMESTART`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMESTARTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXFRAMESTARTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMESTARTR :: DISABLED => false , RXFRAMESTARTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMESTARTR { match value { false => RXFRAMESTARTR :: DISABLED , true => RXFRAMESTARTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMESTARTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMESTARTR :: ENABLED } } # [ doc = "Possible values of the field `RXFRAMEEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXFRAMEENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXFRAMEENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXFRAMEENDR :: DISABLED => false , RXFRAMEENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXFRAMEENDR { match value { false => RXFRAMEENDR :: DISABLED , true => RXFRAMEENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXFRAMEENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXFRAMEENDR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Possible values of the field `RXERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXERRORR :: DISABLED => false , RXERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXERRORR { match value { false => RXERRORR :: DISABLED , true => RXERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXERRORR :: ENABLED } } # [ doc = "Possible values of the field `ENDRX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDRXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDRXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDRXR :: DISABLED => false , ENDRXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDRXR { match value { false => ENDRXR :: DISABLED , true => ENDRXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDRXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDRXR :: ENABLED } } # [ doc = "Possible values of the field `ENDTX`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDTXR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDTXR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDTXR :: DISABLED => false , ENDTXR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDTXR { match value { false => ENDTXR :: DISABLED , true => ENDTXR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDTXR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDTXR :: ENABLED } } # [ doc = "Possible values of the field `AUTOCOLRESSTARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum AUTOCOLRESSTARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl AUTOCOLRESSTARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDR :: DISABLED => false , AUTOCOLRESSTARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> AUTOCOLRESSTARTEDR { match value { false => AUTOCOLRESSTARTEDR :: DISABLED , true => AUTOCOLRESSTARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == AUTOCOLRESSTARTEDR :: ENABLED } } # [ doc = "Possible values of the field `COLLISION`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COLLISIONR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COLLISIONR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COLLISIONR :: DISABLED => false , COLLISIONR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COLLISIONR { match value { false => COLLISIONR :: DISABLED , true => COLLISIONR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COLLISIONR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COLLISIONR :: ENABLED } } # [ doc = "Possible values of the field `SELECTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SELECTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SELECTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SELECTEDR :: DISABLED => false , SELECTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SELECTEDR { match value { false => SELECTEDR :: DISABLED , true => SELECTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SELECTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SELECTEDR :: ENABLED } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] CLEAR } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDDETECTED`" ] pub enum FIELDDETECTEDW { # [ doc = "Disable" ] CLEAR } impl FIELDDETECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDDETECTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _FIELDDETECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDDETECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDDETECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( FIELDDETECTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `FIELDLOST`" ] pub enum FIELDLOSTW { # [ doc = "Disable" ] CLEAR } impl FIELDLOSTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { FIELDLOSTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _FIELDLOSTW < 'a > { w : & 'a mut W , } impl < 'a > _FIELDLOSTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FIELDLOSTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( FIELDLOSTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMESTART`" ] pub enum TXFRAMESTARTW { # [ doc = "Disable" ] CLEAR } impl TXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMESTARTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXFRAMESTARTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXFRAMEEND`" ] pub enum TXFRAMEENDW { # [ doc = "Disable" ] CLEAR } impl TXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXFRAMEENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _TXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXFRAMEENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMESTART`" ] pub enum RXFRAMESTARTW { # [ doc = "Disable" ] CLEAR } impl RXFRAMESTARTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMESTARTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMESTARTW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMESTARTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMESTARTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXFRAMESTARTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXFRAMEEND`" ] pub enum RXFRAMEENDW { # [ doc = "Disable" ] CLEAR } impl RXFRAMEENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXFRAMEENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXFRAMEENDW < 'a > { w : & 'a mut W , } impl < 'a > _RXFRAMEENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXFRAMEENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXFRAMEENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RXERROR`" ] pub enum RXERRORW { # [ doc = "Disable" ] CLEAR } impl RXERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXERRORW < 'a > { w : & 'a mut W , } impl < 'a > _RXERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDRX`" ] pub enum ENDRXW { # [ doc = "Disable" ] CLEAR } impl ENDRXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDRXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDRXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDRXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDRXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDRXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDTX`" ] pub enum ENDTXW { # [ doc = "Disable" ] CLEAR } impl ENDTXW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDTXW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDTXW < 'a > { w : & 'a mut W , } impl < 'a > _ENDTXW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDTXW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDTXW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `AUTOCOLRESSTARTED`" ] pub enum AUTOCOLRESSTARTEDW { # [ doc = "Disable" ] CLEAR } impl AUTOCOLRESSTARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { AUTOCOLRESSTARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _AUTOCOLRESSTARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _AUTOCOLRESSTARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : AUTOCOLRESSTARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( AUTOCOLRESSTARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COLLISION`" ] pub enum COLLISIONW { # [ doc = "Disable" ] CLEAR } impl COLLISIONW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COLLISIONW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COLLISIONW < 'a > { w : & 'a mut W , } impl < 'a > _COLLISIONW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COLLISIONW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COLLISIONW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SELECTED`" ] pub enum SELECTEDW { # [ doc = "Disable" ] CLEAR } impl SELECTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SELECTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SELECTEDW < 'a > { w : & 'a mut W , } impl < 'a > _SELECTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SELECTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SELECTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] CLEAR } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & self ) -> FIELDDETECTEDR { FIELDDETECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & self ) -> FIELDLOSTR { FIELDLOSTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & self ) -> TXFRAMESTARTR { TXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & self ) -> TXFRAMEENDR { TXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & self ) -> RXFRAMESTARTR { RXFRAMESTARTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & self ) -> RXFRAMEENDR { RXFRAMEENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Disable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & self ) -> RXERRORR { RXERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & self ) -> ENDRXR { ENDRXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & self ) -> ENDTXR { ENDTXR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Disable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & self ) -> AUTOCOLRESSTARTEDR { AUTOCOLRESSTARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & self ) -> COLLISIONR { COLLISIONR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & self ) -> SELECTEDR { SELECTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for FIELDDETECTED event" ] # [ inline ] pub fn fielddetected ( & mut self ) -> _FIELDDETECTEDW { _FIELDDETECTEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for FIELDLOST event" ] # [ inline ] pub fn fieldlost ( & mut self ) -> _FIELDLOSTW { _FIELDLOSTW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for TXFRAMESTART event" ] # [ inline ] pub fn txframestart ( & mut self ) -> _TXFRAMESTARTW { _TXFRAMESTARTW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for TXFRAMEEND event" ] # [ inline ] pub fn txframeend ( & mut self ) -> _TXFRAMEENDW { _TXFRAMEENDW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for RXFRAMESTART event" ] # [ inline ] pub fn rxframestart ( & mut self ) -> _RXFRAMESTARTW { _RXFRAMESTARTW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for RXFRAMEEND event" ] # [ inline ] pub fn rxframeend ( & mut self ) -> _RXFRAMEENDW { _RXFRAMEENDW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } # [ doc = "Bit 10 - Write '1' to Disable interrupt for RXERROR event" ] # [ inline ] pub fn rxerror ( & mut self ) -> _RXERRORW { _RXERRORW { w : self } } # [ doc = "Bit 11 - Write '1' to Disable interrupt for ENDRX event" ] # [ inline ] pub fn endrx ( & mut self ) -> _ENDRXW { _ENDRXW { w : self } } # [ doc = "Bit 12 - Write '1' to Disable interrupt for ENDTX event" ] # [ inline ] pub fn endtx ( & mut self ) -> _ENDTXW { _ENDTXW { w : self } } # [ doc = "Bit 14 - Write '1' to Disable interrupt for AUTOCOLRESSTARTED event" ] # [ inline ] pub fn autocolresstarted ( & mut self ) -> _AUTOCOLRESSTARTEDW { _AUTOCOLRESSTARTEDW { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COLLISION event" ] # [ inline ] pub fn collision ( & mut self ) -> _COLLISIONW { _COLLISIONW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for SELECTED event" ] # [ inline ] pub fn selected ( & mut self ) -> _SELECTEDW { _SELECTEDW { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } } } # [ doc = "NFC Error Status register" ] pub struct ERRORSTATUS { register : VolatileCell < u32 > } # [ doc = "NFC Error Status register" ] pub mod errorstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERRORSTATUS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct FRAMEDELAYTIMEOUTR { bits : bool , } impl FRAMEDELAYTIMEOUTR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct NFCFIELDTOOSTRONGR { bits : bool , } impl NFCFIELDTOOSTRONGR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Value of the field" ] pub struct NFCFIELDTOOWEAKR { bits : bool , } impl NFCFIELDTOOWEAKR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Proxy" ] pub struct _FRAMEDELAYTIMEOUTW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMEDELAYTIMEOUTW < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCFIELDTOOSTRONGW < 'a > { w : & 'a mut W , } impl < 'a > _NFCFIELDTOOSTRONGW < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCFIELDTOOWEAKW < 'a > { w : & 'a mut W , } impl < 'a > _NFCFIELDTOOWEAKW < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX" ] # [ inline ] pub fn framedelaytimeout ( & self ) -> FRAMEDELAYTIMEOUTR { let bits = { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; FRAMEDELAYTIMEOUTR { bits } } # [ doc = "Bit 2 - Field level is too high at max load resistance" ] # [ inline ] pub fn nfcfieldtoostrong ( & self ) -> NFCFIELDTOOSTRONGR { let bits = { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; NFCFIELDTOOSTRONGR { bits } } # [ doc = "Bit 3 - Field level is too low at min load resistance" ] # [ inline ] pub fn nfcfieldtooweak ( & self ) -> NFCFIELDTOOWEAKR { let bits = { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; NFCFIELDTOOWEAKR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX" ] # [ inline ] pub fn framedelaytimeout ( & mut self ) -> _FRAMEDELAYTIMEOUTW { _FRAMEDELAYTIMEOUTW { w : self } } # [ doc = "Bit 2 - Field level is too high at max load resistance" ] # [ inline ] pub fn nfcfieldtoostrong ( & mut self ) -> _NFCFIELDTOOSTRONGW { _NFCFIELDTOOSTRONGW { w : self } } # [ doc = "Bit 3 - Field level is too low at min load resistance" ] # [ inline ] pub fn nfcfieldtooweak ( & mut self ) -> _NFCFIELDTOOWEAKW { _NFCFIELDTOOWEAKW { w : self } } } } # [ doc = "Current value driven to the NFC Load Control" ] pub struct CURRENTLOADCTRL { register : VolatileCell < u32 > } # [ doc = "Current value driven to the NFC Load Control" ] pub mod currentloadctrl { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: CURRENTLOADCTRL { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct CURRENTLOADCTRLR { bits : u8 , } impl CURRENTLOADCTRLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:5 - Current value driven to the NFC Load Control" ] # [ inline ] pub fn currentloadctrl ( & self ) -> CURRENTLOADCTRLR { let bits = { const MASK : u8 = 0x3f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; CURRENTLOADCTRLR { bits } } } } # [ doc = "Indicates the presence or not of a valid field" ] pub struct FIELDPRESENT { register : VolatileCell < u32 > } # [ doc = "Indicates the presence or not of a valid field" ] pub mod fieldpresent { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: FIELDPRESENT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `FIELDPRESENT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FIELDPRESENTR { # [ doc = "No valid field detected" ] NOFIELD , # [ doc = "Valid field detected" ] FIELDPRESENT } impl FIELDPRESENTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { FIELDPRESENTR :: NOFIELD => false , FIELDPRESENTR :: FIELDPRESENT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> FIELDPRESENTR { match value { false => FIELDPRESENTR :: NOFIELD , true => FIELDPRESENTR :: FIELDPRESENT , } } # [ doc = "Checks if the value of the field is `NOFIELD`" ] # [ inline ] pub fn is_no_field ( & self ) -> bool { * self == FIELDPRESENTR :: NOFIELD } # [ doc = "Checks if the value of the field is `FIELDPRESENT`" ] # [ inline ] pub fn is_field_present ( & self ) -> bool { * self == FIELDPRESENTR :: FIELDPRESENT } } # [ doc = "Possible values of the field `LOCKDETECT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOCKDETECTR { # [ doc = "Not locked to field" ] NOTLOCKED , # [ doc = "Locked to field" ] LOCKED } impl LOCKDETECTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOCKDETECTR :: NOTLOCKED => false , LOCKDETECTR :: LOCKED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOCKDETECTR { match value { false => LOCKDETECTR :: NOTLOCKED , true => LOCKDETECTR :: LOCKED , } } # [ doc = "Checks if the value of the field is `NOTLOCKED`" ] # [ inline ] pub fn is_not_locked ( & self ) -> bool { * self == LOCKDETECTR :: NOTLOCKED } # [ doc = "Checks if the value of the field is `LOCKED`" ] # [ inline ] pub fn is_locked ( & self ) -> bool { * self == LOCKDETECTR :: LOCKED } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Indicates the presence or not of a valid field. Available only in the activated state." ] # [ inline ] pub fn fieldpresent ( & self ) -> FIELDPRESENTR { FIELDPRESENTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Indicates if the low level has locked to the field" ] # [ inline ] pub fn lockdetect ( & self ) -> LOCKDETECTR { LOCKDETECTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Minimum frame delay" ] pub struct FRAMEDELAYMIN { register : VolatileCell < u32 > } # [ doc = "Minimum frame delay" ] pub mod framedelaymin { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FRAMEDELAYMIN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct FRAMEDELAYMINR { bits : u16 , } impl FRAMEDELAYMINR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _FRAMEDELAYMINW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMEDELAYMINW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks" ] # [ inline ] pub fn framedelaymin ( & self ) -> FRAMEDELAYMINR { let bits = { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; FRAMEDELAYMINR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0480 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks" ] # [ inline ] pub fn framedelaymin ( & mut self ) -> _FRAMEDELAYMINW { _FRAMEDELAYMINW { w : self } } } } # [ doc = "Maximum frame delay" ] pub struct FRAMEDELAYMAX { register : VolatileCell < u32 > } # [ doc = "Maximum frame delay" ] pub mod framedelaymax { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FRAMEDELAYMAX { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct FRAMEDELAYMAXR { bits : u16 , } impl FRAMEDELAYMAXR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _FRAMEDELAYMAXW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMEDELAYMAXW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks" ] # [ inline ] pub fn framedelaymax ( & self ) -> FRAMEDELAYMAXR { let bits = { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; FRAMEDELAYMAXR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x1000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks" ] # [ inline ] pub fn framedelaymax ( & mut self ) -> _FRAMEDELAYMAXW { _FRAMEDELAYMAXW { w : self } } } } # [ doc = "Configuration register for the Frame Delay Timer" ] pub struct FRAMEDELAYMODE { register : VolatileCell < u32 > } # [ doc = "Configuration register for the Frame Delay Timer" ] pub mod framedelaymode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: FRAMEDELAYMODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FRAMEDELAYMODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FRAMEDELAYMODER { # [ doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout." ] FREERUN , # [ doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX" ] WINDOW , # [ doc = "Frame is transmitted exactly at FRAMEDELAYMAX" ] EXACTVAL , # [ doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX" ] WINDOWGRID } impl FRAMEDELAYMODER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { FRAMEDELAYMODER :: FREERUN => 0 , FRAMEDELAYMODER :: WINDOW => 0x01 , FRAMEDELAYMODER :: EXACTVAL => 0x02 , FRAMEDELAYMODER :: WINDOWGRID => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> FRAMEDELAYMODER { match value { 0 => FRAMEDELAYMODER :: FREERUN , 1 => FRAMEDELAYMODER :: WINDOW , 2 => FRAMEDELAYMODER :: EXACTVAL , 3 => FRAMEDELAYMODER :: WINDOWGRID , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `FREERUN`" ] # [ inline ] pub fn is_free_run ( & self ) -> bool { * self == FRAMEDELAYMODER :: FREERUN } # [ doc = "Checks if the value of the field is `WINDOW`" ] # [ inline ] pub fn is_window ( & self ) -> bool { * self == FRAMEDELAYMODER :: WINDOW } # [ doc = "Checks if the value of the field is `EXACTVAL`" ] # [ inline ] pub fn is_exact_val ( & self ) -> bool { * self == FRAMEDELAYMODER :: EXACTVAL } # [ doc = "Checks if the value of the field is `WINDOWGRID`" ] # [ inline ] pub fn is_window_grid ( & self ) -> bool { * self == FRAMEDELAYMODER :: WINDOWGRID } } # [ doc = "Values that can be written to the field `FRAMEDELAYMODE`" ] pub enum FRAMEDELAYMODEW { # [ doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout." ] FREERUN , # [ doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX" ] WINDOW , # [ doc = "Frame is transmitted exactly at FRAMEDELAYMAX" ] EXACTVAL , # [ doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX" ] WINDOWGRID } impl FRAMEDELAYMODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { FRAMEDELAYMODEW :: FREERUN => 0 , FRAMEDELAYMODEW :: WINDOW => 1 , FRAMEDELAYMODEW :: EXACTVAL => 2 , FRAMEDELAYMODEW :: WINDOWGRID => 3 } } } # [ doc = r" Proxy" ] pub struct _FRAMEDELAYMODEW < 'a > { w : & 'a mut W , } impl < 'a > _FRAMEDELAYMODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FRAMEDELAYMODEW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout." ] # [ inline ] pub fn free_run ( self ) -> & 'a mut W { self . variant ( FRAMEDELAYMODEW :: FREERUN ) } # [ doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX" ] # [ inline ] pub fn window ( self ) -> & 'a mut W { self . variant ( FRAMEDELAYMODEW :: WINDOW ) } # [ doc = "Frame is transmitted exactly at FRAMEDELAYMAX" ] # [ inline ] pub fn exact_val ( self ) -> & 'a mut W { self . variant ( FRAMEDELAYMODEW :: EXACTVAL ) } # [ doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX" ] # [ inline ] pub fn window_grid ( self ) -> & 'a mut W { self . variant ( FRAMEDELAYMODEW :: WINDOWGRID ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Configuration register for the Frame Delay Timer" ] # [ inline ] pub fn framedelaymode ( & self ) -> FRAMEDELAYMODER { FRAMEDELAYMODER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Configuration register for the Frame Delay Timer" ] # [ inline ] pub fn framedelaymode ( & mut self ) -> _FRAMEDELAYMODEW { _FRAMEDELAYMODEW { w : self } } } } # [ doc = "Packet pointer for TXD and RXD data storage in Data RAM" ] pub struct PACKETPTR { register : VolatileCell < u32 > } # [ doc = "Packet pointer for TXD and RXD data storage in Data RAM" ] pub mod packetptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PACKETPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct PTRR { bits : u32 , } impl PTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _PTRW < 'a > { w : & 'a mut W , } impl < 'a > _PTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address." ] # [ inline ] pub fn ptr ( & self ) -> PTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; PTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address." ] # [ inline ] pub fn ptr ( & mut self ) -> _PTRW { _PTRW { w : self } } } } # [ doc = "Size of allocated for TXD and RXD data storage buffer in Data RAM" ] pub struct MAXLEN { register : VolatileCell < u32 > } # [ doc = "Size of allocated for TXD and RXD data storage buffer in Data RAM" ] pub mod maxlen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MAXLEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct MAXLENR { bits : u16 , } impl MAXLENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _MAXLENW < 'a > { w : & 'a mut W , } impl < 'a > _MAXLENW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x01ff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM" ] # [ inline ] pub fn maxlen ( & self ) -> MAXLENR { let bits = { const MASK : u16 = 0x01ff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; MAXLENR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM" ] # [ inline ] pub fn maxlen ( & mut self ) -> _MAXLENW { _MAXLENW { w : self } } } } # [ doc = "Last NFCID1 part (4, 7 or 10 bytes ID)" ] pub struct NFCID1_LAST { register : VolatileCell < u32 > } # [ doc = "Last NFCID1 part (4, 7 or 10 bytes ID)" ] pub mod nfcid1_last { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NFCID1_LAST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NFCID1_ZR { bits : u8 , } impl NFCID1_ZR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_YR { bits : u8 , } impl NFCID1_YR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_XR { bits : u8 , } impl NFCID1_XR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_WR { bits : u8 , } impl NFCID1_WR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _NFCID1_ZW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_ZW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_YW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_YW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_XW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_XW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_WW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_WW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)" ] # [ inline ] pub fn nfcid1_z ( & self ) -> NFCID1_ZR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_ZR { bits } } # [ doc = "Bits 8:15 - NFCID1 byte Y" ] # [ inline ] pub fn nfcid1_y ( & self ) -> NFCID1_YR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_YR { bits } } # [ doc = "Bits 16:23 - NFCID1 byte X" ] # [ inline ] pub fn nfcid1_x ( & self ) -> NFCID1_XR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_XR { bits } } # [ doc = "Bits 24:31 - NFCID1 byte W" ] # [ inline ] pub fn nfcid1_w ( & self ) -> NFCID1_WR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_WR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x6363 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)" ] # [ inline ] pub fn nfcid1_z ( & mut self ) -> _NFCID1_ZW { _NFCID1_ZW { w : self } } # [ doc = "Bits 8:15 - NFCID1 byte Y" ] # [ inline ] pub fn nfcid1_y ( & mut self ) -> _NFCID1_YW { _NFCID1_YW { w : self } } # [ doc = "Bits 16:23 - NFCID1 byte X" ] # [ inline ] pub fn nfcid1_x ( & mut self ) -> _NFCID1_XW { _NFCID1_XW { w : self } } # [ doc = "Bits 24:31 - NFCID1 byte W" ] # [ inline ] pub fn nfcid1_w ( & mut self ) -> _NFCID1_WW { _NFCID1_WW { w : self } } } } # [ doc = "Second last NFCID1 part (7 or 10 bytes ID)" ] pub struct NFCID1_2ND_LAST { register : VolatileCell < u32 > } # [ doc = "Second last NFCID1 part (7 or 10 bytes ID)" ] pub mod nfcid1_2nd_last { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NFCID1_2ND_LAST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NFCID1_VR { bits : u8 , } impl NFCID1_VR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_UR { bits : u8 , } impl NFCID1_UR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_TR { bits : u8 , } impl NFCID1_TR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _NFCID1_VW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_VW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_UW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_UW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_TW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_TW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - NFCID1 byte V" ] # [ inline ] pub fn nfcid1_v ( & self ) -> NFCID1_VR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_VR { bits } } # [ doc = "Bits 8:15 - NFCID1 byte U" ] # [ inline ] pub fn nfcid1_u ( & self ) -> NFCID1_UR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_UR { bits } } # [ doc = "Bits 16:23 - NFCID1 byte T" ] # [ inline ] pub fn nfcid1_t ( & self ) -> NFCID1_TR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_TR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - NFCID1 byte V" ] # [ inline ] pub fn nfcid1_v ( & mut self ) -> _NFCID1_VW { _NFCID1_VW { w : self } } # [ doc = "Bits 8:15 - NFCID1 byte U" ] # [ inline ] pub fn nfcid1_u ( & mut self ) -> _NFCID1_UW { _NFCID1_UW { w : self } } # [ doc = "Bits 16:23 - NFCID1 byte T" ] # [ inline ] pub fn nfcid1_t ( & mut self ) -> _NFCID1_TW { _NFCID1_TW { w : self } } } } # [ doc = "Third last NFCID1 part (10 bytes ID)" ] pub struct NFCID1_3RD_LAST { register : VolatileCell < u32 > } # [ doc = "Third last NFCID1 part (10 bytes ID)" ] pub mod nfcid1_3rd_last { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NFCID1_3RD_LAST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NFCID1_SR { bits : u8 , } impl NFCID1_SR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_RR { bits : u8 , } impl NFCID1_RR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct NFCID1_QR { bits : u8 , } impl NFCID1_QR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _NFCID1_SW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_SW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_RW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_RW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _NFCID1_QW < 'a > { w : & 'a mut W , } impl < 'a > _NFCID1_QW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - NFCID1 byte S" ] # [ inline ] pub fn nfcid1_s ( & self ) -> NFCID1_SR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_SR { bits } } # [ doc = "Bits 8:15 - NFCID1 byte R" ] # [ inline ] pub fn nfcid1_r ( & self ) -> NFCID1_RR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_RR { bits } } # [ doc = "Bits 16:23 - NFCID1 byte Q" ] # [ inline ] pub fn nfcid1_q ( & self ) -> NFCID1_QR { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NFCID1_QR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - NFCID1 byte S" ] # [ inline ] pub fn nfcid1_s ( & mut self ) -> _NFCID1_SW { _NFCID1_SW { w : self } } # [ doc = "Bits 8:15 - NFCID1 byte R" ] # [ inline ] pub fn nfcid1_r ( & mut self ) -> _NFCID1_RW { _NFCID1_RW { w : self } } # [ doc = "Bits 16:23 - NFCID1 byte Q" ] # [ inline ] pub fn nfcid1_q ( & mut self ) -> _NFCID1_QW { _NFCID1_QW { w : self } } } } # [ doc = "NFC-A SENS_RES auto-response settings" ] pub struct SENSRES { register : VolatileCell < u32 > } # [ doc = "NFC-A SENS_RES auto-response settings" ] pub mod sensres { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SENSRES { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `BITFRAMESDD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BITFRAMESDDR { # [ doc = "SDD pattern 00000" ] SDD00000 , # [ doc = "SDD pattern 00001" ] SDD00001 , # [ doc = "SDD pattern 00010" ] SDD00010 , # [ doc = "SDD pattern 00100" ] SDD00100 , # [ doc = "SDD pattern 01000" ] SDD01000 , # [ doc = "SDD pattern 10000" ] SDD10000 , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl BITFRAMESDDR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { BITFRAMESDDR :: SDD00000 => 0 , BITFRAMESDDR :: SDD00001 => 0x01 , BITFRAMESDDR :: SDD00010 => 0x02 , BITFRAMESDDR :: SDD00100 => 0x04 , BITFRAMESDDR :: SDD01000 => 0x08 , BITFRAMESDDR :: SDD10000 => 0x10 , BITFRAMESDDR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> BITFRAMESDDR { match value { 0 => BITFRAMESDDR :: SDD00000 , 1 => BITFRAMESDDR :: SDD00001 , 2 => BITFRAMESDDR :: SDD00010 , 4 => BITFRAMESDDR :: SDD00100 , 8 => BITFRAMESDDR :: SDD01000 , 16 => BITFRAMESDDR :: SDD10000 , i => BITFRAMESDDR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `SDD00000`" ] # [ inline ] pub fn is_sdd00000 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD00000 } # [ doc = "Checks if the value of the field is `SDD00001`" ] # [ inline ] pub fn is_sdd00001 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD00001 } # [ doc = "Checks if the value of the field is `SDD00010`" ] # [ inline ] pub fn is_sdd00010 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD00010 } # [ doc = "Checks if the value of the field is `SDD00100`" ] # [ inline ] pub fn is_sdd00100 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD00100 } # [ doc = "Checks if the value of the field is `SDD01000`" ] # [ inline ] pub fn is_sdd01000 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD01000 } # [ doc = "Checks if the value of the field is `SDD10000`" ] # [ inline ] pub fn is_sdd10000 ( & self ) -> bool { * self == BITFRAMESDDR :: SDD10000 } } # [ doc = r" Value of the field" ] pub struct RFU5R { bits : bool , } impl RFU5R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = "Possible values of the field `NFCIDSIZE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NFCIDSIZER { # [ doc = "NFCID1 size: single (4 bytes)" ] NFCID1SINGLE , # [ doc = "NFCID1 size: double (7 bytes)" ] NFCID1DOUBLE , # [ doc = "NFCID1 size: triple (10 bytes)" ] NFCID1TRIPLE , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl NFCIDSIZER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { NFCIDSIZER :: NFCID1SINGLE => 0 , NFCIDSIZER :: NFCID1DOUBLE => 0x01 , NFCIDSIZER :: NFCID1TRIPLE => 0x02 , NFCIDSIZER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> NFCIDSIZER { match value { 0 => NFCIDSIZER :: NFCID1SINGLE , 1 => NFCIDSIZER :: NFCID1DOUBLE , 2 => NFCIDSIZER :: NFCID1TRIPLE , i => NFCIDSIZER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `NFCID1SINGLE`" ] # [ inline ] pub fn is_nfcid1single ( & self ) -> bool { * self == NFCIDSIZER :: NFCID1SINGLE } # [ doc = "Checks if the value of the field is `NFCID1DOUBLE`" ] # [ inline ] pub fn is_nfcid1double ( & self ) -> bool { * self == NFCIDSIZER :: NFCID1DOUBLE } # [ doc = "Checks if the value of the field is `NFCID1TRIPLE`" ] # [ inline ] pub fn is_nfcid1triple ( & self ) -> bool { * self == NFCIDSIZER :: NFCID1TRIPLE } } # [ doc = r" Value of the field" ] pub struct PLATFCONFIGR { bits : u8 , } impl PLATFCONFIGR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct RFU74R { bits : u8 , } impl RFU74R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Values that can be written to the field `BITFRAMESDD`" ] pub enum BITFRAMESDDW { # [ doc = "SDD pattern 00000" ] SDD00000 , # [ doc = "SDD pattern 00001" ] SDD00001 , # [ doc = "SDD pattern 00010" ] SDD00010 , # [ doc = "SDD pattern 00100" ] SDD00100 , # [ doc = "SDD pattern 01000" ] SDD01000 , # [ doc = "SDD pattern 10000" ] SDD10000 } impl BITFRAMESDDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { BITFRAMESDDW :: SDD00000 => 0 , BITFRAMESDDW :: SDD00001 => 1 , BITFRAMESDDW :: SDD00010 => 2 , BITFRAMESDDW :: SDD00100 => 4 , BITFRAMESDDW :: SDD01000 => 8 , BITFRAMESDDW :: SDD10000 => 16 } } } # [ doc = r" Proxy" ] pub struct _BITFRAMESDDW < 'a > { w : & 'a mut W , } impl < 'a > _BITFRAMESDDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BITFRAMESDDW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "SDD pattern 00000" ] # [ inline ] pub fn sdd00000 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD00000 ) } # [ doc = "SDD pattern 00001" ] # [ inline ] pub fn sdd00001 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD00001 ) } # [ doc = "SDD pattern 00010" ] # [ inline ] pub fn sdd00010 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD00010 ) } # [ doc = "SDD pattern 00100" ] # [ inline ] pub fn sdd00100 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD00100 ) } # [ doc = "SDD pattern 01000" ] # [ inline ] pub fn sdd01000 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD01000 ) } # [ doc = "SDD pattern 10000" ] # [ inline ] pub fn sdd10000 ( self ) -> & 'a mut W { self . variant ( BITFRAMESDDW :: SDD10000 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _RFU5W < 'a > { w : & 'a mut W , } impl < 'a > _RFU5W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NFCIDSIZE`" ] pub enum NFCIDSIZEW { # [ doc = "NFCID1 size: single (4 bytes)" ] NFCID1SINGLE , # [ doc = "NFCID1 size: double (7 bytes)" ] NFCID1DOUBLE , # [ doc = "NFCID1 size: triple (10 bytes)" ] NFCID1TRIPLE } impl NFCIDSIZEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { NFCIDSIZEW :: NFCID1SINGLE => 0 , NFCIDSIZEW :: NFCID1DOUBLE => 1 , NFCIDSIZEW :: NFCID1TRIPLE => 2 } } } # [ doc = r" Proxy" ] pub struct _NFCIDSIZEW < 'a > { w : & 'a mut W , } impl < 'a > _NFCIDSIZEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NFCIDSIZEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "NFCID1 size: single (4 bytes)" ] # [ inline ] pub fn nfcid1single ( self ) -> & 'a mut W { self . variant ( NFCIDSIZEW :: NFCID1SINGLE ) } # [ doc = "NFCID1 size: double (7 bytes)" ] # [ inline ] pub fn nfcid1double ( self ) -> & 'a mut W { self . variant ( NFCIDSIZEW :: NFCID1DOUBLE ) } # [ doc = "NFCID1 size: triple (10 bytes)" ] # [ inline ] pub fn nfcid1triple ( self ) -> & 'a mut W { self . variant ( NFCIDSIZEW :: NFCID1TRIPLE ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _PLATFCONFIGW < 'a > { w : & 'a mut W , } impl < 'a > _PLATFCONFIGW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _RFU74W < 'a > { w : & 'a mut W , } impl < 'a > _RFU74W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn bitframesdd ( & self ) -> BITFRAMESDDR { BITFRAMESDDR :: _from ( { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 5 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu5 ( & self ) -> RFU5R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; RFU5R { bits } } # [ doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine." ] # [ inline ] pub fn nfcidsize ( & self ) -> NFCIDSIZER { NFCIDSIZER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn platfconfig ( & self ) -> PLATFCONFIGR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; PLATFCONFIGR { bits } } # [ doc = "Bits 12:15 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu74 ( & self ) -> RFU74R { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RFU74R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn bitframesdd ( & mut self ) -> _BITFRAMESDDW { _BITFRAMESDDW { w : self } } # [ doc = "Bit 5 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu5 ( & mut self ) -> _RFU5W { _RFU5W { w : self } } # [ doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine." ] # [ inline ] pub fn nfcidsize ( & mut self ) -> _NFCIDSIZEW { _NFCIDSIZEW { w : self } } # [ doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn platfconfig ( & mut self ) -> _PLATFCONFIGW { _PLATFCONFIGW { w : self } } # [ doc = "Bits 12:15 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu74 ( & mut self ) -> _RFU74W { _RFU74W { w : self } } } } # [ doc = "NFC-A SEL_RES auto-response settings" ] pub struct SELRES { register : VolatileCell < u32 > } # [ doc = "NFC-A SEL_RES auto-response settings" ] pub mod selres { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SELRES { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct RFU10R { bits : u8 , } impl RFU10R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `CASCADE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CASCADER { # [ doc = "NFCID1 complete" ] COMPLETE , # [ doc = "NFCID1 not complete" ] NOTCOMPLETE } impl CASCADER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CASCADER :: COMPLETE => false , CASCADER :: NOTCOMPLETE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CASCADER { match value { false => CASCADER :: COMPLETE , true => CASCADER :: NOTCOMPLETE , } } # [ doc = "Checks if the value of the field is `COMPLETE`" ] # [ inline ] pub fn is_complete ( & self ) -> bool { * self == CASCADER :: COMPLETE } # [ doc = "Checks if the value of the field is `NOTCOMPLETE`" ] # [ inline ] pub fn is_not_complete ( & self ) -> bool { * self == CASCADER :: NOTCOMPLETE } } # [ doc = r" Value of the field" ] pub struct RFU43R { bits : u8 , } impl RFU43R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct PROTOCOLR { bits : u8 , } impl PROTOCOLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct RFU7R { bits : bool , } impl RFU7R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { self . bits } # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } } # [ doc = r" Proxy" ] pub struct _RFU10W < 'a > { w : & 'a mut W , } impl < 'a > _RFU10W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CASCADE`" ] pub enum CASCADEW { # [ doc = "NFCID1 complete" ] COMPLETE , # [ doc = "NFCID1 not complete" ] NOTCOMPLETE } impl CASCADEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CASCADEW :: COMPLETE => false , CASCADEW :: NOTCOMPLETE => true } } } # [ doc = r" Proxy" ] pub struct _CASCADEW < 'a > { w : & 'a mut W , } impl < 'a > _CASCADEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CASCADEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "NFCID1 complete" ] # [ inline ] pub fn complete ( self ) -> & 'a mut W { self . variant ( CASCADEW :: COMPLETE ) } # [ doc = "NFCID1 not complete" ] # [ inline ] pub fn not_complete ( self ) -> & 'a mut W { self . variant ( CASCADEW :: NOTCOMPLETE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _RFU43W < 'a > { w : & 'a mut W , } impl < 'a > _RFU43W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _PROTOCOLW < 'a > { w : & 'a mut W , } impl < 'a > _PROTOCOLW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _RFU7W < 'a > { w : & 'a mut W , } impl < 'a > _RFU7W < 'a > { # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu10 ( & self ) -> RFU10R { let bits = { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RFU10R { bits } } # [ doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)" ] # [ inline ] pub fn cascade ( & self ) -> CASCADER { CASCADER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 3:4 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu43 ( & self ) -> RFU43R { let bits = { const MASK : u8 = 0x03 ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; RFU43R { bits } } # [ doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn protocol ( & self ) -> PROTOCOLR { let bits = { const MASK : u8 = 0x03 ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; PROTOCOLR { bits } } # [ doc = "Bit 7 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu7 ( & self ) -> RFU7R { let bits = { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ; RFU7R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu10 ( & mut self ) -> _RFU10W { _RFU10W { w : self } } # [ doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)" ] # [ inline ] pub fn cascade ( & mut self ) -> _CASCADEW { _CASCADEW { w : self } } # [ doc = "Bits 3:4 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu43 ( & mut self ) -> _RFU43W { _RFU43W { w : self } } # [ doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification" ] # [ inline ] pub fn protocol ( & mut self ) -> _PROTOCOLW { _PROTOCOLW { w : self } } # [ doc = "Bit 7 - Reserved for future use. Shall be 0." ] # [ inline ] pub fn rfu7 ( & mut self ) -> _RFU7W { _RFU7W { w : self } } } } } # [ doc = "GPIO Tasks and Events" ] pub struct GPIOTE { _marker : PhantomData < * const ( ) > } unsafe impl Send for GPIOTE { } impl GPIOTE { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const gpiote :: RegisterBlock { 0x4000_6000 as * const _ } } impl Deref for GPIOTE { type Target = gpiote :: RegisterBlock ; fn deref ( & self ) -> & gpiote :: RegisterBlock { unsafe { & * GPIOTE :: ptr ( ) } } } # [ doc = "GPIO Tasks and Events" ] pub mod gpiote { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY." ] pub tasks_out : [ TASKS_OUT ; 8 ] , _reserved0 : [ u8 ; 16usize ] , # [ doc = "0x30 - Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it high." ] pub tasks_set : [ TASKS_SET ; 8 ] , _reserved1 : [ u8 ; 16usize ] , # [ doc = "0x60 - Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it low." ] pub tasks_clr : [ TASKS_CLR ; 8 ] , _reserved2 : [ u8 ; 128usize ] , # [ doc = "0x100 - Description collection[0]: Event generated from pin specified in CONFIG[0].PSEL" ] pub events_in : [ EVENTS_IN ; 8 ] , _reserved3 : [ u8 ; 92usize ] , # [ doc = "0x17c - Event generated from multiple input GPIO pins with SENSE mechanism enabled" ] pub events_port : EVENTS_PORT , _reserved4 : [ u8 ; 388usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved5 : [ u8 ; 516usize ] , # [ doc = "0x510 - Description collection[0]: Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event" ] pub config : [ CONFIG ; 8 ] , } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY." ] pub struct TASKS_OUT { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY." ] pub mod tasks_out { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_OUT { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it high." ] pub struct TASKS_SET { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it high." ] pub mod tasks_set { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SET { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it low." ] pub struct TASKS_CLR { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it low." ] pub mod tasks_clr { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CLR { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Event generated from pin specified in CONFIG[0].PSEL" ] pub struct EVENTS_IN { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Event generated from pin specified in CONFIG[0].PSEL" ] pub mod events_in { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_IN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled" ] pub struct EVENTS_PORT { register : VolatileCell < u32 > } # [ doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled" ] pub mod events_port { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_PORT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `IN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN0R :: DISABLED => false , IN0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN0R { match value { false => IN0R :: DISABLED , true => IN0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN0R :: ENABLED } } # [ doc = "Possible values of the field `IN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN1R :: DISABLED => false , IN1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN1R { match value { false => IN1R :: DISABLED , true => IN1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN1R :: ENABLED } } # [ doc = "Possible values of the field `IN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN2R :: DISABLED => false , IN2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN2R { match value { false => IN2R :: DISABLED , true => IN2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN2R :: ENABLED } } # [ doc = "Possible values of the field `IN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN3R :: DISABLED => false , IN3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN3R { match value { false => IN3R :: DISABLED , true => IN3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN3R :: ENABLED } } # [ doc = "Possible values of the field `IN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN4R :: DISABLED => false , IN4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN4R { match value { false => IN4R :: DISABLED , true => IN4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN4R :: ENABLED } } # [ doc = "Possible values of the field `IN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN5R :: DISABLED => false , IN5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN5R { match value { false => IN5R :: DISABLED , true => IN5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN5R :: ENABLED } } # [ doc = "Possible values of the field `IN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN6R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN6R :: DISABLED => false , IN6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN6R { match value { false => IN6R :: DISABLED , true => IN6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN6R :: ENABLED } } # [ doc = "Possible values of the field `IN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN7R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN7R :: DISABLED => false , IN7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN7R { match value { false => IN7R :: DISABLED , true => IN7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN7R :: ENABLED } } # [ doc = "Possible values of the field `PORT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PORTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PORTR :: DISABLED => false , PORTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PORTR { match value { false => PORTR :: DISABLED , true => PORTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PORTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PORTR :: ENABLED } } # [ doc = "Values that can be written to the field `IN0`" ] pub enum IN0W { # [ doc = "Enable" ] SET } impl IN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN0W < 'a > { w : & 'a mut W , } impl < 'a > _IN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN1`" ] pub enum IN1W { # [ doc = "Enable" ] SET } impl IN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN1W < 'a > { w : & 'a mut W , } impl < 'a > _IN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN2`" ] pub enum IN2W { # [ doc = "Enable" ] SET } impl IN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN2W < 'a > { w : & 'a mut W , } impl < 'a > _IN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN3`" ] pub enum IN3W { # [ doc = "Enable" ] SET } impl IN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN3W < 'a > { w : & 'a mut W , } impl < 'a > _IN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN4`" ] pub enum IN4W { # [ doc = "Enable" ] SET } impl IN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN4W < 'a > { w : & 'a mut W , } impl < 'a > _IN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN5`" ] pub enum IN5W { # [ doc = "Enable" ] SET } impl IN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN5W < 'a > { w : & 'a mut W , } impl < 'a > _IN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN6`" ] pub enum IN6W { # [ doc = "Enable" ] SET } impl IN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN6W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN6W < 'a > { w : & 'a mut W , } impl < 'a > _IN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN6W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN7`" ] pub enum IN7W { # [ doc = "Enable" ] SET } impl IN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN7W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _IN7W < 'a > { w : & 'a mut W , } impl < 'a > _IN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( IN7W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PORT`" ] pub enum PORTW { # [ doc = "Enable" ] SET } impl PORTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PORTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PORTW < 'a > { w : & 'a mut W , } impl < 'a > _PORTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PORTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PORTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for IN[0] event" ] # [ inline ] pub fn in0 ( & self ) -> IN0R { IN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for IN[1] event" ] # [ inline ] pub fn in1 ( & self ) -> IN1R { IN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for IN[2] event" ] # [ inline ] pub fn in2 ( & self ) -> IN2R { IN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for IN[3] event" ] # [ inline ] pub fn in3 ( & self ) -> IN3R { IN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for IN[4] event" ] # [ inline ] pub fn in4 ( & self ) -> IN4R { IN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for IN[5] event" ] # [ inline ] pub fn in5 ( & self ) -> IN5R { IN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for IN[6] event" ] # [ inline ] pub fn in6 ( & self ) -> IN6R { IN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for IN[7] event" ] # [ inline ] pub fn in7 ( & self ) -> IN7R { IN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Write '1' to Enable interrupt for PORT event" ] # [ inline ] pub fn port ( & self ) -> PORTR { PORTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for IN[0] event" ] # [ inline ] pub fn in0 ( & mut self ) -> _IN0W { _IN0W { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for IN[1] event" ] # [ inline ] pub fn in1 ( & mut self ) -> _IN1W { _IN1W { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for IN[2] event" ] # [ inline ] pub fn in2 ( & mut self ) -> _IN2W { _IN2W { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for IN[3] event" ] # [ inline ] pub fn in3 ( & mut self ) -> _IN3W { _IN3W { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for IN[4] event" ] # [ inline ] pub fn in4 ( & mut self ) -> _IN4W { _IN4W { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for IN[5] event" ] # [ inline ] pub fn in5 ( & mut self ) -> _IN5W { _IN5W { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for IN[6] event" ] # [ inline ] pub fn in6 ( & mut self ) -> _IN6W { _IN6W { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for IN[7] event" ] # [ inline ] pub fn in7 ( & mut self ) -> _IN7W { _IN7W { w : self } } # [ doc = "Bit 31 - Write '1' to Enable interrupt for PORT event" ] # [ inline ] pub fn port ( & mut self ) -> _PORTW { _PORTW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `IN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN0R :: DISABLED => false , IN0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN0R { match value { false => IN0R :: DISABLED , true => IN0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN0R :: ENABLED } } # [ doc = "Possible values of the field `IN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN1R :: DISABLED => false , IN1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN1R { match value { false => IN1R :: DISABLED , true => IN1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN1R :: ENABLED } } # [ doc = "Possible values of the field `IN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN2R :: DISABLED => false , IN2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN2R { match value { false => IN2R :: DISABLED , true => IN2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN2R :: ENABLED } } # [ doc = "Possible values of the field `IN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN3R :: DISABLED => false , IN3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN3R { match value { false => IN3R :: DISABLED , true => IN3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN3R :: ENABLED } } # [ doc = "Possible values of the field `IN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN4R :: DISABLED => false , IN4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN4R { match value { false => IN4R :: DISABLED , true => IN4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN4R :: ENABLED } } # [ doc = "Possible values of the field `IN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN5R :: DISABLED => false , IN5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN5R { match value { false => IN5R :: DISABLED , true => IN5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN5R :: ENABLED } } # [ doc = "Possible values of the field `IN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN6R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN6R :: DISABLED => false , IN6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN6R { match value { false => IN6R :: DISABLED , true => IN6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN6R :: ENABLED } } # [ doc = "Possible values of the field `IN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum IN7R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl IN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { IN7R :: DISABLED => false , IN7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> IN7R { match value { false => IN7R :: DISABLED , true => IN7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == IN7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == IN7R :: ENABLED } } # [ doc = "Possible values of the field `PORT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PORTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PORTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PORTR :: DISABLED => false , PORTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PORTR { match value { false => PORTR :: DISABLED , true => PORTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PORTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PORTR :: ENABLED } } # [ doc = "Values that can be written to the field `IN0`" ] pub enum IN0W { # [ doc = "Disable" ] CLEAR } impl IN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN0W < 'a > { w : & 'a mut W , } impl < 'a > _IN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN1`" ] pub enum IN1W { # [ doc = "Disable" ] CLEAR } impl IN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN1W < 'a > { w : & 'a mut W , } impl < 'a > _IN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN2`" ] pub enum IN2W { # [ doc = "Disable" ] CLEAR } impl IN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN2W < 'a > { w : & 'a mut W , } impl < 'a > _IN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN3`" ] pub enum IN3W { # [ doc = "Disable" ] CLEAR } impl IN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN3W < 'a > { w : & 'a mut W , } impl < 'a > _IN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN4`" ] pub enum IN4W { # [ doc = "Disable" ] CLEAR } impl IN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN4W < 'a > { w : & 'a mut W , } impl < 'a > _IN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN5`" ] pub enum IN5W { # [ doc = "Disable" ] CLEAR } impl IN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN5W < 'a > { w : & 'a mut W , } impl < 'a > _IN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN6`" ] pub enum IN6W { # [ doc = "Disable" ] CLEAR } impl IN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN6W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN6W < 'a > { w : & 'a mut W , } impl < 'a > _IN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN6W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `IN7`" ] pub enum IN7W { # [ doc = "Disable" ] CLEAR } impl IN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { IN7W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _IN7W < 'a > { w : & 'a mut W , } impl < 'a > _IN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : IN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( IN7W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PORT`" ] pub enum PORTW { # [ doc = "Disable" ] CLEAR } impl PORTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PORTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PORTW < 'a > { w : & 'a mut W , } impl < 'a > _PORTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PORTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PORTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for IN[0] event" ] # [ inline ] pub fn in0 ( & self ) -> IN0R { IN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for IN[1] event" ] # [ inline ] pub fn in1 ( & self ) -> IN1R { IN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for IN[2] event" ] # [ inline ] pub fn in2 ( & self ) -> IN2R { IN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for IN[3] event" ] # [ inline ] pub fn in3 ( & self ) -> IN3R { IN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for IN[4] event" ] # [ inline ] pub fn in4 ( & self ) -> IN4R { IN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for IN[5] event" ] # [ inline ] pub fn in5 ( & self ) -> IN5R { IN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for IN[6] event" ] # [ inline ] pub fn in6 ( & self ) -> IN6R { IN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for IN[7] event" ] # [ inline ] pub fn in7 ( & self ) -> IN7R { IN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Write '1' to Disable interrupt for PORT event" ] # [ inline ] pub fn port ( & self ) -> PORTR { PORTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for IN[0] event" ] # [ inline ] pub fn in0 ( & mut self ) -> _IN0W { _IN0W { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for IN[1] event" ] # [ inline ] pub fn in1 ( & mut self ) -> _IN1W { _IN1W { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for IN[2] event" ] # [ inline ] pub fn in2 ( & mut self ) -> _IN2W { _IN2W { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for IN[3] event" ] # [ inline ] pub fn in3 ( & mut self ) -> _IN3W { _IN3W { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for IN[4] event" ] # [ inline ] pub fn in4 ( & mut self ) -> _IN4W { _IN4W { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for IN[5] event" ] # [ inline ] pub fn in5 ( & mut self ) -> _IN5W { _IN5W { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for IN[6] event" ] # [ inline ] pub fn in6 ( & mut self ) -> _IN6W { _IN6W { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for IN[7] event" ] # [ inline ] pub fn in7 ( & mut self ) -> _IN7W { _IN7W { w : self } } # [ doc = "Bit 31 - Write '1' to Disable interrupt for PORT event" ] # [ inline ] pub fn port ( & mut self ) -> _PORTW { _PORTW { w : self } } } } # [ doc = "Description collection[0]: Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module." ] DISABLED , # [ doc = "Event mode" ] EVENT , # [ doc = "Task mode" ] TASK , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl MODER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { MODER :: DISABLED => 0 , MODER :: EVENT => 0x01 , MODER :: TASK => 0x03 , MODER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> MODER { match value { 0 => MODER :: DISABLED , 1 => MODER :: EVENT , 3 => MODER :: TASK , i => MODER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == MODER :: DISABLED } # [ doc = "Checks if the value of the field is `EVENT`" ] # [ inline ] pub fn is_event ( & self ) -> bool { * self == MODER :: EVENT } # [ doc = "Checks if the value of the field is `TASK`" ] # [ inline ] pub fn is_task ( & self ) -> bool { * self == MODER :: TASK } } # [ doc = r" Value of the field" ] pub struct PSELR { bits : u8 , } impl PSELR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = "Possible values of the field `POLARITY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum POLARITYR { # [ doc = "Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity." ] NONE , # [ doc = "Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin." ] LOTOHI , # [ doc = "Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin." ] HITOLO , # [ doc = "Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin." ] TOGGLE } impl POLARITYR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { POLARITYR :: NONE => 0 , POLARITYR :: LOTOHI => 0x01 , POLARITYR :: HITOLO => 0x02 , POLARITYR :: TOGGLE => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> POLARITYR { match value { 0 => POLARITYR :: NONE , 1 => POLARITYR :: LOTOHI , 2 => POLARITYR :: HITOLO , 3 => POLARITYR :: TOGGLE , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `NONE`" ] # [ inline ] pub fn is_none ( & self ) -> bool { * self == POLARITYR :: NONE } # [ doc = "Checks if the value of the field is `LOTOHI`" ] # [ inline ] pub fn is_lo_to_hi ( & self ) -> bool { * self == POLARITYR :: LOTOHI } # [ doc = "Checks if the value of the field is `HITOLO`" ] # [ inline ] pub fn is_hi_to_lo ( & self ) -> bool { * self == POLARITYR :: HITOLO } # [ doc = "Checks if the value of the field is `TOGGLE`" ] # [ inline ] pub fn is_toggle ( & self ) -> bool { * self == POLARITYR :: TOGGLE } } # [ doc = "Possible values of the field `OUTINIT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OUTINITR { # [ doc = "Task mode: Initial value of pin before task triggering is low" ] LOW , # [ doc = "Task mode: Initial value of pin before task triggering is high" ] HIGH } impl OUTINITR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OUTINITR :: LOW => false , OUTINITR :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OUTINITR { match value { false => OUTINITR :: LOW , true => OUTINITR :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == OUTINITR :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == OUTINITR :: HIGH } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module." ] DISABLED , # [ doc = "Event mode" ] EVENT , # [ doc = "Task mode" ] TASK } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { MODEW :: DISABLED => 0 , MODEW :: EVENT => 1 , MODEW :: TASK => 3 } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module." ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( MODEW :: DISABLED ) } # [ doc = "Event mode" ] # [ inline ] pub fn event ( self ) -> & 'a mut W { self . variant ( MODEW :: EVENT ) } # [ doc = "Task mode" ] # [ inline ] pub fn task ( self ) -> & 'a mut W { self . variant ( MODEW :: TASK ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _PSELW < 'a > { w : & 'a mut W , } impl < 'a > _PSELW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x1f ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `POLARITY`" ] pub enum POLARITYW { # [ doc = "Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity." ] NONE , # [ doc = "Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin." ] LOTOHI , # [ doc = "Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin." ] HITOLO , # [ doc = "Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin." ] TOGGLE } impl POLARITYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { POLARITYW :: NONE => 0 , POLARITYW :: LOTOHI => 1 , POLARITYW :: HITOLO => 2 , POLARITYW :: TOGGLE => 3 } } } # [ doc = r" Proxy" ] pub struct _POLARITYW < 'a > { w : & 'a mut W , } impl < 'a > _POLARITYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : POLARITYW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity." ] # [ inline ] pub fn none ( self ) -> & 'a mut W { self . variant ( POLARITYW :: NONE ) } # [ doc = "Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin." ] # [ inline ] pub fn lo_to_hi ( self ) -> & 'a mut W { self . variant ( POLARITYW :: LOTOHI ) } # [ doc = "Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin." ] # [ inline ] pub fn hi_to_lo ( self ) -> & 'a mut W { self . variant ( POLARITYW :: HITOLO ) } # [ doc = "Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin." ] # [ inline ] pub fn toggle ( self ) -> & 'a mut W { self . variant ( POLARITYW :: TOGGLE ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OUTINIT`" ] pub enum OUTINITW { # [ doc = "Task mode: Initial value of pin before task triggering is low" ] LOW , # [ doc = "Task mode: Initial value of pin before task triggering is high" ] HIGH } impl OUTINITW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OUTINITW :: LOW => false , OUTINITW :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _OUTINITW < 'a > { w : & 'a mut W , } impl < 'a > _OUTINITW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OUTINITW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Task mode: Initial value of pin before task triggering is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( OUTINITW :: LOW ) } # [ doc = "Task mode: Initial value of pin before task triggering is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( OUTINITW :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Mode" ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bits 8:12 - GPIO number associated with SET[n], CLR[n] and OUT[n] tasks and IN[n] event" ] # [ inline ] pub fn psel ( & self ) -> PSELR { let bits = { const MASK : u8 = 0x1f ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; PSELR { bits } } # [ doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT[n] task is triggered. When In event mode: Operation on input that shall trigger IN[n] event." ] # [ inline ] pub fn polarity ( & self ) -> POLARITYR { POLARITYR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect." ] # [ inline ] pub fn outinit ( & self ) -> OUTINITR { OUTINITR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Mode" ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } # [ doc = "Bits 8:12 - GPIO number associated with SET[n], CLR[n] and OUT[n] tasks and IN[n] event" ] # [ inline ] pub fn psel ( & mut self ) -> _PSELW { _PSELW { w : self } } # [ doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT[n] task is triggered. When In event mode: Operation on input that shall trigger IN[n] event." ] # [ inline ] pub fn polarity ( & mut self ) -> _POLARITYW { _POLARITYW { w : self } } # [ doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect." ] # [ inline ] pub fn outinit ( & mut self ) -> _OUTINITW { _OUTINITW { w : self } } } } } # [ doc = "Analog to Digital Converter" ] pub struct SAADC { _marker : PhantomData < * const ( ) > } unsafe impl Send for SAADC { } impl SAADC { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const saadc :: RegisterBlock { 0x4000_7000 as * const _ } } impl Deref for SAADC { type Target = saadc :: RegisterBlock ; fn deref ( & self ) -> & saadc :: RegisterBlock { unsafe { & * SAADC :: ptr ( ) } } } # [ doc = "Analog to Digital Converter" ] pub mod saadc { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start the ADC and prepare the result buffer in RAM" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Take one ADC sample, if scan is enabled all channels are sampled" ] pub tasks_sample : TASKS_SAMPLE , # [ doc = "0x08 - Stop the ADC and terminate any on-going conversion" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x0c - Starts offset auto-calibration" ] pub tasks_calibrateoffset : TASKS_CALIBRATEOFFSET , _reserved0 : [ u8 ; 240usize ] , # [ doc = "0x100 - The ADC has started" ] pub events_started : EVENTS_STARTED , # [ doc = "0x104 - The ADC has filled up the Result buffer" ] pub events_end : EVENTS_END , # [ doc = "0x108 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM." ] pub events_done : EVENTS_DONE , # [ doc = "0x10c - A result is ready to get transferred to RAM." ] pub events_resultdone : EVENTS_RESULTDONE , # [ doc = "0x110 - Calibration is complete" ] pub events_calibratedone : EVENTS_CALIBRATEDONE , # [ doc = "0x114 - The ADC has stopped" ] pub events_stopped : EVENTS_STOPPED , _reserved1 : [ u8 ; 488usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 244usize ] , # [ doc = "0x400 - Status" ] pub status : STATUS , _reserved3 : [ u8 ; 252usize ] , # [ doc = "0x500 - Enable or disable ADC" ] pub enable : ENABLE , _reserved4 : [ u8 ; 236usize ] , # [ doc = "0x5f0 - Resolution configuration" ] pub resolution : RESOLUTION , # [ doc = "0x5f4 - Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used." ] pub oversample : OVERSAMPLE , # [ doc = "0x5f8 - Controls normal or continuous sample rate" ] pub samplerate : SAMPLERATE , } # [ doc = "Start the ADC and prepare the result buffer in RAM" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start the ADC and prepare the result buffer in RAM" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Take one ADC sample, if scan is enabled all channels are sampled" ] pub struct TASKS_SAMPLE { register : VolatileCell < u32 > } # [ doc = "Take one ADC sample, if scan is enabled all channels are sampled" ] pub mod tasks_sample { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SAMPLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop the ADC and terminate any on-going conversion" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop the ADC and terminate any on-going conversion" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Starts offset auto-calibration" ] pub struct TASKS_CALIBRATEOFFSET { register : VolatileCell < u32 > } # [ doc = "Starts offset auto-calibration" ] pub mod tasks_calibrateoffset { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CALIBRATEOFFSET { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The ADC has started" ] pub struct EVENTS_STARTED { register : VolatileCell < u32 > } # [ doc = "The ADC has started" ] pub mod events_started { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The ADC has filled up the Result buffer" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "The ADC has filled up the Result buffer" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM." ] pub struct EVENTS_DONE { register : VolatileCell < u32 > } # [ doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM." ] pub mod events_done { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DONE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "A result is ready to get transferred to RAM." ] pub struct EVENTS_RESULTDONE { register : VolatileCell < u32 > } # [ doc = "A result is ready to get transferred to RAM." ] pub mod events_resultdone { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RESULTDONE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Calibration is complete" ] pub struct EVENTS_CALIBRATEDONE { register : VolatileCell < u32 > } # [ doc = "Calibration is complete" ] pub mod events_calibratedone { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CALIBRATEDONE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The ADC has stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "The ADC has stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `DONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DONER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DONER :: DISABLED => false , DONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DONER { match value { false => DONER :: DISABLED , true => DONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DONER :: ENABLED } } # [ doc = "Possible values of the field `RESULTDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESULTDONER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RESULTDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESULTDONER :: DISABLED => false , RESULTDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESULTDONER { match value { false => RESULTDONER :: DISABLED , true => RESULTDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RESULTDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RESULTDONER :: ENABLED } } # [ doc = "Possible values of the field `CALIBRATEDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CALIBRATEDONER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CALIBRATEDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CALIBRATEDONER :: DISABLED => false , CALIBRATEDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CALIBRATEDONER { match value { false => CALIBRATEDONER :: DISABLED , true => CALIBRATEDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CALIBRATEDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CALIBRATEDONER :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH0LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITHR :: DISABLED => false , CH0LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITHR { match value { false => CH0LIMITHR :: DISABLED , true => CH0LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH0LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITLR :: DISABLED => false , CH0LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITLR { match value { false => CH0LIMITLR :: DISABLED , true => CH0LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH1LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITHR :: DISABLED => false , CH1LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITHR { match value { false => CH1LIMITHR :: DISABLED , true => CH1LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH1LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITLR :: DISABLED => false , CH1LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITLR { match value { false => CH1LIMITLR :: DISABLED , true => CH1LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH2LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITHR :: DISABLED => false , CH2LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITHR { match value { false => CH2LIMITHR :: DISABLED , true => CH2LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH2LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITLR :: DISABLED => false , CH2LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITLR { match value { false => CH2LIMITLR :: DISABLED , true => CH2LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH3LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITHR :: DISABLED => false , CH3LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITHR { match value { false => CH3LIMITHR :: DISABLED , true => CH3LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH3LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITLR :: DISABLED => false , CH3LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITLR { match value { false => CH3LIMITLR :: DISABLED , true => CH3LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH4LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITHR :: DISABLED => false , CH4LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITHR { match value { false => CH4LIMITHR :: DISABLED , true => CH4LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH4LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITLR :: DISABLED => false , CH4LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITLR { match value { false => CH4LIMITLR :: DISABLED , true => CH4LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH5LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITHR :: DISABLED => false , CH5LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITHR { match value { false => CH5LIMITHR :: DISABLED , true => CH5LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH5LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITLR :: DISABLED => false , CH5LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITLR { match value { false => CH5LIMITLR :: DISABLED , true => CH5LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH6LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITHR :: DISABLED => false , CH6LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITHR { match value { false => CH6LIMITHR :: DISABLED , true => CH6LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH6LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITLR :: DISABLED => false , CH6LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITLR { match value { false => CH6LIMITLR :: DISABLED , true => CH6LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITHR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH7LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITHR :: DISABLED => false , CH7LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITHR { match value { false => CH7LIMITHR :: DISABLED , true => CH7LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITLR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH7LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITLR :: DISABLED => false , CH7LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITLR { match value { false => CH7LIMITLR :: DISABLED , true => CH7LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITLR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: DISABLED => false , STARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: DISABLED => false , ENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DONE`" ] pub enum DONEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DONEW :: DISABLED => false , DONEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DONEW < 'a > { w : & 'a mut W , } impl < 'a > _DONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DONEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DONEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RESULTDONE`" ] pub enum RESULTDONEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RESULTDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESULTDONEW :: DISABLED => false , RESULTDONEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RESULTDONEW < 'a > { w : & 'a mut W , } impl < 'a > _RESULTDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESULTDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RESULTDONEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RESULTDONEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CALIBRATEDONE`" ] pub enum CALIBRATEDONEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CALIBRATEDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CALIBRATEDONEW :: DISABLED => false , CALIBRATEDONEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CALIBRATEDONEW < 'a > { w : & 'a mut W , } impl < 'a > _CALIBRATEDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CALIBRATEDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CALIBRATEDONEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CALIBRATEDONEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITH`" ] pub enum CH0LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH0LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITHW :: DISABLED => false , CH0LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH0LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH0LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITL`" ] pub enum CH0LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH0LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITLW :: DISABLED => false , CH0LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH0LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH0LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITH`" ] pub enum CH1LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH1LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITHW :: DISABLED => false , CH1LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH1LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH1LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITL`" ] pub enum CH1LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH1LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITLW :: DISABLED => false , CH1LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH1LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH1LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITH`" ] pub enum CH2LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH2LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITHW :: DISABLED => false , CH2LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH2LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH2LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITL`" ] pub enum CH2LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH2LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITLW :: DISABLED => false , CH2LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH2LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH2LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITH`" ] pub enum CH3LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH3LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITHW :: DISABLED => false , CH3LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH3LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH3LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITL`" ] pub enum CH3LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH3LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITLW :: DISABLED => false , CH3LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH3LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH3LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITH`" ] pub enum CH4LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH4LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITHW :: DISABLED => false , CH4LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH4LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH4LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITL`" ] pub enum CH4LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH4LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITLW :: DISABLED => false , CH4LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH4LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH4LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITH`" ] pub enum CH5LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH5LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITHW :: DISABLED => false , CH5LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH5LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH5LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITL`" ] pub enum CH5LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH5LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITLW :: DISABLED => false , CH5LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH5LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH5LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITH`" ] pub enum CH6LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH6LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITHW :: DISABLED => false , CH6LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH6LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH6LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITL`" ] pub enum CH6LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH6LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITLW :: DISABLED => false , CH6LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH6LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH6LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITH`" ] pub enum CH7LIMITHW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH7LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITHW :: DISABLED => false , CH7LIMITHW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH7LIMITHW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH7LIMITHW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITL`" ] pub enum CH7LIMITLW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CH7LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITLW :: DISABLED => false , CH7LIMITLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH7LIMITLW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH7LIMITLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for DONE event" ] # [ inline ] pub fn done ( & self ) -> DONER { DONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & self ) -> RESULTDONER { RESULTDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & self ) -> CALIBRATEDONER { CALIBRATEDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & self ) -> CH0LIMITHR { CH0LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & self ) -> CH0LIMITLR { CH0LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable or disable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & self ) -> CH1LIMITHR { CH1LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & self ) -> CH1LIMITLR { CH1LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable or disable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & self ) -> CH2LIMITHR { CH2LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable or disable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & self ) -> CH2LIMITLR { CH2LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable or disable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & self ) -> CH3LIMITHR { CH3LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable or disable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & self ) -> CH3LIMITLR { CH3LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable or disable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & self ) -> CH4LIMITHR { CH4LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable or disable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & self ) -> CH4LIMITLR { CH4LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable or disable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & self ) -> CH5LIMITHR { CH5LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable or disable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & self ) -> CH5LIMITLR { CH5LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable or disable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & self ) -> CH6LIMITHR { CH6LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & self ) -> CH6LIMITLR { CH6LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & self ) -> CH7LIMITHR { CH7LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable or disable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & self ) -> CH7LIMITLR { CH7LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for DONE event" ] # [ inline ] pub fn done ( & mut self ) -> _DONEW { _DONEW { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & mut self ) -> _RESULTDONEW { _RESULTDONEW { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & mut self ) -> _CALIBRATEDONEW { _CALIBRATEDONEW { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 6 - Enable or disable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & mut self ) -> _CH0LIMITHW { _CH0LIMITHW { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & mut self ) -> _CH0LIMITLW { _CH0LIMITLW { w : self } } # [ doc = "Bit 8 - Enable or disable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & mut self ) -> _CH1LIMITHW { _CH1LIMITHW { w : self } } # [ doc = "Bit 9 - Enable or disable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & mut self ) -> _CH1LIMITLW { _CH1LIMITLW { w : self } } # [ doc = "Bit 10 - Enable or disable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & mut self ) -> _CH2LIMITHW { _CH2LIMITHW { w : self } } # [ doc = "Bit 11 - Enable or disable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & mut self ) -> _CH2LIMITLW { _CH2LIMITLW { w : self } } # [ doc = "Bit 12 - Enable or disable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & mut self ) -> _CH3LIMITHW { _CH3LIMITHW { w : self } } # [ doc = "Bit 13 - Enable or disable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & mut self ) -> _CH3LIMITLW { _CH3LIMITLW { w : self } } # [ doc = "Bit 14 - Enable or disable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & mut self ) -> _CH4LIMITHW { _CH4LIMITHW { w : self } } # [ doc = "Bit 15 - Enable or disable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & mut self ) -> _CH4LIMITLW { _CH4LIMITLW { w : self } } # [ doc = "Bit 16 - Enable or disable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & mut self ) -> _CH5LIMITHW { _CH5LIMITHW { w : self } } # [ doc = "Bit 17 - Enable or disable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & mut self ) -> _CH5LIMITLW { _CH5LIMITLW { w : self } } # [ doc = "Bit 18 - Enable or disable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & mut self ) -> _CH6LIMITHW { _CH6LIMITHW { w : self } } # [ doc = "Bit 19 - Enable or disable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & mut self ) -> _CH6LIMITLW { _CH6LIMITLW { w : self } } # [ doc = "Bit 20 - Enable or disable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & mut self ) -> _CH7LIMITHW { _CH7LIMITHW { w : self } } # [ doc = "Bit 21 - Enable or disable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & mut self ) -> _CH7LIMITLW { _CH7LIMITLW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `DONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DONER :: DISABLED => false , DONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DONER { match value { false => DONER :: DISABLED , true => DONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DONER :: ENABLED } } # [ doc = "Possible values of the field `RESULTDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESULTDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RESULTDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESULTDONER :: DISABLED => false , RESULTDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESULTDONER { match value { false => RESULTDONER :: DISABLED , true => RESULTDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RESULTDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RESULTDONER :: ENABLED } } # [ doc = "Possible values of the field `CALIBRATEDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CALIBRATEDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CALIBRATEDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CALIBRATEDONER :: DISABLED => false , CALIBRATEDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CALIBRATEDONER { match value { false => CALIBRATEDONER :: DISABLED , true => CALIBRATEDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CALIBRATEDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CALIBRATEDONER :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH0LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITHR :: DISABLED => false , CH0LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITHR { match value { false => CH0LIMITHR :: DISABLED , true => CH0LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH0LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITLR :: DISABLED => false , CH0LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITLR { match value { false => CH0LIMITLR :: DISABLED , true => CH0LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH1LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITHR :: DISABLED => false , CH1LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITHR { match value { false => CH1LIMITHR :: DISABLED , true => CH1LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH1LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITLR :: DISABLED => false , CH1LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITLR { match value { false => CH1LIMITLR :: DISABLED , true => CH1LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH2LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITHR :: DISABLED => false , CH2LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITHR { match value { false => CH2LIMITHR :: DISABLED , true => CH2LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH2LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITLR :: DISABLED => false , CH2LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITLR { match value { false => CH2LIMITLR :: DISABLED , true => CH2LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH3LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITHR :: DISABLED => false , CH3LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITHR { match value { false => CH3LIMITHR :: DISABLED , true => CH3LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH3LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITLR :: DISABLED => false , CH3LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITLR { match value { false => CH3LIMITLR :: DISABLED , true => CH3LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH4LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITHR :: DISABLED => false , CH4LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITHR { match value { false => CH4LIMITHR :: DISABLED , true => CH4LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH4LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITLR :: DISABLED => false , CH4LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITLR { match value { false => CH4LIMITLR :: DISABLED , true => CH4LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH5LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITHR :: DISABLED => false , CH5LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITHR { match value { false => CH5LIMITHR :: DISABLED , true => CH5LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH5LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITLR :: DISABLED => false , CH5LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITLR { match value { false => CH5LIMITLR :: DISABLED , true => CH5LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH6LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITHR :: DISABLED => false , CH6LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITHR { match value { false => CH6LIMITHR :: DISABLED , true => CH6LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH6LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITLR :: DISABLED => false , CH6LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITLR { match value { false => CH6LIMITLR :: DISABLED , true => CH6LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH7LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITHR :: DISABLED => false , CH7LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITHR { match value { false => CH7LIMITHR :: DISABLED , true => CH7LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH7LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITLR :: DISABLED => false , CH7LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITLR { match value { false => CH7LIMITLR :: DISABLED , true => CH7LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITLR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Enable" ] SET } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DONE`" ] pub enum DONEW { # [ doc = "Enable" ] SET } impl DONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DONEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DONEW < 'a > { w : & 'a mut W , } impl < 'a > _DONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DONEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RESULTDONE`" ] pub enum RESULTDONEW { # [ doc = "Enable" ] SET } impl RESULTDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESULTDONEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RESULTDONEW < 'a > { w : & 'a mut W , } impl < 'a > _RESULTDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESULTDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RESULTDONEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CALIBRATEDONE`" ] pub enum CALIBRATEDONEW { # [ doc = "Enable" ] SET } impl CALIBRATEDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CALIBRATEDONEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CALIBRATEDONEW < 'a > { w : & 'a mut W , } impl < 'a > _CALIBRATEDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CALIBRATEDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CALIBRATEDONEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITH`" ] pub enum CH0LIMITHW { # [ doc = "Enable" ] SET } impl CH0LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH0LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITL`" ] pub enum CH0LIMITLW { # [ doc = "Enable" ] SET } impl CH0LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH0LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITH`" ] pub enum CH1LIMITHW { # [ doc = "Enable" ] SET } impl CH1LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH1LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITL`" ] pub enum CH1LIMITLW { # [ doc = "Enable" ] SET } impl CH1LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH1LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITH`" ] pub enum CH2LIMITHW { # [ doc = "Enable" ] SET } impl CH2LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH2LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITL`" ] pub enum CH2LIMITLW { # [ doc = "Enable" ] SET } impl CH2LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH2LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITH`" ] pub enum CH3LIMITHW { # [ doc = "Enable" ] SET } impl CH3LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH3LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITL`" ] pub enum CH3LIMITLW { # [ doc = "Enable" ] SET } impl CH3LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH3LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITH`" ] pub enum CH4LIMITHW { # [ doc = "Enable" ] SET } impl CH4LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH4LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITL`" ] pub enum CH4LIMITLW { # [ doc = "Enable" ] SET } impl CH4LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH4LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITH`" ] pub enum CH5LIMITHW { # [ doc = "Enable" ] SET } impl CH5LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH5LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITL`" ] pub enum CH5LIMITLW { # [ doc = "Enable" ] SET } impl CH5LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH5LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITH`" ] pub enum CH6LIMITHW { # [ doc = "Enable" ] SET } impl CH6LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH6LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITL`" ] pub enum CH6LIMITLW { # [ doc = "Enable" ] SET } impl CH6LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH6LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITH`" ] pub enum CH7LIMITHW { # [ doc = "Enable" ] SET } impl CH7LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITHW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH7LIMITHW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITL`" ] pub enum CH7LIMITLW { # [ doc = "Enable" ] SET } impl CH7LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITLW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH7LIMITLW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for DONE event" ] # [ inline ] pub fn done ( & self ) -> DONER { DONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & self ) -> RESULTDONER { RESULTDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & self ) -> CALIBRATEDONER { CALIBRATEDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & self ) -> CH0LIMITHR { CH0LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & self ) -> CH0LIMITLR { CH0LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Enable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & self ) -> CH1LIMITHR { CH1LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & self ) -> CH1LIMITLR { CH1LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Enable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & self ) -> CH2LIMITHR { CH2LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Enable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & self ) -> CH2LIMITLR { CH2LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Enable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & self ) -> CH3LIMITHR { CH3LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Enable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & self ) -> CH3LIMITLR { CH3LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Enable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & self ) -> CH4LIMITHR { CH4LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Write '1' to Enable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & self ) -> CH4LIMITLR { CH4LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Enable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & self ) -> CH5LIMITHR { CH5LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & self ) -> CH5LIMITLR { CH5LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & self ) -> CH6LIMITHR { CH6LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & self ) -> CH6LIMITLR { CH6LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & self ) -> CH7LIMITHR { CH7LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Write '1' to Enable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & self ) -> CH7LIMITLR { CH7LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for DONE event" ] # [ inline ] pub fn done ( & mut self ) -> _DONEW { _DONEW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & mut self ) -> _RESULTDONEW { _RESULTDONEW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & mut self ) -> _CALIBRATEDONEW { _CALIBRATEDONEW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & mut self ) -> _CH0LIMITHW { _CH0LIMITHW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & mut self ) -> _CH0LIMITLW { _CH0LIMITLW { w : self } } # [ doc = "Bit 8 - Write '1' to Enable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & mut self ) -> _CH1LIMITHW { _CH1LIMITHW { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & mut self ) -> _CH1LIMITLW { _CH1LIMITLW { w : self } } # [ doc = "Bit 10 - Write '1' to Enable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & mut self ) -> _CH2LIMITHW { _CH2LIMITHW { w : self } } # [ doc = "Bit 11 - Write '1' to Enable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & mut self ) -> _CH2LIMITLW { _CH2LIMITLW { w : self } } # [ doc = "Bit 12 - Write '1' to Enable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & mut self ) -> _CH3LIMITHW { _CH3LIMITHW { w : self } } # [ doc = "Bit 13 - Write '1' to Enable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & mut self ) -> _CH3LIMITLW { _CH3LIMITLW { w : self } } # [ doc = "Bit 14 - Write '1' to Enable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & mut self ) -> _CH4LIMITHW { _CH4LIMITHW { w : self } } # [ doc = "Bit 15 - Write '1' to Enable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & mut self ) -> _CH4LIMITLW { _CH4LIMITLW { w : self } } # [ doc = "Bit 16 - Write '1' to Enable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & mut self ) -> _CH5LIMITHW { _CH5LIMITHW { w : self } } # [ doc = "Bit 17 - Write '1' to Enable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & mut self ) -> _CH5LIMITLW { _CH5LIMITLW { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & mut self ) -> _CH6LIMITHW { _CH6LIMITHW { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & mut self ) -> _CH6LIMITLW { _CH6LIMITLW { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & mut self ) -> _CH7LIMITHW { _CH7LIMITHW { w : self } } # [ doc = "Bit 21 - Write '1' to Enable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & mut self ) -> _CH7LIMITLW { _CH7LIMITLW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `DONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DONER :: DISABLED => false , DONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DONER { match value { false => DONER :: DISABLED , true => DONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DONER :: ENABLED } } # [ doc = "Possible values of the field `RESULTDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESULTDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RESULTDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESULTDONER :: DISABLED => false , RESULTDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESULTDONER { match value { false => RESULTDONER :: DISABLED , true => RESULTDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RESULTDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RESULTDONER :: ENABLED } } # [ doc = "Possible values of the field `CALIBRATEDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CALIBRATEDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CALIBRATEDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CALIBRATEDONER :: DISABLED => false , CALIBRATEDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CALIBRATEDONER { match value { false => CALIBRATEDONER :: DISABLED , true => CALIBRATEDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CALIBRATEDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CALIBRATEDONER :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH0LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITHR :: DISABLED => false , CH0LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITHR { match value { false => CH0LIMITHR :: DISABLED , true => CH0LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH0LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH0LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0LIMITLR :: DISABLED => false , CH0LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0LIMITLR { match value { false => CH0LIMITLR :: DISABLED , true => CH0LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH1LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITHR :: DISABLED => false , CH1LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITHR { match value { false => CH1LIMITHR :: DISABLED , true => CH1LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH1LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH1LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1LIMITLR :: DISABLED => false , CH1LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1LIMITLR { match value { false => CH1LIMITLR :: DISABLED , true => CH1LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH2LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITHR :: DISABLED => false , CH2LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITHR { match value { false => CH2LIMITHR :: DISABLED , true => CH2LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH2LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH2LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2LIMITLR :: DISABLED => false , CH2LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2LIMITLR { match value { false => CH2LIMITLR :: DISABLED , true => CH2LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH3LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITHR :: DISABLED => false , CH3LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITHR { match value { false => CH3LIMITHR :: DISABLED , true => CH3LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH3LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH3LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3LIMITLR :: DISABLED => false , CH3LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3LIMITLR { match value { false => CH3LIMITLR :: DISABLED , true => CH3LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH4LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITHR :: DISABLED => false , CH4LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITHR { match value { false => CH4LIMITHR :: DISABLED , true => CH4LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH4LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH4LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4LIMITLR :: DISABLED => false , CH4LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4LIMITLR { match value { false => CH4LIMITLR :: DISABLED , true => CH4LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH5LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITHR :: DISABLED => false , CH5LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITHR { match value { false => CH5LIMITHR :: DISABLED , true => CH5LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH5LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH5LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5LIMITLR :: DISABLED => false , CH5LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5LIMITLR { match value { false => CH5LIMITLR :: DISABLED , true => CH5LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH6LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITHR :: DISABLED => false , CH6LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITHR { match value { false => CH6LIMITHR :: DISABLED , true => CH6LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH6LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH6LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6LIMITLR :: DISABLED => false , CH6LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6LIMITLR { match value { false => CH6LIMITLR :: DISABLED , true => CH6LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6LIMITLR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITHR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH7LIMITHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITHR :: DISABLED => false , CH7LIMITHR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITHR { match value { false => CH7LIMITHR :: DISABLED , true => CH7LIMITHR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITHR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITHR :: ENABLED } } # [ doc = "Possible values of the field `CH7LIMITL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7LIMITLR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CH7LIMITLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7LIMITLR :: DISABLED => false , CH7LIMITLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7LIMITLR { match value { false => CH7LIMITLR :: DISABLED , true => CH7LIMITLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7LIMITLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7LIMITLR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] CLEAR } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DONE`" ] pub enum DONEW { # [ doc = "Disable" ] CLEAR } impl DONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DONEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DONEW < 'a > { w : & 'a mut W , } impl < 'a > _DONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DONEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RESULTDONE`" ] pub enum RESULTDONEW { # [ doc = "Disable" ] CLEAR } impl RESULTDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESULTDONEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RESULTDONEW < 'a > { w : & 'a mut W , } impl < 'a > _RESULTDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESULTDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RESULTDONEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CALIBRATEDONE`" ] pub enum CALIBRATEDONEW { # [ doc = "Disable" ] CLEAR } impl CALIBRATEDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CALIBRATEDONEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CALIBRATEDONEW < 'a > { w : & 'a mut W , } impl < 'a > _CALIBRATEDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CALIBRATEDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CALIBRATEDONEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITH`" ] pub enum CH0LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH0LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH0LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH0LIMITL`" ] pub enum CH0LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH0LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH0LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH0LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH0LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITH`" ] pub enum CH1LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH1LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH1LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1LIMITL`" ] pub enum CH1LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH1LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH1LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH1LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH1LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITH`" ] pub enum CH2LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH2LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH2LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2LIMITL`" ] pub enum CH2LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH2LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH2LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH2LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH2LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITH`" ] pub enum CH3LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH3LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH3LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3LIMITL`" ] pub enum CH3LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH3LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH3LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH3LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH3LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITH`" ] pub enum CH4LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH4LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH4LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4LIMITL`" ] pub enum CH4LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH4LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH4LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH4LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH4LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITH`" ] pub enum CH5LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH5LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH5LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5LIMITL`" ] pub enum CH5LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH5LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH5LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH5LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH5LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITH`" ] pub enum CH6LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH6LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH6LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6LIMITL`" ] pub enum CH6LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH6LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH6LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH6LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH6LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITH`" ] pub enum CH7LIMITHW { # [ doc = "Disable" ] CLEAR } impl CH7LIMITHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITHW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITHW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH7LIMITHW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7LIMITL`" ] pub enum CH7LIMITLW { # [ doc = "Disable" ] CLEAR } impl CH7LIMITLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7LIMITLW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH7LIMITLW < 'a > { w : & 'a mut W , } impl < 'a > _CH7LIMITLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7LIMITLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH7LIMITLW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for DONE event" ] # [ inline ] pub fn done ( & self ) -> DONER { DONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & self ) -> RESULTDONER { RESULTDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & self ) -> CALIBRATEDONER { CALIBRATEDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & self ) -> CH0LIMITHR { CH0LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & self ) -> CH0LIMITLR { CH0LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Disable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & self ) -> CH1LIMITHR { CH1LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & self ) -> CH1LIMITLR { CH1LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Disable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & self ) -> CH2LIMITHR { CH2LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Disable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & self ) -> CH2LIMITLR { CH2LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Disable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & self ) -> CH3LIMITHR { CH3LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Disable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & self ) -> CH3LIMITLR { CH3LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Disable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & self ) -> CH4LIMITHR { CH4LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Write '1' to Disable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & self ) -> CH4LIMITLR { CH4LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Disable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & self ) -> CH5LIMITHR { CH5LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & self ) -> CH5LIMITLR { CH5LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & self ) -> CH6LIMITHR { CH6LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & self ) -> CH6LIMITLR { CH6LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & self ) -> CH7LIMITHR { CH7LIMITHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Write '1' to Disable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & self ) -> CH7LIMITLR { CH7LIMITLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for DONE event" ] # [ inline ] pub fn done ( & mut self ) -> _DONEW { _DONEW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for RESULTDONE event" ] # [ inline ] pub fn resultdone ( & mut self ) -> _RESULTDONEW { _RESULTDONEW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for CALIBRATEDONE event" ] # [ inline ] pub fn calibratedone ( & mut self ) -> _CALIBRATEDONEW { _CALIBRATEDONEW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for CH[0].LIMITH event" ] # [ inline ] pub fn ch0limith ( & mut self ) -> _CH0LIMITHW { _CH0LIMITHW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for CH[0].LIMITL event" ] # [ inline ] pub fn ch0limitl ( & mut self ) -> _CH0LIMITLW { _CH0LIMITLW { w : self } } # [ doc = "Bit 8 - Write '1' to Disable interrupt for CH[1].LIMITH event" ] # [ inline ] pub fn ch1limith ( & mut self ) -> _CH1LIMITHW { _CH1LIMITHW { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for CH[1].LIMITL event" ] # [ inline ] pub fn ch1limitl ( & mut self ) -> _CH1LIMITLW { _CH1LIMITLW { w : self } } # [ doc = "Bit 10 - Write '1' to Disable interrupt for CH[2].LIMITH event" ] # [ inline ] pub fn ch2limith ( & mut self ) -> _CH2LIMITHW { _CH2LIMITHW { w : self } } # [ doc = "Bit 11 - Write '1' to Disable interrupt for CH[2].LIMITL event" ] # [ inline ] pub fn ch2limitl ( & mut self ) -> _CH2LIMITLW { _CH2LIMITLW { w : self } } # [ doc = "Bit 12 - Write '1' to Disable interrupt for CH[3].LIMITH event" ] # [ inline ] pub fn ch3limith ( & mut self ) -> _CH3LIMITHW { _CH3LIMITHW { w : self } } # [ doc = "Bit 13 - Write '1' to Disable interrupt for CH[3].LIMITL event" ] # [ inline ] pub fn ch3limitl ( & mut self ) -> _CH3LIMITLW { _CH3LIMITLW { w : self } } # [ doc = "Bit 14 - Write '1' to Disable interrupt for CH[4].LIMITH event" ] # [ inline ] pub fn ch4limith ( & mut self ) -> _CH4LIMITHW { _CH4LIMITHW { w : self } } # [ doc = "Bit 15 - Write '1' to Disable interrupt for CH[4].LIMITL event" ] # [ inline ] pub fn ch4limitl ( & mut self ) -> _CH4LIMITLW { _CH4LIMITLW { w : self } } # [ doc = "Bit 16 - Write '1' to Disable interrupt for CH[5].LIMITH event" ] # [ inline ] pub fn ch5limith ( & mut self ) -> _CH5LIMITHW { _CH5LIMITHW { w : self } } # [ doc = "Bit 17 - Write '1' to Disable interrupt for CH[5].LIMITL event" ] # [ inline ] pub fn ch5limitl ( & mut self ) -> _CH5LIMITLW { _CH5LIMITLW { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for CH[6].LIMITH event" ] # [ inline ] pub fn ch6limith ( & mut self ) -> _CH6LIMITHW { _CH6LIMITHW { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for CH[6].LIMITL event" ] # [ inline ] pub fn ch6limitl ( & mut self ) -> _CH6LIMITLW { _CH6LIMITLW { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for CH[7].LIMITH event" ] # [ inline ] pub fn ch7limith ( & mut self ) -> _CH7LIMITHW { _CH7LIMITHW { w : self } } # [ doc = "Bit 21 - Write '1' to Disable interrupt for CH[7].LIMITL event" ] # [ inline ] pub fn ch7limitl ( & mut self ) -> _CH7LIMITLW { _CH7LIMITLW { w : self } } } } # [ doc = "Status" ] pub struct STATUS { register : VolatileCell < u32 > } # [ doc = "Status" ] pub mod status { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: STATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `STATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STATUSR { # [ doc = "ADC is ready. No on-going conversion." ] READY , # [ doc = "ADC is busy. Conversion in progress." ] BUSY } impl STATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STATUSR :: READY => false , STATUSR :: BUSY => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STATUSR { match value { false => STATUSR :: READY , true => STATUSR :: BUSY , } } # [ doc = "Checks if the value of the field is `READY`" ] # [ inline ] pub fn is_ready ( & self ) -> bool { * self == STATUSR :: READY } # [ doc = "Checks if the value of the field is `BUSY`" ] # [ inline ] pub fn is_busy ( & self ) -> bool { * self == STATUSR :: BUSY } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Status" ] # [ inline ] pub fn status ( & self ) -> STATUSR { STATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Enable or disable ADC" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable or disable ADC" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable ADC" ] DISABLED , # [ doc = "Enable ADC" ] ENABLED } impl ENABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENABLER :: DISABLED => false , ENABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENABLER { match value { false => ENABLER :: DISABLED , true => ENABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable ADC" ] DISABLED , # [ doc = "Enable ADC" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENABLEW :: DISABLED => false , ENABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable ADC" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable ADC" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable ADC" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable ADC" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Resolution configuration" ] pub struct RESOLUTION { register : VolatileCell < u32 > } # [ doc = "Resolution configuration" ] pub mod resolution { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RESOLUTION { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `VAL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VALR { # [ doc = "8 bit" ] _8BIT , # [ doc = "10 bit" ] _10BIT , # [ doc = "12 bit" ] _12BIT , # [ doc = "14 bit" ] _14BIT , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl VALR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { VALR :: _8BIT => 0 , VALR :: _10BIT => 0x01 , VALR :: _12BIT => 0x02 , VALR :: _14BIT => 0x03 , VALR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> VALR { match value { 0 => VALR :: _8BIT , 1 => VALR :: _10BIT , 2 => VALR :: _12BIT , 3 => VALR :: _14BIT , i => VALR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `_8BIT`" ] # [ inline ] pub fn is_8bit ( & self ) -> bool { * self == VALR :: _8BIT } # [ doc = "Checks if the value of the field is `_10BIT`" ] # [ inline ] pub fn is_10bit ( & self ) -> bool { * self == VALR :: _10BIT } # [ doc = "Checks if the value of the field is `_12BIT`" ] # [ inline ] pub fn is_12bit ( & self ) -> bool { * self == VALR :: _12BIT } # [ doc = "Checks if the value of the field is `_14BIT`" ] # [ inline ] pub fn is_14bit ( & self ) -> bool { * self == VALR :: _14BIT } } # [ doc = "Values that can be written to the field `VAL`" ] pub enum VALW { # [ doc = "8 bit" ] _8BIT , # [ doc = "10 bit" ] _10BIT , # [ doc = "12 bit" ] _12BIT , # [ doc = "14 bit" ] _14BIT } impl VALW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { VALW :: _8BIT => 0 , VALW :: _10BIT => 1 , VALW :: _12BIT => 2 , VALW :: _14BIT => 3 } } } # [ doc = r" Proxy" ] pub struct _VALW < 'a > { w : & 'a mut W , } impl < 'a > _VALW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : VALW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "8 bit" ] # [ inline ] pub fn _8bit ( self ) -> & 'a mut W { self . variant ( VALW :: _8BIT ) } # [ doc = "10 bit" ] # [ inline ] pub fn _10bit ( self ) -> & 'a mut W { self . variant ( VALW :: _10BIT ) } # [ doc = "12 bit" ] # [ inline ] pub fn _12bit ( self ) -> & 'a mut W { self . variant ( VALW :: _12BIT ) } # [ doc = "14 bit" ] # [ inline ] pub fn _14bit ( self ) -> & 'a mut W { self . variant ( VALW :: _14BIT ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Set the resolution" ] # [ inline ] pub fn val ( & self ) -> VALR { VALR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Set the resolution" ] # [ inline ] pub fn val ( & mut self ) -> _VALW { _VALW { w : self } } } } # [ doc = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used." ] pub struct OVERSAMPLE { register : VolatileCell < u32 > } # [ doc = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used." ] pub mod oversample { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: OVERSAMPLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OVERSAMPLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVERSAMPLER { # [ doc = "Bypass oversampling" ] BYPASS , # [ doc = "Oversample 2x" ] OVER2X , # [ doc = "Oversample 4x" ] OVER4X , # [ doc = "Oversample 8x" ] OVER8X , # [ doc = "Oversample 16x" ] OVER16X , # [ doc = "Oversample 32x" ] OVER32X , # [ doc = "Oversample 64x" ] OVER64X , # [ doc = "Oversample 128x" ] OVER128X , # [ doc = "Oversample 256x" ] OVER256X , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl OVERSAMPLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { OVERSAMPLER :: BYPASS => 0 , OVERSAMPLER :: OVER2X => 0x01 , OVERSAMPLER :: OVER4X => 0x02 , OVERSAMPLER :: OVER8X => 0x03 , OVERSAMPLER :: OVER16X => 0x04 , OVERSAMPLER :: OVER32X => 0x05 , OVERSAMPLER :: OVER64X => 0x06 , OVERSAMPLER :: OVER128X => 0x07 , OVERSAMPLER :: OVER256X => 0x08 , OVERSAMPLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> OVERSAMPLER { match value { 0 => OVERSAMPLER :: BYPASS , 1 => OVERSAMPLER :: OVER2X , 2 => OVERSAMPLER :: OVER4X , 3 => OVERSAMPLER :: OVER8X , 4 => OVERSAMPLER :: OVER16X , 5 => OVERSAMPLER :: OVER32X , 6 => OVERSAMPLER :: OVER64X , 7 => OVERSAMPLER :: OVER128X , 8 => OVERSAMPLER :: OVER256X , i => OVERSAMPLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `BYPASS`" ] # [ inline ] pub fn is_bypass ( & self ) -> bool { * self == OVERSAMPLER :: BYPASS } # [ doc = "Checks if the value of the field is `OVER2X`" ] # [ inline ] pub fn is_over2x ( & self ) -> bool { * self == OVERSAMPLER :: OVER2X } # [ doc = "Checks if the value of the field is `OVER4X`" ] # [ inline ] pub fn is_over4x ( & self ) -> bool { * self == OVERSAMPLER :: OVER4X } # [ doc = "Checks if the value of the field is `OVER8X`" ] # [ inline ] pub fn is_over8x ( & self ) -> bool { * self == OVERSAMPLER :: OVER8X } # [ doc = "Checks if the value of the field is `OVER16X`" ] # [ inline ] pub fn is_over16x ( & self ) -> bool { * self == OVERSAMPLER :: OVER16X } # [ doc = "Checks if the value of the field is `OVER32X`" ] # [ inline ] pub fn is_over32x ( & self ) -> bool { * self == OVERSAMPLER :: OVER32X } # [ doc = "Checks if the value of the field is `OVER64X`" ] # [ inline ] pub fn is_over64x ( & self ) -> bool { * self == OVERSAMPLER :: OVER64X } # [ doc = "Checks if the value of the field is `OVER128X`" ] # [ inline ] pub fn is_over128x ( & self ) -> bool { * self == OVERSAMPLER :: OVER128X } # [ doc = "Checks if the value of the field is `OVER256X`" ] # [ inline ] pub fn is_over256x ( & self ) -> bool { * self == OVERSAMPLER :: OVER256X } } # [ doc = "Values that can be written to the field `OVERSAMPLE`" ] pub enum OVERSAMPLEW { # [ doc = "Bypass oversampling" ] BYPASS , # [ doc = "Oversample 2x" ] OVER2X , # [ doc = "Oversample 4x" ] OVER4X , # [ doc = "Oversample 8x" ] OVER8X , # [ doc = "Oversample 16x" ] OVER16X , # [ doc = "Oversample 32x" ] OVER32X , # [ doc = "Oversample 64x" ] OVER64X , # [ doc = "Oversample 128x" ] OVER128X , # [ doc = "Oversample 256x" ] OVER256X } impl OVERSAMPLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { OVERSAMPLEW :: BYPASS => 0 , OVERSAMPLEW :: OVER2X => 1 , OVERSAMPLEW :: OVER4X => 2 , OVERSAMPLEW :: OVER8X => 3 , OVERSAMPLEW :: OVER16X => 4 , OVERSAMPLEW :: OVER32X => 5 , OVERSAMPLEW :: OVER64X => 6 , OVERSAMPLEW :: OVER128X => 7 , OVERSAMPLEW :: OVER256X => 8 } } } # [ doc = r" Proxy" ] pub struct _OVERSAMPLEW < 'a > { w : & 'a mut W , } impl < 'a > _OVERSAMPLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVERSAMPLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Bypass oversampling" ] # [ inline ] pub fn bypass ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: BYPASS ) } # [ doc = "Oversample 2x" ] # [ inline ] pub fn over2x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER2X ) } # [ doc = "Oversample 4x" ] # [ inline ] pub fn over4x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER4X ) } # [ doc = "Oversample 8x" ] # [ inline ] pub fn over8x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER8X ) } # [ doc = "Oversample 16x" ] # [ inline ] pub fn over16x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER16X ) } # [ doc = "Oversample 32x" ] # [ inline ] pub fn over32x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER32X ) } # [ doc = "Oversample 64x" ] # [ inline ] pub fn over64x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER64X ) } # [ doc = "Oversample 128x" ] # [ inline ] pub fn over128x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER128X ) } # [ doc = "Oversample 256x" ] # [ inline ] pub fn over256x ( self ) -> & 'a mut W { self . variant ( OVERSAMPLEW :: OVER256X ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Oversample control" ] # [ inline ] pub fn oversample ( & self ) -> OVERSAMPLER { OVERSAMPLER :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Oversample control" ] # [ inline ] pub fn oversample ( & mut self ) -> _OVERSAMPLEW { _OVERSAMPLEW { w : self } } } } # [ doc = "Controls normal or continuous sample rate" ] pub struct SAMPLERATE { register : VolatileCell < u32 > } # [ doc = "Controls normal or continuous sample rate" ] pub mod samplerate { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SAMPLERATE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CCR { bits : u16 , } impl CCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "Rate is controlled from SAMPLE task" ] TASK , # [ doc = "Rate is controlled from local timer (use CC to control the rate)" ] TIMERS } impl MODER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MODER :: TASK => false , MODER :: TIMERS => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MODER { match value { false => MODER :: TASK , true => MODER :: TIMERS , } } # [ doc = "Checks if the value of the field is `TASK`" ] # [ inline ] pub fn is_task ( & self ) -> bool { * self == MODER :: TASK } # [ doc = "Checks if the value of the field is `TIMERS`" ] # [ inline ] pub fn is_timers ( & self ) -> bool { * self == MODER :: TIMERS } } # [ doc = r" Proxy" ] pub struct _CCW < 'a > { w : & 'a mut W , } impl < 'a > _CCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x07ff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "Rate is controlled from SAMPLE task" ] TASK , # [ doc = "Rate is controlled from local timer (use CC to control the rate)" ] TIMERS } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { MODEW :: TASK => false , MODEW :: TIMERS => true } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Rate is controlled from SAMPLE task" ] # [ inline ] pub fn task ( self ) -> & 'a mut W { self . variant ( MODEW :: TASK ) } # [ doc = "Rate is controlled from local timer (use CC to control the rate)" ] # [ inline ] pub fn timers ( self ) -> & 'a mut W { self . variant ( MODEW :: TIMERS ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC" ] # [ inline ] pub fn cc ( & self ) -> CCR { let bits = { const MASK : u16 = 0x07ff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; CCR { bits } } # [ doc = "Bit 12 - Select mode for sample rate control" ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC" ] # [ inline ] pub fn cc ( & mut self ) -> _CCW { _CCW { w : self } } # [ doc = "Bit 12 - Select mode for sample rate control" ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } } } } # [ doc = "Timer/Counter 0" ] pub struct TIMER0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TIMER0 { } impl TIMER0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const timer0 :: RegisterBlock { 0x4000_8000 as * const _ } } impl Deref for TIMER0 { type Target = timer0 :: RegisterBlock ; fn deref ( & self ) -> & timer0 :: RegisterBlock { unsafe { & * TIMER0 :: ptr ( ) } } } # [ doc = "Timer/Counter 0" ] pub mod timer0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start Timer" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stop Timer" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Increment Timer (Counter mode only)" ] pub tasks_count : TASKS_COUNT , # [ doc = "0x0c - Clear time" ] pub tasks_clear : TASKS_CLEAR , # [ doc = "0x10 - Deprecated register - Shut down timer" ] pub tasks_shutdown : TASKS_SHUTDOWN , _reserved0 : [ u8 ; 44usize ] , # [ doc = "0x40 - Description collection[0]: Capture Timer value to CC[0] register" ] pub tasks_capture : [ TASKS_CAPTURE ; 6 ] , _reserved1 : [ u8 ; 232usize ] , # [ doc = "0x140 - Description collection[0]: Compare event on CC[0] match" ] pub events_compare : [ EVENTS_COMPARE ; 6 ] , _reserved2 : [ u8 ; 168usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved3 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved4 : [ u8 ; 504usize ] , # [ doc = "0x504 - Timer mode selection" ] pub mode : MODE , # [ doc = "0x508 - Configure the number of bits used by the TIMER" ] pub bitmode : BITMODE , _reserved5 : [ u8 ; 4usize ] , # [ doc = "0x510 - Timer prescaler register" ] pub prescaler : PRESCALER , _reserved6 : [ u8 ; 44usize ] , # [ doc = "0x540 - Description collection[0]: Capture/Compare register 0" ] pub cc : [ CC ; 6 ] , } # [ doc = "Start Timer" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start Timer" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop Timer" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop Timer" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Increment Timer (Counter mode only)" ] pub struct TASKS_COUNT { register : VolatileCell < u32 > } # [ doc = "Increment Timer (Counter mode only)" ] pub mod tasks_count { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_COUNT { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Clear time" ] pub struct TASKS_CLEAR { register : VolatileCell < u32 > } # [ doc = "Clear time" ] pub mod tasks_clear { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CLEAR { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Deprecated register - Shut down timer" ] pub struct TASKS_SHUTDOWN { register : VolatileCell < u32 > } # [ doc = "Deprecated register - Shut down timer" ] pub mod tasks_shutdown { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SHUTDOWN { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Capture Timer value to CC[0] register" ] pub struct TASKS_CAPTURE { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Capture Timer value to CC[0] register" ] pub mod tasks_capture { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CAPTURE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Compare event on CC[0] match" ] pub struct EVENTS_COMPARE { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Compare event on CC[0] match" ] pub mod events_compare { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_COMPARE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `COMPARE0_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE0_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0_CLEARR :: DISABLED => false , COMPARE0_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0_CLEARR { match value { false => COMPARE0_CLEARR :: DISABLED , true => COMPARE0_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE1_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1_CLEARR :: DISABLED => false , COMPARE1_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1_CLEARR { match value { false => COMPARE1_CLEARR :: DISABLED , true => COMPARE1_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE2_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2_CLEARR :: DISABLED => false , COMPARE2_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2_CLEARR { match value { false => COMPARE2_CLEARR :: DISABLED , true => COMPARE2_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE3_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3_CLEARR :: DISABLED => false , COMPARE3_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3_CLEARR { match value { false => COMPARE3_CLEARR :: DISABLED , true => COMPARE3_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE4_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE4_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE4_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE4_CLEARR :: DISABLED => false , COMPARE4_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE4_CLEARR { match value { false => COMPARE4_CLEARR :: DISABLED , true => COMPARE4_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE4_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE4_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE5_CLEAR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE5_CLEARR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE5_CLEARR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE5_CLEARR :: DISABLED => false , COMPARE5_CLEARR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE5_CLEARR { match value { false => COMPARE5_CLEARR :: DISABLED , true => COMPARE5_CLEARR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE5_CLEARR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE5_CLEARR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE0_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0_STOPR :: DISABLED => false , COMPARE0_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0_STOPR { match value { false => COMPARE0_STOPR :: DISABLED , true => COMPARE0_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0_STOPR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE1_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1_STOPR :: DISABLED => false , COMPARE1_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1_STOPR { match value { false => COMPARE1_STOPR :: DISABLED , true => COMPARE1_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1_STOPR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE2_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2_STOPR :: DISABLED => false , COMPARE2_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2_STOPR { match value { false => COMPARE2_STOPR :: DISABLED , true => COMPARE2_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2_STOPR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE3_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3_STOPR :: DISABLED => false , COMPARE3_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3_STOPR { match value { false => COMPARE3_STOPR :: DISABLED , true => COMPARE3_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3_STOPR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE4_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE4_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE4_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE4_STOPR :: DISABLED => false , COMPARE4_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE4_STOPR { match value { false => COMPARE4_STOPR :: DISABLED , true => COMPARE4_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE4_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE4_STOPR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE5_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE5_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE5_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE5_STOPR :: DISABLED => false , COMPARE5_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE5_STOPR { match value { false => COMPARE5_STOPR :: DISABLED , true => COMPARE5_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE5_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE5_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `COMPARE0_CLEAR`" ] pub enum COMPARE0_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE0_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0_CLEARW :: DISABLED => false , COMPARE0_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE0_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE0_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1_CLEAR`" ] pub enum COMPARE1_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE1_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1_CLEARW :: DISABLED => false , COMPARE1_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE1_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE1_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2_CLEAR`" ] pub enum COMPARE2_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE2_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2_CLEARW :: DISABLED => false , COMPARE2_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE2_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE2_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3_CLEAR`" ] pub enum COMPARE3_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE3_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3_CLEARW :: DISABLED => false , COMPARE3_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE3_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE3_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE4_CLEAR`" ] pub enum COMPARE4_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE4_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE4_CLEARW :: DISABLED => false , COMPARE4_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE4_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE4_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE4_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE4_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE4_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE5_CLEAR`" ] pub enum COMPARE5_CLEARW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE5_CLEARW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE5_CLEARW :: DISABLED => false , COMPARE5_CLEARW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE5_CLEARW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE5_CLEARW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE5_CLEARW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE5_CLEARW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE5_CLEARW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0_STOP`" ] pub enum COMPARE0_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE0_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0_STOPW :: DISABLED => false , COMPARE0_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE0_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE0_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1_STOP`" ] pub enum COMPARE1_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE1_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1_STOPW :: DISABLED => false , COMPARE1_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE1_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE1_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2_STOP`" ] pub enum COMPARE2_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE2_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2_STOPW :: DISABLED => false , COMPARE2_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE2_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE2_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3_STOP`" ] pub enum COMPARE3_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE3_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3_STOPW :: DISABLED => false , COMPARE3_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE3_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE3_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE4_STOP`" ] pub enum COMPARE4_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE4_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE4_STOPW :: DISABLED => false , COMPARE4_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE4_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE4_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE4_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE4_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE4_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE5_STOP`" ] pub enum COMPARE5_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl COMPARE5_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE5_STOPW :: DISABLED => false , COMPARE5_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE5_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE5_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE5_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE5_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE5_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between COMPARE[0] event and CLEAR task" ] # [ inline ] pub fn compare0_clear ( & self ) -> COMPARE0_CLEARR { COMPARE0_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between COMPARE[1] event and CLEAR task" ] # [ inline ] pub fn compare1_clear ( & self ) -> COMPARE1_CLEARR { COMPARE1_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between COMPARE[2] event and CLEAR task" ] # [ inline ] pub fn compare2_clear ( & self ) -> COMPARE2_CLEARR { COMPARE2_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between COMPARE[3] event and CLEAR task" ] # [ inline ] pub fn compare3_clear ( & self ) -> COMPARE3_CLEARR { COMPARE3_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between COMPARE[4] event and CLEAR task" ] # [ inline ] pub fn compare4_clear ( & self ) -> COMPARE4_CLEARR { COMPARE4_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Shortcut between COMPARE[5] event and CLEAR task" ] # [ inline ] pub fn compare5_clear ( & self ) -> COMPARE5_CLEARR { COMPARE5_CLEARR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Shortcut between COMPARE[0] event and STOP task" ] # [ inline ] pub fn compare0_stop ( & self ) -> COMPARE0_STOPR { COMPARE0_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Shortcut between COMPARE[1] event and STOP task" ] # [ inline ] pub fn compare1_stop ( & self ) -> COMPARE1_STOPR { COMPARE1_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Shortcut between COMPARE[2] event and STOP task" ] # [ inline ] pub fn compare2_stop ( & self ) -> COMPARE2_STOPR { COMPARE2_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Shortcut between COMPARE[3] event and STOP task" ] # [ inline ] pub fn compare3_stop ( & self ) -> COMPARE3_STOPR { COMPARE3_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Shortcut between COMPARE[4] event and STOP task" ] # [ inline ] pub fn compare4_stop ( & self ) -> COMPARE4_STOPR { COMPARE4_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Shortcut between COMPARE[5] event and STOP task" ] # [ inline ] pub fn compare5_stop ( & self ) -> COMPARE5_STOPR { COMPARE5_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between COMPARE[0] event and CLEAR task" ] # [ inline ] pub fn compare0_clear ( & mut self ) -> _COMPARE0_CLEARW { _COMPARE0_CLEARW { w : self } } # [ doc = "Bit 1 - Shortcut between COMPARE[1] event and CLEAR task" ] # [ inline ] pub fn compare1_clear ( & mut self ) -> _COMPARE1_CLEARW { _COMPARE1_CLEARW { w : self } } # [ doc = "Bit 2 - Shortcut between COMPARE[2] event and CLEAR task" ] # [ inline ] pub fn compare2_clear ( & mut self ) -> _COMPARE2_CLEARW { _COMPARE2_CLEARW { w : self } } # [ doc = "Bit 3 - Shortcut between COMPARE[3] event and CLEAR task" ] # [ inline ] pub fn compare3_clear ( & mut self ) -> _COMPARE3_CLEARW { _COMPARE3_CLEARW { w : self } } # [ doc = "Bit 4 - Shortcut between COMPARE[4] event and CLEAR task" ] # [ inline ] pub fn compare4_clear ( & mut self ) -> _COMPARE4_CLEARW { _COMPARE4_CLEARW { w : self } } # [ doc = "Bit 5 - Shortcut between COMPARE[5] event and CLEAR task" ] # [ inline ] pub fn compare5_clear ( & mut self ) -> _COMPARE5_CLEARW { _COMPARE5_CLEARW { w : self } } # [ doc = "Bit 8 - Shortcut between COMPARE[0] event and STOP task" ] # [ inline ] pub fn compare0_stop ( & mut self ) -> _COMPARE0_STOPW { _COMPARE0_STOPW { w : self } } # [ doc = "Bit 9 - Shortcut between COMPARE[1] event and STOP task" ] # [ inline ] pub fn compare1_stop ( & mut self ) -> _COMPARE1_STOPW { _COMPARE1_STOPW { w : self } } # [ doc = "Bit 10 - Shortcut between COMPARE[2] event and STOP task" ] # [ inline ] pub fn compare2_stop ( & mut self ) -> _COMPARE2_STOPW { _COMPARE2_STOPW { w : self } } # [ doc = "Bit 11 - Shortcut between COMPARE[3] event and STOP task" ] # [ inline ] pub fn compare3_stop ( & mut self ) -> _COMPARE3_STOPW { _COMPARE3_STOPW { w : self } } # [ doc = "Bit 12 - Shortcut between COMPARE[4] event and STOP task" ] # [ inline ] pub fn compare4_stop ( & mut self ) -> _COMPARE4_STOPW { _COMPARE4_STOPW { w : self } } # [ doc = "Bit 13 - Shortcut between COMPARE[5] event and STOP task" ] # [ inline ] pub fn compare5_stop ( & mut self ) -> _COMPARE5_STOPW { _COMPARE5_STOPW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE4R :: DISABLED => false , COMPARE4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE4R { match value { false => COMPARE4R :: DISABLED , true => COMPARE4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE4R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE5R :: DISABLED => false , COMPARE5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE5R { match value { false => COMPARE5R :: DISABLED , true => COMPARE5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE5R :: ENABLED } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Enable" ] SET } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Enable" ] SET } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Enable" ] SET } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Enable" ] SET } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE4`" ] pub enum COMPARE4W { # [ doc = "Enable" ] SET } impl COMPARE4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE4W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE5`" ] pub enum COMPARE5W { # [ doc = "Enable" ] SET } impl COMPARE5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE5W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Enable interrupt for COMPARE[4] event" ] # [ inline ] pub fn compare4 ( & self ) -> COMPARE4R { COMPARE4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Write '1' to Enable interrupt for COMPARE[5] event" ] # [ inline ] pub fn compare5 ( & self ) -> COMPARE5R { COMPARE5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } # [ doc = "Bit 20 - Write '1' to Enable interrupt for COMPARE[4] event" ] # [ inline ] pub fn compare4 ( & mut self ) -> _COMPARE4W { _COMPARE4W { w : self } } # [ doc = "Bit 21 - Write '1' to Enable interrupt for COMPARE[5] event" ] # [ inline ] pub fn compare5 ( & mut self ) -> _COMPARE5W { _COMPARE5W { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE4R :: DISABLED => false , COMPARE4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE4R { match value { false => COMPARE4R :: DISABLED , true => COMPARE4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE4R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE5R :: DISABLED => false , COMPARE5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE5R { match value { false => COMPARE5R :: DISABLED , true => COMPARE5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE5R :: ENABLED } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Disable" ] CLEAR } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Disable" ] CLEAR } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Disable" ] CLEAR } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Disable" ] CLEAR } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE4`" ] pub enum COMPARE4W { # [ doc = "Disable" ] CLEAR } impl COMPARE4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE4W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE5`" ] pub enum COMPARE5W { # [ doc = "Disable" ] CLEAR } impl COMPARE5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE5W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 16 - Write '1' to Disable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Write '1' to Disable interrupt for COMPARE[4] event" ] # [ inline ] pub fn compare4 ( & self ) -> COMPARE4R { COMPARE4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Write '1' to Disable interrupt for COMPARE[5] event" ] # [ inline ] pub fn compare5 ( & self ) -> COMPARE5R { COMPARE5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 16 - Write '1' to Disable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Disable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } # [ doc = "Bit 20 - Write '1' to Disable interrupt for COMPARE[4] event" ] # [ inline ] pub fn compare4 ( & mut self ) -> _COMPARE4W { _COMPARE4W { w : self } } # [ doc = "Bit 21 - Write '1' to Disable interrupt for COMPARE[5] event" ] # [ inline ] pub fn compare5 ( & mut self ) -> _COMPARE5W { _COMPARE5W { w : self } } } } # [ doc = "Timer mode selection" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Timer mode selection" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "Select Timer mode" ] TIMER , # [ doc = "Deprecated enumerator -  Select Counter mode" ] COUNTER , # [ doc = "Select Low Power Counter mode" ] LOWPOWERCOUNTER , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl MODER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { MODER :: TIMER => 0 , MODER :: COUNTER => 0x01 , MODER :: LOWPOWERCOUNTER => 0x02 , MODER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> MODER { match value { 0 => MODER :: TIMER , 1 => MODER :: COUNTER , 2 => MODER :: LOWPOWERCOUNTER , i => MODER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `TIMER`" ] # [ inline ] pub fn is_timer ( & self ) -> bool { * self == MODER :: TIMER } # [ doc = "Checks if the value of the field is `COUNTER`" ] # [ inline ] pub fn is_counter ( & self ) -> bool { * self == MODER :: COUNTER } # [ doc = "Checks if the value of the field is `LOWPOWERCOUNTER`" ] # [ inline ] pub fn is_low_power_counter ( & self ) -> bool { * self == MODER :: LOWPOWERCOUNTER } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "Select Timer mode" ] TIMER , # [ doc = "Deprecated enumerator -  Select Counter mode" ] COUNTER , # [ doc = "Select Low Power Counter mode" ] LOWPOWERCOUNTER } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { MODEW :: TIMER => 0 , MODEW :: COUNTER => 1 , MODEW :: LOWPOWERCOUNTER => 2 } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Select Timer mode" ] # [ inline ] pub fn timer ( self ) -> & 'a mut W { self . variant ( MODEW :: TIMER ) } # [ doc = "Deprecated enumerator - Select Counter mode" ] # [ inline ] pub fn counter ( self ) -> & 'a mut W { self . variant ( MODEW :: COUNTER ) } # [ doc = "Select Low Power Counter mode" ] # [ inline ] pub fn low_power_counter ( self ) -> & 'a mut W { self . variant ( MODEW :: LOWPOWERCOUNTER ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Timer mode" ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Timer mode" ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } } } # [ doc = "Configure the number of bits used by the TIMER" ] pub struct BITMODE { register : VolatileCell < u32 > } # [ doc = "Configure the number of bits used by the TIMER" ] pub mod bitmode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: BITMODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `BITMODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum BITMODER { # [ doc = "16 bit timer bit width" ] _16BIT , # [ doc = "8 bit timer bit width" ] _08BIT , # [ doc = "24 bit timer bit width" ] _24BIT , # [ doc = "32 bit timer bit width" ] _32BIT } impl BITMODER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { BITMODER :: _16BIT => 0 , BITMODER :: _08BIT => 0x01 , BITMODER :: _24BIT => 0x02 , BITMODER :: _32BIT => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> BITMODER { match value { 0 => BITMODER :: _16BIT , 1 => BITMODER :: _08BIT , 2 => BITMODER :: _24BIT , 3 => BITMODER :: _32BIT , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `_16BIT`" ] # [ inline ] pub fn is_16bit ( & self ) -> bool { * self == BITMODER :: _16BIT } # [ doc = "Checks if the value of the field is `_08BIT`" ] # [ inline ] pub fn is_08bit ( & self ) -> bool { * self == BITMODER :: _08BIT } # [ doc = "Checks if the value of the field is `_24BIT`" ] # [ inline ] pub fn is_24bit ( & self ) -> bool { * self == BITMODER :: _24BIT } # [ doc = "Checks if the value of the field is `_32BIT`" ] # [ inline ] pub fn is_32bit ( & self ) -> bool { * self == BITMODER :: _32BIT } } # [ doc = "Values that can be written to the field `BITMODE`" ] pub enum BITMODEW { # [ doc = "16 bit timer bit width" ] _16BIT , # [ doc = "8 bit timer bit width" ] _08BIT , # [ doc = "24 bit timer bit width" ] _24BIT , # [ doc = "32 bit timer bit width" ] _32BIT } impl BITMODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { BITMODEW :: _16BIT => 0 , BITMODEW :: _08BIT => 1 , BITMODEW :: _24BIT => 2 , BITMODEW :: _32BIT => 3 } } } # [ doc = r" Proxy" ] pub struct _BITMODEW < 'a > { w : & 'a mut W , } impl < 'a > _BITMODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : BITMODEW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "16 bit timer bit width" ] # [ inline ] pub fn _16bit ( self ) -> & 'a mut W { self . variant ( BITMODEW :: _16BIT ) } # [ doc = "8 bit timer bit width" ] # [ inline ] pub fn _08bit ( self ) -> & 'a mut W { self . variant ( BITMODEW :: _08BIT ) } # [ doc = "24 bit timer bit width" ] # [ inline ] pub fn _24bit ( self ) -> & 'a mut W { self . variant ( BITMODEW :: _24BIT ) } # [ doc = "32 bit timer bit width" ] # [ inline ] pub fn _32bit ( self ) -> & 'a mut W { self . variant ( BITMODEW :: _32BIT ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Timer bit width" ] # [ inline ] pub fn bitmode ( & self ) -> BITMODER { BITMODER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Timer bit width" ] # [ inline ] pub fn bitmode ( & mut self ) -> _BITMODEW { _BITMODEW { w : self } } } } # [ doc = "Timer prescaler register" ] pub struct PRESCALER { register : VolatileCell < u32 > } # [ doc = "Timer prescaler register" ] pub mod prescaler { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PRESCALER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct PRESCALERR { bits : u8 , } impl PRESCALERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _PRESCALERW < 'a > { w : & 'a mut W , } impl < 'a > _PRESCALERW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Prescaler value" ] # [ inline ] pub fn prescaler ( & self ) -> PRESCALERR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; PRESCALERR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x04 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Prescaler value" ] # [ inline ] pub fn prescaler ( & mut self ) -> _PRESCALERW { _PRESCALERW { w : self } } } } # [ doc = "Description collection[0]: Capture/Compare register 0" ] pub struct CC { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Capture/Compare register 0" ] pub mod cc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CCR { bits : u32 , } impl CCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CCW < 'a > { w : & 'a mut W , } impl < 'a > _CCW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Capture/Compare value" ] # [ inline ] pub fn cc ( & self ) -> CCR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CCR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Capture/Compare value" ] # [ inline ] pub fn cc ( & mut self ) -> _CCW { _CCW { w : self } } } } } # [ doc = "Timer/Counter 1" ] pub struct TIMER1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TIMER1 { } impl TIMER1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const timer0 :: RegisterBlock { 0x4000_9000 as * const _ } } impl Deref for TIMER1 { type Target = timer0 :: RegisterBlock ; fn deref ( & self ) -> & timer0 :: RegisterBlock { unsafe { & * TIMER1 :: ptr ( ) } } } # [ doc = "Timer/Counter 2" ] pub struct TIMER2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TIMER2 { } impl TIMER2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const timer0 :: RegisterBlock { 0x4000_a000 as * const _ } } impl Deref for TIMER2 { type Target = timer0 :: RegisterBlock ; fn deref ( & self ) -> & timer0 :: RegisterBlock { unsafe { & * TIMER2 :: ptr ( ) } } } # [ doc = "Real time counter 0" ] pub struct RTC0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for RTC0 { } impl RTC0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const rtc0 :: RegisterBlock { 0x4000_b000 as * const _ } } impl Deref for RTC0 { type Target = rtc0 :: RegisterBlock ; fn deref ( & self ) -> & rtc0 :: RegisterBlock { unsafe { & * RTC0 :: ptr ( ) } } } # [ doc = "Real time counter 0" ] pub mod rtc0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start RTC COUNTER" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stop RTC COUNTER" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Clear RTC COUNTER" ] pub tasks_clear : TASKS_CLEAR , # [ doc = "0x0c - Set COUNTER to 0xFFFFF0" ] pub tasks_trigovrflw : TASKS_TRIGOVRFLW , _reserved0 : [ u8 ; 240usize ] , # [ doc = "0x100 - Event on COUNTER increment" ] pub events_tick : EVENTS_TICK , # [ doc = "0x104 - Event on COUNTER overflow" ] pub events_ovrflw : EVENTS_OVRFLW , _reserved1 : [ u8 ; 56usize ] , # [ doc = "0x140 - Description collection[0]: Compare event on CC[0] match" ] pub events_compare : [ EVENTS_COMPARE ; 4 ] , _reserved2 : [ u8 ; 436usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 52usize ] , # [ doc = "0x340 - Enable or disable event routing" ] pub evten : EVTEN , # [ doc = "0x344 - Enable event routing" ] pub evtenset : EVTENSET , # [ doc = "0x348 - Disable event routing" ] pub evtenclr : EVTENCLR , _reserved4 : [ u8 ; 440usize ] , # [ doc = "0x504 - Current COUNTER value" ] pub counter : COUNTER , # [ doc = "0x508 - 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped" ] pub prescaler : PRESCALER , _reserved5 : [ u8 ; 52usize ] , # [ doc = "0x540 - Description collection[0]: Compare register 0" ] pub cc : [ CC ; 4 ] , } # [ doc = "Start RTC COUNTER" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start RTC COUNTER" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop RTC COUNTER" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop RTC COUNTER" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Clear RTC COUNTER" ] pub struct TASKS_CLEAR { register : VolatileCell < u32 > } # [ doc = "Clear RTC COUNTER" ] pub mod tasks_clear { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CLEAR { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Set COUNTER to 0xFFFFF0" ] pub struct TASKS_TRIGOVRFLW { register : VolatileCell < u32 > } # [ doc = "Set COUNTER to 0xFFFFF0" ] pub mod tasks_trigovrflw { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_TRIGOVRFLW { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Event on COUNTER increment" ] pub struct EVENTS_TICK { register : VolatileCell < u32 > } # [ doc = "Event on COUNTER increment" ] pub mod events_tick { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TICK { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Event on COUNTER overflow" ] pub struct EVENTS_OVRFLW { register : VolatileCell < u32 > } # [ doc = "Event on COUNTER overflow" ] pub mod events_ovrflw { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_OVRFLW { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Compare event on CC[0] match" ] pub struct EVENTS_COMPARE { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Compare event on CC[0] match" ] pub mod events_compare { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_COMPARE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TICK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TICKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TICKR :: DISABLED => false , TICKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TICKR { match value { false => TICKR :: DISABLED , true => TICKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TICKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TICKR :: ENABLED } } # [ doc = "Possible values of the field `OVRFLW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVRFLWR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl OVRFLWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVRFLWR :: DISABLED => false , OVRFLWR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVRFLWR { match value { false => OVRFLWR :: DISABLED , true => OVRFLWR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == OVRFLWR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == OVRFLWR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Values that can be written to the field `TICK`" ] pub enum TICKW { # [ doc = "Enable" ] SET } impl TICKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TICKW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TICKW < 'a > { w : & 'a mut W , } impl < 'a > _TICKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TICKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TICKW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVRFLW`" ] pub enum OVRFLWW { # [ doc = "Enable" ] SET } impl OVRFLWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVRFLWW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _OVRFLWW < 'a > { w : & 'a mut W , } impl < 'a > _OVRFLWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVRFLWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Enable" ] SET } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Enable" ] SET } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Enable" ] SET } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Enable" ] SET } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TICK event" ] # [ inline ] pub fn tick ( & self ) -> TICKR { TICKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & self ) -> OVRFLWR { OVRFLWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TICK event" ] # [ inline ] pub fn tick ( & mut self ) -> _TICKW { _TICKW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & mut self ) -> _OVRFLWW { _OVRFLWW { w : self } } # [ doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TICK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TICKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TICKR :: DISABLED => false , TICKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TICKR { match value { false => TICKR :: DISABLED , true => TICKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TICKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TICKR :: ENABLED } } # [ doc = "Possible values of the field `OVRFLW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVRFLWR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl OVRFLWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVRFLWR :: DISABLED => false , OVRFLWR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVRFLWR { match value { false => OVRFLWR :: DISABLED , true => OVRFLWR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == OVRFLWR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == OVRFLWR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Values that can be written to the field `TICK`" ] pub enum TICKW { # [ doc = "Disable" ] CLEAR } impl TICKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TICKW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TICKW < 'a > { w : & 'a mut W , } impl < 'a > _TICKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TICKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TICKW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVRFLW`" ] pub enum OVRFLWW { # [ doc = "Disable" ] CLEAR } impl OVRFLWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVRFLWW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _OVRFLWW < 'a > { w : & 'a mut W , } impl < 'a > _OVRFLWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVRFLWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Disable" ] CLEAR } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Disable" ] CLEAR } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Disable" ] CLEAR } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Disable" ] CLEAR } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TICK event" ] # [ inline ] pub fn tick ( & self ) -> TICKR { TICKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & self ) -> OVRFLWR { OVRFLWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Disable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TICK event" ] # [ inline ] pub fn tick ( & mut self ) -> _TICKW { _TICKW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & mut self ) -> _OVRFLWW { _OVRFLWW { w : self } } # [ doc = "Bit 16 - Write '1' to Disable interrupt for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Disable interrupt for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Disable interrupt for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Disable interrupt for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } } } # [ doc = "Enable or disable event routing" ] pub struct EVTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable event routing" ] pub mod evten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TICK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TICKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TICKR :: DISABLED => false , TICKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TICKR { match value { false => TICKR :: DISABLED , true => TICKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TICKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TICKR :: ENABLED } } # [ doc = "Possible values of the field `OVRFLW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVRFLWR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl OVRFLWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVRFLWR :: DISABLED => false , OVRFLWR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVRFLWR { match value { false => OVRFLWR :: DISABLED , true => OVRFLWR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == OVRFLWR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == OVRFLWR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Values that can be written to the field `TICK`" ] pub enum TICKW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TICKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TICKW :: DISABLED => false , TICKW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TICKW < 'a > { w : & 'a mut W , } impl < 'a > _TICKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TICKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TICKW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TICKW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVRFLW`" ] pub enum OVRFLWW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl OVRFLWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVRFLWW :: DISABLED => false , OVRFLWW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _OVRFLWW < 'a > { w : & 'a mut W , } impl < 'a > _OVRFLWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVRFLWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: DISABLED => false , COMPARE0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: DISABLED => false , COMPARE1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: DISABLED => false , COMPARE2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: DISABLED => false , COMPARE3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable event routing for TICK event" ] # [ inline ] pub fn tick ( & self ) -> TICKR { TICKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & self ) -> OVRFLWR { OVRFLWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable or disable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable or disable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable or disable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable event routing for TICK event" ] # [ inline ] pub fn tick ( & mut self ) -> _TICKW { _TICKW { w : self } } # [ doc = "Bit 1 - Enable or disable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & mut self ) -> _OVRFLWW { _OVRFLWW { w : self } } # [ doc = "Bit 16 - Enable or disable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Enable or disable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Enable or disable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Enable or disable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } } } # [ doc = "Enable event routing" ] pub struct EVTENSET { register : VolatileCell < u32 > } # [ doc = "Enable event routing" ] pub mod evtenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TICK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TICKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TICKR :: DISABLED => false , TICKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TICKR { match value { false => TICKR :: DISABLED , true => TICKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TICKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TICKR :: ENABLED } } # [ doc = "Possible values of the field `OVRFLW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVRFLWR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl OVRFLWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVRFLWR :: DISABLED => false , OVRFLWR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVRFLWR { match value { false => OVRFLWR :: DISABLED , true => OVRFLWR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == OVRFLWR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == OVRFLWR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Values that can be written to the field `TICK`" ] pub enum TICKW { # [ doc = "Enable" ] SET } impl TICKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TICKW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TICKW < 'a > { w : & 'a mut W , } impl < 'a > _TICKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TICKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TICKW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVRFLW`" ] pub enum OVRFLWW { # [ doc = "Enable" ] SET } impl OVRFLWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVRFLWW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _OVRFLWW < 'a > { w : & 'a mut W , } impl < 'a > _OVRFLWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVRFLWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Enable" ] SET } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Enable" ] SET } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Enable" ] SET } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Enable" ] SET } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable event routing for TICK event" ] # [ inline ] pub fn tick ( & self ) -> TICKR { TICKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & self ) -> OVRFLWR { OVRFLWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Enable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Enable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Enable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Enable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable event routing for TICK event" ] # [ inline ] pub fn tick ( & mut self ) -> _TICKW { _TICKW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & mut self ) -> _OVRFLWW { _OVRFLWW { w : self } } # [ doc = "Bit 16 - Write '1' to Enable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Enable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Enable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Enable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } } } # [ doc = "Disable event routing" ] pub struct EVTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable event routing" ] pub mod evtenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TICK`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TICKR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TICKR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TICKR :: DISABLED => false , TICKR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TICKR { match value { false => TICKR :: DISABLED , true => TICKR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TICKR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TICKR :: ENABLED } } # [ doc = "Possible values of the field `OVRFLW`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OVRFLWR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl OVRFLWR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OVRFLWR :: DISABLED => false , OVRFLWR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OVRFLWR { match value { false => OVRFLWR :: DISABLED , true => OVRFLWR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == OVRFLWR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == OVRFLWR :: ENABLED } } # [ doc = "Possible values of the field `COMPARE0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE0R :: DISABLED => false , COMPARE0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE0R { match value { false => COMPARE0R :: DISABLED , true => COMPARE0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE0R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE1R :: DISABLED => false , COMPARE1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE1R { match value { false => COMPARE1R :: DISABLED , true => COMPARE1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE1R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE2R :: DISABLED => false , COMPARE2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE2R { match value { false => COMPARE2R :: DISABLED , true => COMPARE2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE2R :: ENABLED } } # [ doc = "Possible values of the field `COMPARE3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum COMPARE3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl COMPARE3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { COMPARE3R :: DISABLED => false , COMPARE3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> COMPARE3R { match value { false => COMPARE3R :: DISABLED , true => COMPARE3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == COMPARE3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == COMPARE3R :: ENABLED } } # [ doc = "Values that can be written to the field `TICK`" ] pub enum TICKW { # [ doc = "Disable" ] CLEAR } impl TICKW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TICKW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TICKW < 'a > { w : & 'a mut W , } impl < 'a > _TICKW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TICKW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TICKW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `OVRFLW`" ] pub enum OVRFLWW { # [ doc = "Disable" ] CLEAR } impl OVRFLWW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OVRFLWW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _OVRFLWW < 'a > { w : & 'a mut W , } impl < 'a > _OVRFLWW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OVRFLWW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( OVRFLWW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE0`" ] pub enum COMPARE0W { # [ doc = "Disable" ] CLEAR } impl COMPARE0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE0W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE1`" ] pub enum COMPARE1W { # [ doc = "Disable" ] CLEAR } impl COMPARE1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE1W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE2`" ] pub enum COMPARE2W { # [ doc = "Disable" ] CLEAR } impl COMPARE2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE2W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `COMPARE3`" ] pub enum COMPARE3W { # [ doc = "Disable" ] CLEAR } impl COMPARE3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { COMPARE3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _COMPARE3W < 'a > { w : & 'a mut W , } impl < 'a > _COMPARE3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : COMPARE3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( COMPARE3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable event routing for TICK event" ] # [ inline ] pub fn tick ( & self ) -> TICKR { TICKR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & self ) -> OVRFLWR { OVRFLWR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Write '1' to Disable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & self ) -> COMPARE0R { COMPARE0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Write '1' to Disable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & self ) -> COMPARE1R { COMPARE1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Write '1' to Disable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & self ) -> COMPARE2R { COMPARE2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Write '1' to Disable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & self ) -> COMPARE3R { COMPARE3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable event routing for TICK event" ] # [ inline ] pub fn tick ( & mut self ) -> _TICKW { _TICKW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable event routing for OVRFLW event" ] # [ inline ] pub fn ovrflw ( & mut self ) -> _OVRFLWW { _OVRFLWW { w : self } } # [ doc = "Bit 16 - Write '1' to Disable event routing for COMPARE[0] event" ] # [ inline ] pub fn compare0 ( & mut self ) -> _COMPARE0W { _COMPARE0W { w : self } } # [ doc = "Bit 17 - Write '1' to Disable event routing for COMPARE[1] event" ] # [ inline ] pub fn compare1 ( & mut self ) -> _COMPARE1W { _COMPARE1W { w : self } } # [ doc = "Bit 18 - Write '1' to Disable event routing for COMPARE[2] event" ] # [ inline ] pub fn compare2 ( & mut self ) -> _COMPARE2W { _COMPARE2W { w : self } } # [ doc = "Bit 19 - Write '1' to Disable event routing for COMPARE[3] event" ] # [ inline ] pub fn compare3 ( & mut self ) -> _COMPARE3W { _COMPARE3W { w : self } } } } # [ doc = "Current COUNTER value" ] pub struct COUNTER { register : VolatileCell < u32 > } # [ doc = "Current COUNTER value" ] pub mod counter { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: COUNTER { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct COUNTERR { bits : u32 , } impl COUNTERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:23 - Counter value" ] # [ inline ] pub fn counter ( & self ) -> COUNTERR { let bits = { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; COUNTERR { bits } } } } # [ doc = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped" ] pub struct PRESCALER { register : VolatileCell < u32 > } # [ doc = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped" ] pub mod prescaler { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PRESCALER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct PRESCALERR { bits : u16 , } impl PRESCALERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _PRESCALERW < 'a > { w : & 'a mut W , } impl < 'a > _PRESCALERW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Prescaler value" ] # [ inline ] pub fn prescaler ( & self ) -> PRESCALERR { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; PRESCALERR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Prescaler value" ] # [ inline ] pub fn prescaler ( & mut self ) -> _PRESCALERW { _PRESCALERW { w : self } } } } # [ doc = "Description collection[0]: Compare register 0" ] pub struct CC { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Compare register 0" ] pub mod cc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CC { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct COMPARER { bits : u32 , } impl COMPARER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _COMPAREW < 'a > { w : & 'a mut W , } impl < 'a > _COMPAREW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:23 - Compare value" ] # [ inline ] pub fn compare ( & self ) -> COMPARER { let bits = { const MASK : u32 = 0x00ff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; COMPARER { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:23 - Compare value" ] # [ inline ] pub fn compare ( & mut self ) -> _COMPAREW { _COMPAREW { w : self } } } } } # [ doc = "Temperature Sensor" ] pub struct TEMP { _marker : PhantomData < * const ( ) > } unsafe impl Send for TEMP { } impl TEMP { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const temp :: RegisterBlock { 0x4000_c000 as * const _ } } impl Deref for TEMP { type Target = temp :: RegisterBlock ; fn deref ( & self ) -> & temp :: RegisterBlock { unsafe { & * TEMP :: ptr ( ) } } } # [ doc = "Temperature Sensor" ] pub mod temp { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start temperature measurement" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stop temperature measurement" ] pub tasks_stop : TASKS_STOP , _reserved0 : [ u8 ; 248usize ] , # [ doc = "0x100 - Temperature measurement complete, data ready" ] pub events_datardy : EVENTS_DATARDY , _reserved1 : [ u8 ; 512usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 508usize ] , # [ doc = "0x508 - Temperature in degC (0.25deg steps)" ] pub temp : TEMP , _reserved3 : [ u8 ; 20usize ] , # [ doc = "0x520 - Slope of 1st piece wise linear function" ] pub a0 : A0 , # [ doc = "0x524 - Slope of 2nd piece wise linear function" ] pub a1 : A1 , # [ doc = "0x528 - Slope of 3rd piece wise linear function" ] pub a2 : A2 , # [ doc = "0x52c - Slope of 4th piece wise linear function" ] pub a3 : A3 , # [ doc = "0x530 - Slope of 5th piece wise linear function" ] pub a4 : A4 , # [ doc = "0x534 - Slope of 6th piece wise linear function" ] pub a5 : A5 , _reserved4 : [ u8 ; 8usize ] , # [ doc = "0x540 - y-intercept of 1st piece wise linear function" ] pub b0 : B0 , # [ doc = "0x544 - y-intercept of 2nd piece wise linear function" ] pub b1 : B1 , # [ doc = "0x548 - y-intercept of 3rd piece wise linear function" ] pub b2 : B2 , # [ doc = "0x54c - y-intercept of 4th piece wise linear function" ] pub b3 : B3 , # [ doc = "0x550 - y-intercept of 5th piece wise linear function" ] pub b4 : B4 , # [ doc = "0x554 - y-intercept of 6th piece wise linear function" ] pub b5 : B5 , _reserved5 : [ u8 ; 8usize ] , # [ doc = "0x560 - End point of 1st piece wise linear function" ] pub t0 : T0 , # [ doc = "0x564 - End point of 2nd piece wise linear function" ] pub t1 : T1 , # [ doc = "0x568 - End point of 3rd piece wise linear function" ] pub t2 : T2 , # [ doc = "0x56c - End point of 4th piece wise linear function" ] pub t3 : T3 , # [ doc = "0x570 - End point of 5th piece wise linear function" ] pub t4 : T4 , } # [ doc = "Start temperature measurement" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start temperature measurement" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop temperature measurement" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop temperature measurement" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Temperature measurement complete, data ready" ] pub struct EVENTS_DATARDY { register : VolatileCell < u32 > } # [ doc = "Temperature measurement complete, data ready" ] pub mod events_datardy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DATARDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DATARDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DATARDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DATARDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DATARDYR :: DISABLED => false , DATARDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DATARDYR { match value { false => DATARDYR :: DISABLED , true => DATARDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DATARDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DATARDYR :: ENABLED } } # [ doc = "Values that can be written to the field `DATARDY`" ] pub enum DATARDYW { # [ doc = "Enable" ] SET } impl DATARDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DATARDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DATARDYW < 'a > { w : & 'a mut W , } impl < 'a > _DATARDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DATARDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DATARDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for DATARDY event" ] # [ inline ] pub fn datardy ( & self ) -> DATARDYR { DATARDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for DATARDY event" ] # [ inline ] pub fn datardy ( & mut self ) -> _DATARDYW { _DATARDYW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DATARDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DATARDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DATARDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DATARDYR :: DISABLED => false , DATARDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DATARDYR { match value { false => DATARDYR :: DISABLED , true => DATARDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DATARDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DATARDYR :: ENABLED } } # [ doc = "Values that can be written to the field `DATARDY`" ] pub enum DATARDYW { # [ doc = "Disable" ] CLEAR } impl DATARDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DATARDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DATARDYW < 'a > { w : & 'a mut W , } impl < 'a > _DATARDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DATARDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DATARDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for DATARDY event" ] # [ inline ] pub fn datardy ( & self ) -> DATARDYR { DATARDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for DATARDY event" ] # [ inline ] pub fn datardy ( & mut self ) -> _DATARDYW { _DATARDYW { w : self } } } } # [ doc = "Temperature in degC (0.25deg steps)" ] pub struct TEMP { register : VolatileCell < u32 > } # [ doc = "Temperature in degC (0.25deg steps)" ] pub mod temp { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: TEMP { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct TEMPR { bits : u32 , } impl TEMPR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Temperature in degC (0.25deg steps)" ] # [ inline ] pub fn temp ( & self ) -> TEMPR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; TEMPR { bits } } } } # [ doc = "Slope of 1st piece wise linear function" ] pub struct A0 { register : VolatileCell < u32 > } # [ doc = "Slope of 1st piece wise linear function" ] pub mod a0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A0R { bits : u16 , } impl A0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A0W < 'a > { w : & 'a mut W , } impl < 'a > _A0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 1st piece wise linear function" ] # [ inline ] pub fn a0 ( & self ) -> A0R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A0R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0320 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 1st piece wise linear function" ] # [ inline ] pub fn a0 ( & mut self ) -> _A0W { _A0W { w : self } } } } # [ doc = "Slope of 2nd piece wise linear function" ] pub struct A1 { register : VolatileCell < u32 > } # [ doc = "Slope of 2nd piece wise linear function" ] pub mod a1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A1R { bits : u16 , } impl A1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A1W < 'a > { w : & 'a mut W , } impl < 'a > _A1W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 2nd piece wise linear function" ] # [ inline ] pub fn a1 ( & self ) -> A1R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A1R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0343 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 2nd piece wise linear function" ] # [ inline ] pub fn a1 ( & mut self ) -> _A1W { _A1W { w : self } } } } # [ doc = "Slope of 3rd piece wise linear function" ] pub struct A2 { register : VolatileCell < u32 > } # [ doc = "Slope of 3rd piece wise linear function" ] pub mod a2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A2R { bits : u16 , } impl A2R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A2W < 'a > { w : & 'a mut W , } impl < 'a > _A2W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 3rd piece wise linear function" ] # [ inline ] pub fn a2 ( & self ) -> A2R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A2R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x035d } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 3rd piece wise linear function" ] # [ inline ] pub fn a2 ( & mut self ) -> _A2W { _A2W { w : self } } } } # [ doc = "Slope of 4th piece wise linear function" ] pub struct A3 { register : VolatileCell < u32 > } # [ doc = "Slope of 4th piece wise linear function" ] pub mod a3 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A3 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A3R { bits : u16 , } impl A3R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A3W < 'a > { w : & 'a mut W , } impl < 'a > _A3W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 4th piece wise linear function" ] # [ inline ] pub fn a3 ( & self ) -> A3R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A3R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0400 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 4th piece wise linear function" ] # [ inline ] pub fn a3 ( & mut self ) -> _A3W { _A3W { w : self } } } } # [ doc = "Slope of 5th piece wise linear function" ] pub struct A4 { register : VolatileCell < u32 > } # [ doc = "Slope of 5th piece wise linear function" ] pub mod a4 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A4 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A4R { bits : u16 , } impl A4R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A4W < 'a > { w : & 'a mut W , } impl < 'a > _A4W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 5th piece wise linear function" ] # [ inline ] pub fn a4 ( & self ) -> A4R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A4R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x047f } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 5th piece wise linear function" ] # [ inline ] pub fn a4 ( & mut self ) -> _A4W { _A4W { w : self } } } } # [ doc = "Slope of 6th piece wise linear function" ] pub struct A5 { register : VolatileCell < u32 > } # [ doc = "Slope of 6th piece wise linear function" ] pub mod a5 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: A5 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct A5R { bits : u16 , } impl A5R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _A5W < 'a > { w : & 'a mut W , } impl < 'a > _A5W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:11 - Slope of 6th piece wise linear function" ] # [ inline ] pub fn a5 ( & self ) -> A5R { let bits = { const MASK : u16 = 0x0fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; A5R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x037b } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:11 - Slope of 6th piece wise linear function" ] # [ inline ] pub fn a5 ( & mut self ) -> _A5W { _A5W { w : self } } } } # [ doc = "y-intercept of 1st piece wise linear function" ] pub struct B0 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 1st piece wise linear function" ] pub mod b0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B0R { bits : u16 , } impl B0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B0W < 'a > { w : & 'a mut W , } impl < 'a > _B0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 1st piece wise linear function" ] # [ inline ] pub fn b0 ( & self ) -> B0R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B0R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x3fcc } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 1st piece wise linear function" ] # [ inline ] pub fn b0 ( & mut self ) -> _B0W { _B0W { w : self } } } } # [ doc = "y-intercept of 2nd piece wise linear function" ] pub struct B1 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 2nd piece wise linear function" ] pub mod b1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B1R { bits : u16 , } impl B1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B1W < 'a > { w : & 'a mut W , } impl < 'a > _B1W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function" ] # [ inline ] pub fn b1 ( & self ) -> B1R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B1R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x3f98 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function" ] # [ inline ] pub fn b1 ( & mut self ) -> _B1W { _B1W { w : self } } } } # [ doc = "y-intercept of 3rd piece wise linear function" ] pub struct B2 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 3rd piece wise linear function" ] pub mod b2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B2R { bits : u16 , } impl B2R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B2W < 'a > { w : & 'a mut W , } impl < 'a > _B2W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function" ] # [ inline ] pub fn b2 ( & self ) -> B2R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B2R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x3f98 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function" ] # [ inline ] pub fn b2 ( & mut self ) -> _B2W { _B2W { w : self } } } } # [ doc = "y-intercept of 4th piece wise linear function" ] pub struct B3 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 4th piece wise linear function" ] pub mod b3 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B3 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B3R { bits : u16 , } impl B3R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B3W < 'a > { w : & 'a mut W , } impl < 'a > _B3W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 4th piece wise linear function" ] # [ inline ] pub fn b3 ( & self ) -> B3R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B3R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x12 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 4th piece wise linear function" ] # [ inline ] pub fn b3 ( & mut self ) -> _B3W { _B3W { w : self } } } } # [ doc = "y-intercept of 5th piece wise linear function" ] pub struct B4 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 5th piece wise linear function" ] pub mod b4 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B4 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B4R { bits : u16 , } impl B4R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B4W < 'a > { w : & 'a mut W , } impl < 'a > _B4W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 5th piece wise linear function" ] # [ inline ] pub fn b4 ( & self ) -> B4R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B4R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x6a } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 5th piece wise linear function" ] # [ inline ] pub fn b4 ( & mut self ) -> _B4W { _B4W { w : self } } } } # [ doc = "y-intercept of 6th piece wise linear function" ] pub struct B5 { register : VolatileCell < u32 > } # [ doc = "y-intercept of 6th piece wise linear function" ] pub mod b5 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: B5 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct B5R { bits : u16 , } impl B5R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _B5W < 'a > { w : & 'a mut W , } impl < 'a > _B5W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:13 - y-intercept of 6th piece wise linear function" ] # [ inline ] pub fn b5 ( & self ) -> B5R { let bits = { const MASK : u16 = 0x3fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; B5R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x3dd0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:13 - y-intercept of 6th piece wise linear function" ] # [ inline ] pub fn b5 ( & mut self ) -> _B5W { _B5W { w : self } } } } # [ doc = "End point of 1st piece wise linear function" ] pub struct T0 { register : VolatileCell < u32 > } # [ doc = "End point of 1st piece wise linear function" ] pub mod t0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: T0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct T0R { bits : u8 , } impl T0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _T0W < 'a > { w : & 'a mut W , } impl < 'a > _T0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - End point of 1st piece wise linear function" ] # [ inline ] pub fn t0 ( & self ) -> T0R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; T0R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xe2 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - End point of 1st piece wise linear function" ] # [ inline ] pub fn t0 ( & mut self ) -> _T0W { _T0W { w : self } } } } # [ doc = "End point of 2nd piece wise linear function" ] pub struct T1 { register : VolatileCell < u32 > } # [ doc = "End point of 2nd piece wise linear function" ] pub mod t1 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: T1 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct T1R { bits : u8 , } impl T1R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _T1W < 'a > { w : & 'a mut W , } impl < 'a > _T1W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - End point of 2nd piece wise linear function" ] # [ inline ] pub fn t1 ( & self ) -> T1R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; T1R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - End point of 2nd piece wise linear function" ] # [ inline ] pub fn t1 ( & mut self ) -> _T1W { _T1W { w : self } } } } # [ doc = "End point of 3rd piece wise linear function" ] pub struct T2 { register : VolatileCell < u32 > } # [ doc = "End point of 3rd piece wise linear function" ] pub mod t2 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: T2 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct T2R { bits : u8 , } impl T2R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _T2W < 'a > { w : & 'a mut W , } impl < 'a > _T2W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - End point of 3rd piece wise linear function" ] # [ inline ] pub fn t2 ( & self ) -> T2R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; T2R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x14 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - End point of 3rd piece wise linear function" ] # [ inline ] pub fn t2 ( & mut self ) -> _T2W { _T2W { w : self } } } } # [ doc = "End point of 4th piece wise linear function" ] pub struct T3 { register : VolatileCell < u32 > } # [ doc = "End point of 4th piece wise linear function" ] pub mod t3 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: T3 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct T3R { bits : u8 , } impl T3R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _T3W < 'a > { w : & 'a mut W , } impl < 'a > _T3W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - End point of 4th piece wise linear function" ] # [ inline ] pub fn t3 ( & self ) -> T3R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; T3R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x19 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - End point of 4th piece wise linear function" ] # [ inline ] pub fn t3 ( & mut self ) -> _T3W { _T3W { w : self } } } } # [ doc = "End point of 5th piece wise linear function" ] pub struct T4 { register : VolatileCell < u32 > } # [ doc = "End point of 5th piece wise linear function" ] pub mod t4 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: T4 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct T4R { bits : u8 , } impl T4R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _T4W < 'a > { w : & 'a mut W , } impl < 'a > _T4W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - End point of 5th piece wise linear function" ] # [ inline ] pub fn t4 ( & self ) -> T4R { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; T4R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x50 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - End point of 5th piece wise linear function" ] # [ inline ] pub fn t4 ( & mut self ) -> _T4W { _T4W { w : self } } } } } # [ doc = "Random Number Generator" ] pub struct RNG { _marker : PhantomData < * const ( ) > } unsafe impl Send for RNG { } impl RNG { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const rng :: RegisterBlock { 0x4000_d000 as * const _ } } impl Deref for RNG { type Target = rng :: RegisterBlock ; fn deref ( & self ) -> & rng :: RegisterBlock { unsafe { & * RNG :: ptr ( ) } } } # [ doc = "Random Number Generator" ] pub mod rng { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Task starting the random number generator" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Task stopping the random number generator" ] pub tasks_stop : TASKS_STOP , _reserved0 : [ u8 ; 248usize ] , # [ doc = "0x100 - Event being generated for every new random number written to the VALUE register" ] pub events_valrdy : EVENTS_VALRDY , _reserved1 : [ u8 ; 252usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved2 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 504usize ] , # [ doc = "0x504 - Configuration register" ] pub config : CONFIG , # [ doc = "0x508 - Output random number" ] pub value : VALUE , } # [ doc = "Task starting the random number generator" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Task starting the random number generator" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Task stopping the random number generator" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Task stopping the random number generator" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Event being generated for every new random number written to the VALUE register" ] pub struct EVENTS_VALRDY { register : VolatileCell < u32 > } # [ doc = "Event being generated for every new random number written to the VALUE register" ] pub mod events_valrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_VALRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `VALRDY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VALRDY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl VALRDY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { VALRDY_STOPR :: DISABLED => false , VALRDY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> VALRDY_STOPR { match value { false => VALRDY_STOPR :: DISABLED , true => VALRDY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == VALRDY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == VALRDY_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `VALRDY_STOP`" ] pub enum VALRDY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl VALRDY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { VALRDY_STOPW :: DISABLED => false , VALRDY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _VALRDY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _VALRDY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : VALRDY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( VALRDY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( VALRDY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between VALRDY event and STOP task" ] # [ inline ] pub fn valrdy_stop ( & self ) -> VALRDY_STOPR { VALRDY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between VALRDY event and STOP task" ] # [ inline ] pub fn valrdy_stop ( & mut self ) -> _VALRDY_STOPW { _VALRDY_STOPW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `VALRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VALRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl VALRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { VALRDYR :: DISABLED => false , VALRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> VALRDYR { match value { false => VALRDYR :: DISABLED , true => VALRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == VALRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == VALRDYR :: ENABLED } } # [ doc = "Values that can be written to the field `VALRDY`" ] pub enum VALRDYW { # [ doc = "Enable" ] SET } impl VALRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { VALRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _VALRDYW < 'a > { w : & 'a mut W , } impl < 'a > _VALRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : VALRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( VALRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for VALRDY event" ] # [ inline ] pub fn valrdy ( & self ) -> VALRDYR { VALRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for VALRDY event" ] # [ inline ] pub fn valrdy ( & mut self ) -> _VALRDYW { _VALRDYW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `VALRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum VALRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl VALRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { VALRDYR :: DISABLED => false , VALRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> VALRDYR { match value { false => VALRDYR :: DISABLED , true => VALRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == VALRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == VALRDYR :: ENABLED } } # [ doc = "Values that can be written to the field `VALRDY`" ] pub enum VALRDYW { # [ doc = "Disable" ] CLEAR } impl VALRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { VALRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _VALRDYW < 'a > { w : & 'a mut W , } impl < 'a > _VALRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : VALRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( VALRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for VALRDY event" ] # [ inline ] pub fn valrdy ( & self ) -> VALRDYR { VALRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for VALRDY event" ] # [ inline ] pub fn valrdy ( & mut self ) -> _VALRDYW { _VALRDYW { w : self } } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DERCEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DERCENR { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl DERCENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DERCENR :: DISABLED => false , DERCENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DERCENR { match value { false => DERCENR :: DISABLED , true => DERCENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DERCENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DERCENR :: ENABLED } } # [ doc = "Values that can be written to the field `DERCEN`" ] pub enum DERCENW { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enabled" ] ENABLED } impl DERCENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DERCENW :: DISABLED => false , DERCENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DERCENW < 'a > { w : & 'a mut W , } impl < 'a > _DERCENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DERCENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DERCENW :: DISABLED ) } # [ doc = "Enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DERCENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Bias correction" ] # [ inline ] pub fn dercen ( & self ) -> DERCENR { DERCENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Bias correction" ] # [ inline ] pub fn dercen ( & mut self ) -> _DERCENW { _DERCENW { w : self } } } } # [ doc = "Output random number" ] pub struct VALUE { register : VolatileCell < u32 > } # [ doc = "Output random number" ] pub mod value { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: VALUE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct VALUER { bits : u8 , } impl VALUER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Generated random number" ] # [ inline ] pub fn value ( & self ) -> VALUER { let bits = { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; VALUER { bits } } } } } # [ doc = "AES ECB Mode Encryption" ] pub struct ECB { _marker : PhantomData < * const ( ) > } unsafe impl Send for ECB { } impl ECB { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const ecb :: RegisterBlock { 0x4000_e000 as * const _ } } impl Deref for ECB { type Target = ecb :: RegisterBlock ; fn deref ( & self ) -> & ecb :: RegisterBlock { unsafe { & * ECB :: ptr ( ) } } } # [ doc = "AES ECB Mode Encryption" ] pub mod ecb { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start ECB block encrypt" ] pub tasks_startecb : TASKS_STARTECB , # [ doc = "0x04 - Abort a possible executing ECB operation" ] pub tasks_stopecb : TASKS_STOPECB , _reserved0 : [ u8 ; 248usize ] , # [ doc = "0x100 - ECB block encrypt complete" ] pub events_endecb : EVENTS_ENDECB , # [ doc = "0x104 - ECB block encrypt aborted because of a STOPECB task or due to an error" ] pub events_errorecb : EVENTS_ERRORECB , _reserved1 : [ u8 ; 508usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 504usize ] , # [ doc = "0x504 - ECB block encrypt memory pointers" ] pub ecbdataptr : ECBDATAPTR , } # [ doc = "Start ECB block encrypt" ] pub struct TASKS_STARTECB { register : VolatileCell < u32 > } # [ doc = "Start ECB block encrypt" ] pub mod tasks_startecb { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STARTECB { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Abort a possible executing ECB operation" ] pub struct TASKS_STOPECB { register : VolatileCell < u32 > } # [ doc = "Abort a possible executing ECB operation" ] pub mod tasks_stopecb { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOPECB { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "ECB block encrypt complete" ] pub struct EVENTS_ENDECB { register : VolatileCell < u32 > } # [ doc = "ECB block encrypt complete" ] pub mod events_endecb { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDECB { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "ECB block encrypt aborted because of a STOPECB task or due to an error" ] pub struct EVENTS_ERRORECB { register : VolatileCell < u32 > } # [ doc = "ECB block encrypt aborted because of a STOPECB task or due to an error" ] pub mod events_errorecb { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERRORECB { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDECB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDECBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDECBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDECBR :: DISABLED => false , ENDECBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDECBR { match value { false => ENDECBR :: DISABLED , true => ENDECBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDECBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDECBR :: ENABLED } } # [ doc = "Possible values of the field `ERRORECB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORECBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORECBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORECBR :: DISABLED => false , ERRORECBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORECBR { match value { false => ERRORECBR :: DISABLED , true => ERRORECBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORECBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORECBR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDECB`" ] pub enum ENDECBW { # [ doc = "Enable" ] SET } impl ENDECBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDECBW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDECBW < 'a > { w : & 'a mut W , } impl < 'a > _ENDECBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDECBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDECBW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERRORECB`" ] pub enum ERRORECBW { # [ doc = "Enable" ] SET } impl ERRORECBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORECBW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORECBW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORECBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORECBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORECBW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for ENDECB event" ] # [ inline ] pub fn endecb ( & self ) -> ENDECBR { ENDECBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ERRORECB event" ] # [ inline ] pub fn errorecb ( & self ) -> ERRORECBR { ERRORECBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for ENDECB event" ] # [ inline ] pub fn endecb ( & mut self ) -> _ENDECBW { _ENDECBW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ERRORECB event" ] # [ inline ] pub fn errorecb ( & mut self ) -> _ERRORECBW { _ERRORECBW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDECB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDECBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDECBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDECBR :: DISABLED => false , ENDECBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDECBR { match value { false => ENDECBR :: DISABLED , true => ENDECBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDECBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDECBR :: ENABLED } } # [ doc = "Possible values of the field `ERRORECB`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORECBR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORECBR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORECBR :: DISABLED => false , ERRORECBR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORECBR { match value { false => ERRORECBR :: DISABLED , true => ERRORECBR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORECBR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORECBR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDECB`" ] pub enum ENDECBW { # [ doc = "Disable" ] CLEAR } impl ENDECBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDECBW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDECBW < 'a > { w : & 'a mut W , } impl < 'a > _ENDECBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDECBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDECBW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERRORECB`" ] pub enum ERRORECBW { # [ doc = "Disable" ] CLEAR } impl ERRORECBW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORECBW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORECBW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORECBW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORECBW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORECBW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for ENDECB event" ] # [ inline ] pub fn endecb ( & self ) -> ENDECBR { ENDECBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ERRORECB event" ] # [ inline ] pub fn errorecb ( & self ) -> ERRORECBR { ERRORECBR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for ENDECB event" ] # [ inline ] pub fn endecb ( & mut self ) -> _ENDECBW { _ENDECBW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ERRORECB event" ] # [ inline ] pub fn errorecb ( & mut self ) -> _ERRORECBW { _ERRORECBW { w : self } } } } # [ doc = "ECB block encrypt memory pointers" ] pub struct ECBDATAPTR { register : VolatileCell < u32 > } # [ doc = "ECB block encrypt memory pointers" ] pub mod ecbdataptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ECBDATAPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ECBDATAPTRR { bits : u32 , } impl ECBDATAPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _ECBDATAPTRW < 'a > { w : & 'a mut W , } impl < 'a > _ECBDATAPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)" ] # [ inline ] pub fn ecbdataptr ( & self ) -> ECBDATAPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ECBDATAPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)" ] # [ inline ] pub fn ecbdataptr ( & mut self ) -> _ECBDATAPTRW { _ECBDATAPTRW { w : self } } } } } # [ doc = "AES CCM Mode Encryption" ] pub struct CCM { _marker : PhantomData < * const ( ) > } unsafe impl Send for CCM { } impl CCM { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const ccm :: RegisterBlock { 0x4000_f000 as * const _ } } impl Deref for CCM { type Target = ccm :: RegisterBlock ; fn deref ( & self ) -> & ccm :: RegisterBlock { unsafe { & * CCM :: ptr ( ) } } } # [ doc = "AES CCM Mode Encryption" ] pub mod ccm { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start generation of key-stream. This operation will stop by itself when completed." ] pub tasks_ksgen : TASKS_KSGEN , # [ doc = "0x04 - Start encryption/decryption. This operation will stop by itself when completed." ] pub tasks_crypt : TASKS_CRYPT , # [ doc = "0x08 - Stop encryption/decryption" ] pub tasks_stop : TASKS_STOP , _reserved0 : [ u8 ; 244usize ] , # [ doc = "0x100 - Key-stream generation complete" ] pub events_endksgen : EVENTS_ENDKSGEN , # [ doc = "0x104 - Encrypt/decrypt complete" ] pub events_endcrypt : EVENTS_ENDCRYPT , # [ doc = "0x108 - CCM error event" ] pub events_error : EVENTS_ERROR , _reserved1 : [ u8 ; 244usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved2 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 244usize ] , # [ doc = "0x400 - MIC check result" ] pub micstatus : MICSTATUS , _reserved4 : [ u8 ; 252usize ] , # [ doc = "0x500 - Enable" ] pub enable : ENABLE , # [ doc = "0x504 - Operation mode" ] pub mode : MODE , # [ doc = "0x508 - Pointer to data structure holding AES key and NONCE vector" ] pub cnfptr : CNFPTR , # [ doc = "0x50c - Input pointer" ] pub inptr : INPTR , # [ doc = "0x510 - Output pointer" ] pub outptr : OUTPTR , # [ doc = "0x514 - Pointer to data area used for temporary storage" ] pub scratchptr : SCRATCHPTR , } # [ doc = "Start generation of key-stream. This operation will stop by itself when completed." ] pub struct TASKS_KSGEN { register : VolatileCell < u32 > } # [ doc = "Start generation of key-stream. This operation will stop by itself when completed." ] pub mod tasks_ksgen { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_KSGEN { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Start encryption/decryption. This operation will stop by itself when completed." ] pub struct TASKS_CRYPT { register : VolatileCell < u32 > } # [ doc = "Start encryption/decryption. This operation will stop by itself when completed." ] pub mod tasks_crypt { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_CRYPT { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop encryption/decryption" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop encryption/decryption" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Key-stream generation complete" ] pub struct EVENTS_ENDKSGEN { register : VolatileCell < u32 > } # [ doc = "Key-stream generation complete" ] pub mod events_endksgen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDKSGEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Encrypt/decrypt complete" ] pub struct EVENTS_ENDCRYPT { register : VolatileCell < u32 > } # [ doc = "Encrypt/decrypt complete" ] pub mod events_endcrypt { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ENDCRYPT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "CCM error event" ] pub struct EVENTS_ERROR { register : VolatileCell < u32 > } # [ doc = "CCM error event" ] pub mod events_error { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ERROR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDKSGEN_CRYPT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDKSGEN_CRYPTR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDKSGEN_CRYPTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDKSGEN_CRYPTR :: DISABLED => false , ENDKSGEN_CRYPTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDKSGEN_CRYPTR { match value { false => ENDKSGEN_CRYPTR :: DISABLED , true => ENDKSGEN_CRYPTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDKSGEN_CRYPTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDKSGEN_CRYPTR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDKSGEN_CRYPT`" ] pub enum ENDKSGEN_CRYPTW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl ENDKSGEN_CRYPTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDKSGEN_CRYPTW :: DISABLED => false , ENDKSGEN_CRYPTW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDKSGEN_CRYPTW < 'a > { w : & 'a mut W , } impl < 'a > _ENDKSGEN_CRYPTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDKSGEN_CRYPTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDKSGEN_CRYPTW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDKSGEN_CRYPTW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between ENDKSGEN event and CRYPT task" ] # [ inline ] pub fn endksgen_crypt ( & self ) -> ENDKSGEN_CRYPTR { ENDKSGEN_CRYPTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between ENDKSGEN event and CRYPT task" ] # [ inline ] pub fn endksgen_crypt ( & mut self ) -> _ENDKSGEN_CRYPTW { _ENDKSGEN_CRYPTW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDKSGEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDKSGENR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDKSGENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDKSGENR :: DISABLED => false , ENDKSGENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDKSGENR { match value { false => ENDKSGENR :: DISABLED , true => ENDKSGENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDKSGENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDKSGENR :: ENABLED } } # [ doc = "Possible values of the field `ENDCRYPT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDCRYPTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDCRYPTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDCRYPTR :: DISABLED => false , ENDCRYPTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDCRYPTR { match value { false => ENDCRYPTR :: DISABLED , true => ENDCRYPTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDCRYPTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDCRYPTR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDKSGEN`" ] pub enum ENDKSGENW { # [ doc = "Enable" ] SET } impl ENDKSGENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDKSGENW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDKSGENW < 'a > { w : & 'a mut W , } impl < 'a > _ENDKSGENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDKSGENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDKSGENW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDCRYPT`" ] pub enum ENDCRYPTW { # [ doc = "Enable" ] SET } impl ENDCRYPTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDCRYPTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDCRYPTW < 'a > { w : & 'a mut W , } impl < 'a > _ENDCRYPTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDCRYPTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDCRYPTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Enable" ] SET } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ERRORW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for ENDKSGEN event" ] # [ inline ] pub fn endksgen ( & self ) -> ENDKSGENR { ENDKSGENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ENDCRYPT event" ] # [ inline ] pub fn endcrypt ( & self ) -> ENDCRYPTR { ENDCRYPTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for ENDKSGEN event" ] # [ inline ] pub fn endksgen ( & mut self ) -> _ENDKSGENW { _ENDKSGENW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for ENDCRYPT event" ] # [ inline ] pub fn endcrypt ( & mut self ) -> _ENDCRYPTW { _ENDCRYPTW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENDKSGEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDKSGENR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDKSGENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDKSGENR :: DISABLED => false , ENDKSGENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDKSGENR { match value { false => ENDKSGENR :: DISABLED , true => ENDKSGENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDKSGENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDKSGENR :: ENABLED } } # [ doc = "Possible values of the field `ENDCRYPT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDCRYPTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDCRYPTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDCRYPTR :: DISABLED => false , ENDCRYPTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDCRYPTR { match value { false => ENDCRYPTR :: DISABLED , true => ENDCRYPTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDCRYPTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDCRYPTR :: ENABLED } } # [ doc = "Possible values of the field `ERROR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERRORR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ERRORR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERRORR :: DISABLED => false , ERRORR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERRORR { match value { false => ERRORR :: DISABLED , true => ERRORR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ERRORR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ERRORR :: ENABLED } } # [ doc = "Values that can be written to the field `ENDKSGEN`" ] pub enum ENDKSGENW { # [ doc = "Disable" ] CLEAR } impl ENDKSGENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDKSGENW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDKSGENW < 'a > { w : & 'a mut W , } impl < 'a > _ENDKSGENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDKSGENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDKSGENW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ENDCRYPT`" ] pub enum ENDCRYPTW { # [ doc = "Disable" ] CLEAR } impl ENDCRYPTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDCRYPTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDCRYPTW < 'a > { w : & 'a mut W , } impl < 'a > _ENDCRYPTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDCRYPTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDCRYPTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ERROR`" ] pub enum ERRORW { # [ doc = "Disable" ] CLEAR } impl ERRORW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERRORW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ERRORW < 'a > { w : & 'a mut W , } impl < 'a > _ERRORW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERRORW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ERRORW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for ENDKSGEN event" ] # [ inline ] pub fn endksgen ( & self ) -> ENDKSGENR { ENDKSGENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ENDCRYPT event" ] # [ inline ] pub fn endcrypt ( & self ) -> ENDCRYPTR { ENDCRYPTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & self ) -> ERRORR { ERRORR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for ENDKSGEN event" ] # [ inline ] pub fn endksgen ( & mut self ) -> _ENDKSGENW { _ENDKSGENW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for ENDCRYPT event" ] # [ inline ] pub fn endcrypt ( & mut self ) -> _ENDCRYPTW { _ENDCRYPTW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for ERROR event" ] # [ inline ] pub fn error ( & mut self ) -> _ERRORW { _ERRORW { w : self } } } } # [ doc = "MIC check result" ] pub struct MICSTATUS { register : VolatileCell < u32 > } # [ doc = "MIC check result" ] pub mod micstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: MICSTATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `MICSTATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MICSTATUSR { # [ doc = "MIC check failed" ] CHECKFAILED , # [ doc = "MIC check passed" ] CHECKPASSED } impl MICSTATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MICSTATUSR :: CHECKFAILED => false , MICSTATUSR :: CHECKPASSED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MICSTATUSR { match value { false => MICSTATUSR :: CHECKFAILED , true => MICSTATUSR :: CHECKPASSED , } } # [ doc = "Checks if the value of the field is `CHECKFAILED`" ] # [ inline ] pub fn is_check_failed ( & self ) -> bool { * self == MICSTATUSR :: CHECKFAILED } # [ doc = "Checks if the value of the field is `CHECKPASSED`" ] # [ inline ] pub fn is_check_passed ( & self ) -> bool { * self == MICSTATUSR :: CHECKPASSED } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - The result of the MIC check performed during the previous decryption operation" ] # [ inline ] pub fn micstatus ( & self ) -> MICSTATUSR { MICSTATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Enable" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x02 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 2 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 2 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Enable or disable CCM" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Enable or disable CCM" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Operation mode" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Operation mode" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "AES CCM packet encryption mode" ] ENCRYPTION , # [ doc = "AES CCM packet decryption mode" ] DECRYPTION } impl MODER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MODER :: ENCRYPTION => false , MODER :: DECRYPTION => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MODER { match value { false => MODER :: ENCRYPTION , true => MODER :: DECRYPTION , } } # [ doc = "Checks if the value of the field is `ENCRYPTION`" ] # [ inline ] pub fn is_encryption ( & self ) -> bool { * self == MODER :: ENCRYPTION } # [ doc = "Checks if the value of the field is `DECRYPTION`" ] # [ inline ] pub fn is_decryption ( & self ) -> bool { * self == MODER :: DECRYPTION } } # [ doc = "Possible values of the field `DATARATE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DATARATER { # [ doc = "In synch with 1 Mbit data rate" ] _1MBIT , # [ doc = "In synch with 2 Mbit data rate" ] _2MBIT } impl DATARATER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DATARATER :: _1MBIT => false , DATARATER :: _2MBIT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DATARATER { match value { false => DATARATER :: _1MBIT , true => DATARATER :: _2MBIT , } } # [ doc = "Checks if the value of the field is `_1MBIT`" ] # [ inline ] pub fn is_1mbit ( & self ) -> bool { * self == DATARATER :: _1MBIT } # [ doc = "Checks if the value of the field is `_2MBIT`" ] # [ inline ] pub fn is_2mbit ( & self ) -> bool { * self == DATARATER :: _2MBIT } } # [ doc = "Possible values of the field `LENGTH`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LENGTHR { # [ doc = "Default length. Effective length of LENGTH field is 5-bit" ] DEFAULT , # [ doc = "Extended length. Effective length of LENGTH field is 8-bit" ] EXTENDED } impl LENGTHR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LENGTHR :: DEFAULT => false , LENGTHR :: EXTENDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LENGTHR { match value { false => LENGTHR :: DEFAULT , true => LENGTHR :: EXTENDED , } } # [ doc = "Checks if the value of the field is `DEFAULT`" ] # [ inline ] pub fn is_default ( & self ) -> bool { * self == LENGTHR :: DEFAULT } # [ doc = "Checks if the value of the field is `EXTENDED`" ] # [ inline ] pub fn is_extended ( & self ) -> bool { * self == LENGTHR :: EXTENDED } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "AES CCM packet encryption mode" ] ENCRYPTION , # [ doc = "AES CCM packet decryption mode" ] DECRYPTION } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { MODEW :: ENCRYPTION => false , MODEW :: DECRYPTION => true } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "AES CCM packet encryption mode" ] # [ inline ] pub fn encryption ( self ) -> & 'a mut W { self . variant ( MODEW :: ENCRYPTION ) } # [ doc = "AES CCM packet decryption mode" ] # [ inline ] pub fn decryption ( self ) -> & 'a mut W { self . variant ( MODEW :: DECRYPTION ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DATARATE`" ] pub enum DATARATEW { # [ doc = "In synch with 1 Mbit data rate" ] _1MBIT , # [ doc = "In synch with 2 Mbit data rate" ] _2MBIT } impl DATARATEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DATARATEW :: _1MBIT => false , DATARATEW :: _2MBIT => true } } } # [ doc = r" Proxy" ] pub struct _DATARATEW < 'a > { w : & 'a mut W , } impl < 'a > _DATARATEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DATARATEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "In synch with 1 Mbit data rate" ] # [ inline ] pub fn _1mbit ( self ) -> & 'a mut W { self . variant ( DATARATEW :: _1MBIT ) } # [ doc = "In synch with 2 Mbit data rate" ] # [ inline ] pub fn _2mbit ( self ) -> & 'a mut W { self . variant ( DATARATEW :: _2MBIT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LENGTH`" ] pub enum LENGTHW { # [ doc = "Default length. Effective length of LENGTH field is 5-bit" ] DEFAULT , # [ doc = "Extended length. Effective length of LENGTH field is 8-bit" ] EXTENDED } impl LENGTHW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LENGTHW :: DEFAULT => false , LENGTHW :: EXTENDED => true } } } # [ doc = r" Proxy" ] pub struct _LENGTHW < 'a > { w : & 'a mut W , } impl < 'a > _LENGTHW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LENGTHW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Default length. Effective length of LENGTH field is 5-bit" ] # [ inline ] pub fn default ( self ) -> & 'a mut W { self . variant ( LENGTHW :: DEFAULT ) } # [ doc = "Extended length. Effective length of LENGTH field is 8-bit" ] # [ inline ] pub fn extended ( self ) -> & 'a mut W { self . variant ( LENGTHW :: EXTENDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - The mode of operation to be used" ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Data rate that the CCM shall run in synch with" ] # [ inline ] pub fn datarate ( & self ) -> DATARATER { DATARATER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Packet length configuration" ] # [ inline ] pub fn length ( & self ) -> LENGTHR { LENGTHR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - The mode of operation to be used" ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } # [ doc = "Bit 16 - Data rate that the CCM shall run in synch with" ] # [ inline ] pub fn datarate ( & mut self ) -> _DATARATEW { _DATARATEW { w : self } } # [ doc = "Bit 24 - Packet length configuration" ] # [ inline ] pub fn length ( & mut self ) -> _LENGTHW { _LENGTHW { w : self } } } } # [ doc = "Pointer to data structure holding AES key and NONCE vector" ] pub struct CNFPTR { register : VolatileCell < u32 > } # [ doc = "Pointer to data structure holding AES key and NONCE vector" ] pub mod cnfptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CNFPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CNFPTRR { bits : u32 , } impl CNFPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CNFPTRW < 'a > { w : & 'a mut W , } impl < 'a > _CNFPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)" ] # [ inline ] pub fn cnfptr ( & self ) -> CNFPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CNFPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)" ] # [ inline ] pub fn cnfptr ( & mut self ) -> _CNFPTRW { _CNFPTRW { w : self } } } } # [ doc = "Input pointer" ] pub struct INPTR { register : VolatileCell < u32 > } # [ doc = "Input pointer" ] pub mod inptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct INPTRR { bits : u32 , } impl INPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _INPTRW < 'a > { w : & 'a mut W , } impl < 'a > _INPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Input pointer" ] # [ inline ] pub fn inptr ( & self ) -> INPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; INPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Input pointer" ] # [ inline ] pub fn inptr ( & mut self ) -> _INPTRW { _INPTRW { w : self } } } } # [ doc = "Output pointer" ] pub struct OUTPTR { register : VolatileCell < u32 > } # [ doc = "Output pointer" ] pub mod outptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: OUTPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct OUTPTRR { bits : u32 , } impl OUTPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _OUTPTRW < 'a > { w : & 'a mut W , } impl < 'a > _OUTPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Output pointer" ] # [ inline ] pub fn outptr ( & self ) -> OUTPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; OUTPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Output pointer" ] # [ inline ] pub fn outptr ( & mut self ) -> _OUTPTRW { _OUTPTRW { w : self } } } } # [ doc = "Pointer to data area used for temporary storage" ] pub struct SCRATCHPTR { register : VolatileCell < u32 > } # [ doc = "Pointer to data area used for temporary storage" ] pub mod scratchptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SCRATCHPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct SCRATCHPTRR { bits : u32 , } impl SCRATCHPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _SCRATCHPTRW < 'a > { w : & 'a mut W , } impl < 'a > _SCRATCHPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption." ] # [ inline ] pub fn scratchptr ( & self ) -> SCRATCHPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; SCRATCHPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption." ] # [ inline ] pub fn scratchptr ( & mut self ) -> _SCRATCHPTRW { _SCRATCHPTRW { w : self } } } } } # [ doc = "Accelerated Address Resolver" ] pub struct AAR { _marker : PhantomData < * const ( ) > } unsafe impl Send for AAR { } impl AAR { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const aar :: RegisterBlock { 0x4000_f000 as * const _ } } impl Deref for AAR { type Target = aar :: RegisterBlock ; fn deref ( & self ) -> & aar :: RegisterBlock { unsafe { & * AAR :: ptr ( ) } } } # [ doc = "Accelerated Address Resolver" ] pub mod aar { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure" ] pub tasks_start : TASKS_START , _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x08 - Stop resolving addresses" ] pub tasks_stop : TASKS_STOP , _reserved1 : [ u8 ; 244usize ] , # [ doc = "0x100 - Address resolution procedure complete" ] pub events_end : EVENTS_END , # [ doc = "0x104 - Address resolved" ] pub events_resolved : EVENTS_RESOLVED , # [ doc = "0x108 - Address not resolved" ] pub events_notresolved : EVENTS_NOTRESOLVED , _reserved2 : [ u8 ; 504usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 244usize ] , # [ doc = "0x400 - Resolution status" ] pub status : STATUS , _reserved4 : [ u8 ; 252usize ] , # [ doc = "0x500 - Enable AAR" ] pub enable : ENABLE , # [ doc = "0x504 - Number of IRKs" ] pub nirk : NIRK , # [ doc = "0x508 - Pointer to IRK data structure" ] pub irkptr : IRKPTR , _reserved5 : [ u8 ; 4usize ] , # [ doc = "0x510 - Pointer to the resolvable address" ] pub addrptr : ADDRPTR , # [ doc = "0x514 - Pointer to data area used for temporary storage" ] pub scratchptr : SCRATCHPTR , } # [ doc = "Start resolving addresses based on IRKs specified in the IRK data structure" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start resolving addresses based on IRKs specified in the IRK data structure" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop resolving addresses" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop resolving addresses" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Address resolution procedure complete" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "Address resolution procedure complete" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Address resolved" ] pub struct EVENTS_RESOLVED { register : VolatileCell < u32 > } # [ doc = "Address resolved" ] pub mod events_resolved { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RESOLVED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Address not resolved" ] pub struct EVENTS_NOTRESOLVED { register : VolatileCell < u32 > } # [ doc = "Address not resolved" ] pub mod events_notresolved { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_NOTRESOLVED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `RESOLVED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESOLVEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RESOLVEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESOLVEDR :: DISABLED => false , RESOLVEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESOLVEDR { match value { false => RESOLVEDR :: DISABLED , true => RESOLVEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RESOLVEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RESOLVEDR :: ENABLED } } # [ doc = "Possible values of the field `NOTRESOLVED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOTRESOLVEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NOTRESOLVEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NOTRESOLVEDR :: DISABLED => false , NOTRESOLVEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NOTRESOLVEDR { match value { false => NOTRESOLVEDR :: DISABLED , true => NOTRESOLVEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NOTRESOLVEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NOTRESOLVEDR :: ENABLED } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RESOLVED`" ] pub enum RESOLVEDW { # [ doc = "Enable" ] SET } impl RESOLVEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESOLVEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RESOLVEDW < 'a > { w : & 'a mut W , } impl < 'a > _RESOLVEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESOLVEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RESOLVEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NOTRESOLVED`" ] pub enum NOTRESOLVEDW { # [ doc = "Enable" ] SET } impl NOTRESOLVEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NOTRESOLVEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _NOTRESOLVEDW < 'a > { w : & 'a mut W , } impl < 'a > _NOTRESOLVEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NOTRESOLVEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( NOTRESOLVEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for RESOLVED event" ] # [ inline ] pub fn resolved ( & self ) -> RESOLVEDR { RESOLVEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for NOTRESOLVED event" ] # [ inline ] pub fn notresolved ( & self ) -> NOTRESOLVEDR { NOTRESOLVEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for RESOLVED event" ] # [ inline ] pub fn resolved ( & mut self ) -> _RESOLVEDW { _RESOLVEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for NOTRESOLVED event" ] # [ inline ] pub fn notresolved ( & mut self ) -> _NOTRESOLVEDW { _NOTRESOLVEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Possible values of the field `RESOLVED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESOLVEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RESOLVEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESOLVEDR :: DISABLED => false , RESOLVEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESOLVEDR { match value { false => RESOLVEDR :: DISABLED , true => RESOLVEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RESOLVEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RESOLVEDR :: ENABLED } } # [ doc = "Possible values of the field `NOTRESOLVED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum NOTRESOLVEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl NOTRESOLVEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { NOTRESOLVEDR :: DISABLED => false , NOTRESOLVEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> NOTRESOLVEDR { match value { false => NOTRESOLVEDR :: DISABLED , true => NOTRESOLVEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == NOTRESOLVEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == NOTRESOLVEDR :: ENABLED } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RESOLVED`" ] pub enum RESOLVEDW { # [ doc = "Disable" ] CLEAR } impl RESOLVEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RESOLVEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RESOLVEDW < 'a > { w : & 'a mut W , } impl < 'a > _RESOLVEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RESOLVEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RESOLVEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `NOTRESOLVED`" ] pub enum NOTRESOLVEDW { # [ doc = "Disable" ] CLEAR } impl NOTRESOLVEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { NOTRESOLVEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _NOTRESOLVEDW < 'a > { w : & 'a mut W , } impl < 'a > _NOTRESOLVEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : NOTRESOLVEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( NOTRESOLVEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for RESOLVED event" ] # [ inline ] pub fn resolved ( & self ) -> RESOLVEDR { RESOLVEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for NOTRESOLVED event" ] # [ inline ] pub fn notresolved ( & self ) -> NOTRESOLVEDR { NOTRESOLVEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for RESOLVED event" ] # [ inline ] pub fn resolved ( & mut self ) -> _RESOLVEDW { _RESOLVEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for NOTRESOLVED event" ] # [ inline ] pub fn notresolved ( & mut self ) -> _NOTRESOLVEDW { _NOTRESOLVEDW { w : self } } } } # [ doc = "Resolution status" ] pub struct STATUS { register : VolatileCell < u32 > } # [ doc = "Resolution status" ] pub mod status { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: STATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct STATUSR { bits : u8 , } impl STATUSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - The IRK that was used last time an address was resolved" ] # [ inline ] pub fn status ( & self ) -> STATUSR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; STATUSR { bits } } } } # [ doc = "Enable AAR" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable AAR" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x03 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 3 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 3 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Enable or disable AAR" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Enable or disable AAR" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Number of IRKs" ] pub struct NIRK { register : VolatileCell < u32 > } # [ doc = "Number of IRKs" ] pub mod nirk { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NIRK { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct NIRKR { bits : u8 , } impl NIRKR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _NIRKW < 'a > { w : & 'a mut W , } impl < 'a > _NIRKW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure" ] # [ inline ] pub fn nirk ( & self ) -> NIRKR { let bits = { const MASK : u8 = 0x1f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; NIRKR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure" ] # [ inline ] pub fn nirk ( & mut self ) -> _NIRKW { _NIRKW { w : self } } } } # [ doc = "Pointer to IRK data structure" ] pub struct IRKPTR { register : VolatileCell < u32 > } # [ doc = "Pointer to IRK data structure" ] pub mod irkptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: IRKPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct IRKPTRR { bits : u32 , } impl IRKPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _IRKPTRW < 'a > { w : & 'a mut W , } impl < 'a > _IRKPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to the IRK data structure" ] # [ inline ] pub fn irkptr ( & self ) -> IRKPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; IRKPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to the IRK data structure" ] # [ inline ] pub fn irkptr ( & mut self ) -> _IRKPTRW { _IRKPTRW { w : self } } } } # [ doc = "Pointer to the resolvable address" ] pub struct ADDRPTR { register : VolatileCell < u32 > } # [ doc = "Pointer to the resolvable address" ] pub mod addrptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ADDRPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ADDRPTRR { bits : u32 , } impl ADDRPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _ADDRPTRW < 'a > { w : & 'a mut W , } impl < 'a > _ADDRPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)" ] # [ inline ] pub fn addrptr ( & self ) -> ADDRPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ADDRPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)" ] # [ inline ] pub fn addrptr ( & mut self ) -> _ADDRPTRW { _ADDRPTRW { w : self } } } } # [ doc = "Pointer to data area used for temporary storage" ] pub struct SCRATCHPTR { register : VolatileCell < u32 > } # [ doc = "Pointer to data area used for temporary storage" ] pub mod scratchptr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SCRATCHPTR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct SCRATCHPTRR { bits : u32 , } impl SCRATCHPTRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _SCRATCHPTRW < 'a > { w : & 'a mut W , } impl < 'a > _SCRATCHPTRW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved." ] # [ inline ] pub fn scratchptr ( & self ) -> SCRATCHPTRR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; SCRATCHPTRR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved." ] # [ inline ] pub fn scratchptr ( & mut self ) -> _SCRATCHPTRW { _SCRATCHPTRW { w : self } } } } } # [ doc = "Watchdog Timer" ] pub struct WDT { _marker : PhantomData < * const ( ) > } unsafe impl Send for WDT { } impl WDT { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const wdt :: RegisterBlock { 0x4001_0000 as * const _ } } impl Deref for WDT { type Target = wdt :: RegisterBlock ; fn deref ( & self ) -> & wdt :: RegisterBlock { unsafe { & * WDT :: ptr ( ) } } } # [ doc = "Watchdog Timer" ] pub mod wdt { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start the watchdog" ] pub tasks_start : TASKS_START , _reserved0 : [ u8 ; 252usize ] , # [ doc = "0x100 - Watchdog timeout" ] pub events_timeout : EVENTS_TIMEOUT , _reserved1 : [ u8 ; 512usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 244usize ] , # [ doc = "0x400 - Run status" ] pub runstatus : RUNSTATUS , # [ doc = "0x404 - Request status" ] pub reqstatus : REQSTATUS , _reserved3 : [ u8 ; 252usize ] , # [ doc = "0x504 - Counter reload value" ] pub crv : CRV , # [ doc = "0x508 - Enable register for reload request registers" ] pub rren : RREN , # [ doc = "0x50c - Configuration register" ] pub config : CONFIG , _reserved4 : [ u8 ; 240usize ] , # [ doc = "0x600 - Description collection[0]: Reload request 0" ] pub rr : [ RR ; 8 ] , } # [ doc = "Start the watchdog" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start the watchdog" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Watchdog timeout" ] pub struct EVENTS_TIMEOUT { register : VolatileCell < u32 > } # [ doc = "Watchdog timeout" ] pub mod events_timeout { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TIMEOUT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TIMEOUT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIMEOUTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TIMEOUTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TIMEOUTR :: DISABLED => false , TIMEOUTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TIMEOUTR { match value { false => TIMEOUTR :: DISABLED , true => TIMEOUTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TIMEOUTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TIMEOUTR :: ENABLED } } # [ doc = "Values that can be written to the field `TIMEOUT`" ] pub enum TIMEOUTW { # [ doc = "Enable" ] SET } impl TIMEOUTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TIMEOUTW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TIMEOUTW < 'a > { w : & 'a mut W , } impl < 'a > _TIMEOUTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TIMEOUTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TIMEOUTW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TIMEOUT event" ] # [ inline ] pub fn timeout ( & self ) -> TIMEOUTR { TIMEOUTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TIMEOUT event" ] # [ inline ] pub fn timeout ( & mut self ) -> _TIMEOUTW { _TIMEOUTW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TIMEOUT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TIMEOUTR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TIMEOUTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TIMEOUTR :: DISABLED => false , TIMEOUTR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TIMEOUTR { match value { false => TIMEOUTR :: DISABLED , true => TIMEOUTR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TIMEOUTR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TIMEOUTR :: ENABLED } } # [ doc = "Values that can be written to the field `TIMEOUT`" ] pub enum TIMEOUTW { # [ doc = "Disable" ] CLEAR } impl TIMEOUTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TIMEOUTW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TIMEOUTW < 'a > { w : & 'a mut W , } impl < 'a > _TIMEOUTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TIMEOUTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TIMEOUTW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TIMEOUT event" ] # [ inline ] pub fn timeout ( & self ) -> TIMEOUTR { TIMEOUTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TIMEOUT event" ] # [ inline ] pub fn timeout ( & mut self ) -> _TIMEOUTW { _TIMEOUTW { w : self } } } } # [ doc = "Run status" ] pub struct RUNSTATUS { register : VolatileCell < u32 > } # [ doc = "Run status" ] pub mod runstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RUNSTATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `RUNSTATUS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RUNSTATUSR { # [ doc = "Watchdog not running" ] NOTRUNNING , # [ doc = "Watchdog is running" ] RUNNING } impl RUNSTATUSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RUNSTATUSR :: NOTRUNNING => false , RUNSTATUSR :: RUNNING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RUNSTATUSR { match value { false => RUNSTATUSR :: NOTRUNNING , true => RUNSTATUSR :: RUNNING , } } # [ doc = "Checks if the value of the field is `NOTRUNNING`" ] # [ inline ] pub fn is_not_running ( & self ) -> bool { * self == RUNSTATUSR :: NOTRUNNING } # [ doc = "Checks if the value of the field is `RUNNING`" ] # [ inline ] pub fn is_running ( & self ) -> bool { * self == RUNSTATUSR :: RUNNING } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Indicates whether or not the watchdog is running" ] # [ inline ] pub fn runstatus ( & self ) -> RUNSTATUSR { RUNSTATUSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Request status" ] pub struct REQSTATUS { register : VolatileCell < u32 > } # [ doc = "Request status" ] pub mod reqstatus { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: REQSTATUS { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `RR0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR0R { # [ doc = "RR[0] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[0] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR0R :: DISABLEDORREQUESTED => false , RR0R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR0R { match value { false => RR0R :: DISABLEDORREQUESTED , true => RR0R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR0R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR0R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR1R { # [ doc = "RR[1] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[1] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR1R :: DISABLEDORREQUESTED => false , RR1R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR1R { match value { false => RR1R :: DISABLEDORREQUESTED , true => RR1R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR1R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR1R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR2R { # [ doc = "RR[2] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[2] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR2R :: DISABLEDORREQUESTED => false , RR2R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR2R { match value { false => RR2R :: DISABLEDORREQUESTED , true => RR2R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR2R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR2R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR3R { # [ doc = "RR[3] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[3] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR3R :: DISABLEDORREQUESTED => false , RR3R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR3R { match value { false => RR3R :: DISABLEDORREQUESTED , true => RR3R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR3R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR3R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR4R { # [ doc = "RR[4] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[4] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR4R :: DISABLEDORREQUESTED => false , RR4R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR4R { match value { false => RR4R :: DISABLEDORREQUESTED , true => RR4R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR4R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR4R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR5R { # [ doc = "RR[5] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[5] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR5R :: DISABLEDORREQUESTED => false , RR5R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR5R { match value { false => RR5R :: DISABLEDORREQUESTED , true => RR5R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR5R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR5R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR6R { # [ doc = "RR[6] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[6] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR6R :: DISABLEDORREQUESTED => false , RR6R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR6R { match value { false => RR6R :: DISABLEDORREQUESTED , true => RR6R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR6R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR6R :: ENABLEDANDUNREQUESTED } } # [ doc = "Possible values of the field `RR7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR7R { # [ doc = "RR[7] register is not enabled, or are already requesting reload" ] DISABLEDORREQUESTED , # [ doc = "RR[7] register is enabled, and are not yet requesting reload" ] ENABLEDANDUNREQUESTED } impl RR7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR7R :: DISABLEDORREQUESTED => false , RR7R :: ENABLEDANDUNREQUESTED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR7R { match value { false => RR7R :: DISABLEDORREQUESTED , true => RR7R :: ENABLEDANDUNREQUESTED , } } # [ doc = "Checks if the value of the field is `DISABLEDORREQUESTED`" ] # [ inline ] pub fn is_disabled_or_requested ( & self ) -> bool { * self == RR7R :: DISABLEDORREQUESTED } # [ doc = "Checks if the value of the field is `ENABLEDANDUNREQUESTED`" ] # [ inline ] pub fn is_enabled_and_unrequested ( & self ) -> bool { * self == RR7R :: ENABLEDANDUNREQUESTED } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Request status for RR[0] register" ] # [ inline ] pub fn rr0 ( & self ) -> RR0R { RR0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Request status for RR[1] register" ] # [ inline ] pub fn rr1 ( & self ) -> RR1R { RR1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Request status for RR[2] register" ] # [ inline ] pub fn rr2 ( & self ) -> RR2R { RR2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Request status for RR[3] register" ] # [ inline ] pub fn rr3 ( & self ) -> RR3R { RR3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Request status for RR[4] register" ] # [ inline ] pub fn rr4 ( & self ) -> RR4R { RR4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Request status for RR[5] register" ] # [ inline ] pub fn rr5 ( & self ) -> RR5R { RR5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Request status for RR[6] register" ] # [ inline ] pub fn rr6 ( & self ) -> RR6R { RR6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Request status for RR[7] register" ] # [ inline ] pub fn rr7 ( & self ) -> RR7R { RR7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Counter reload value" ] pub struct CRV { register : VolatileCell < u32 > } # [ doc = "Counter reload value" ] pub mod crv { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CRV { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct CRVR { bits : u32 , } impl CRVR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _CRVW < 'a > { w : & 'a mut W , } impl < 'a > _CRVW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock" ] # [ inline ] pub fn crv ( & self ) -> CRVR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; CRVR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0xffff_ffff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock" ] # [ inline ] pub fn crv ( & mut self ) -> _CRVW { _CRVW { w : self } } } } # [ doc = "Enable register for reload request registers" ] pub struct RREN { register : VolatileCell < u32 > } # [ doc = "Enable register for reload request registers" ] pub mod rren { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RREN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RR0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR0R { # [ doc = "Disable RR[0] register" ] DISABLED , # [ doc = "Enable RR[0] register" ] ENABLED } impl RR0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR0R :: DISABLED => false , RR0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR0R { match value { false => RR0R :: DISABLED , true => RR0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR0R :: ENABLED } } # [ doc = "Possible values of the field `RR1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR1R { # [ doc = "Disable RR[1] register" ] DISABLED , # [ doc = "Enable RR[1] register" ] ENABLED } impl RR1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR1R :: DISABLED => false , RR1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR1R { match value { false => RR1R :: DISABLED , true => RR1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR1R :: ENABLED } } # [ doc = "Possible values of the field `RR2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR2R { # [ doc = "Disable RR[2] register" ] DISABLED , # [ doc = "Enable RR[2] register" ] ENABLED } impl RR2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR2R :: DISABLED => false , RR2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR2R { match value { false => RR2R :: DISABLED , true => RR2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR2R :: ENABLED } } # [ doc = "Possible values of the field `RR3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR3R { # [ doc = "Disable RR[3] register" ] DISABLED , # [ doc = "Enable RR[3] register" ] ENABLED } impl RR3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR3R :: DISABLED => false , RR3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR3R { match value { false => RR3R :: DISABLED , true => RR3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR3R :: ENABLED } } # [ doc = "Possible values of the field `RR4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR4R { # [ doc = "Disable RR[4] register" ] DISABLED , # [ doc = "Enable RR[4] register" ] ENABLED } impl RR4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR4R :: DISABLED => false , RR4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR4R { match value { false => RR4R :: DISABLED , true => RR4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR4R :: ENABLED } } # [ doc = "Possible values of the field `RR5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR5R { # [ doc = "Disable RR[5] register" ] DISABLED , # [ doc = "Enable RR[5] register" ] ENABLED } impl RR5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR5R :: DISABLED => false , RR5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR5R { match value { false => RR5R :: DISABLED , true => RR5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR5R :: ENABLED } } # [ doc = "Possible values of the field `RR6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR6R { # [ doc = "Disable RR[6] register" ] DISABLED , # [ doc = "Enable RR[6] register" ] ENABLED } impl RR6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR6R :: DISABLED => false , RR6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR6R { match value { false => RR6R :: DISABLED , true => RR6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR6R :: ENABLED } } # [ doc = "Possible values of the field `RR7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RR7R { # [ doc = "Disable RR[7] register" ] DISABLED , # [ doc = "Enable RR[7] register" ] ENABLED } impl RR7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RR7R :: DISABLED => false , RR7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RR7R { match value { false => RR7R :: DISABLED , true => RR7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RR7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RR7R :: ENABLED } } # [ doc = "Values that can be written to the field `RR0`" ] pub enum RR0W { # [ doc = "Disable RR[0] register" ] DISABLED , # [ doc = "Enable RR[0] register" ] ENABLED } impl RR0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR0W :: DISABLED => false , RR0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR0W < 'a > { w : & 'a mut W , } impl < 'a > _RR0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[0] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR0W :: DISABLED ) } # [ doc = "Enable RR[0] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR1`" ] pub enum RR1W { # [ doc = "Disable RR[1] register" ] DISABLED , # [ doc = "Enable RR[1] register" ] ENABLED } impl RR1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR1W :: DISABLED => false , RR1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR1W < 'a > { w : & 'a mut W , } impl < 'a > _RR1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[1] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR1W :: DISABLED ) } # [ doc = "Enable RR[1] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR2`" ] pub enum RR2W { # [ doc = "Disable RR[2] register" ] DISABLED , # [ doc = "Enable RR[2] register" ] ENABLED } impl RR2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR2W :: DISABLED => false , RR2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR2W < 'a > { w : & 'a mut W , } impl < 'a > _RR2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[2] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR2W :: DISABLED ) } # [ doc = "Enable RR[2] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR3`" ] pub enum RR3W { # [ doc = "Disable RR[3] register" ] DISABLED , # [ doc = "Enable RR[3] register" ] ENABLED } impl RR3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR3W :: DISABLED => false , RR3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR3W < 'a > { w : & 'a mut W , } impl < 'a > _RR3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[3] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR3W :: DISABLED ) } # [ doc = "Enable RR[3] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR4`" ] pub enum RR4W { # [ doc = "Disable RR[4] register" ] DISABLED , # [ doc = "Enable RR[4] register" ] ENABLED } impl RR4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR4W :: DISABLED => false , RR4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR4W < 'a > { w : & 'a mut W , } impl < 'a > _RR4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[4] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR4W :: DISABLED ) } # [ doc = "Enable RR[4] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR5`" ] pub enum RR5W { # [ doc = "Disable RR[5] register" ] DISABLED , # [ doc = "Enable RR[5] register" ] ENABLED } impl RR5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR5W :: DISABLED => false , RR5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR5W < 'a > { w : & 'a mut W , } impl < 'a > _RR5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[5] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR5W :: DISABLED ) } # [ doc = "Enable RR[5] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR6`" ] pub enum RR6W { # [ doc = "Disable RR[6] register" ] DISABLED , # [ doc = "Enable RR[6] register" ] ENABLED } impl RR6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR6W :: DISABLED => false , RR6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR6W < 'a > { w : & 'a mut W , } impl < 'a > _RR6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[6] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR6W :: DISABLED ) } # [ doc = "Enable RR[6] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RR7`" ] pub enum RR7W { # [ doc = "Disable RR[7] register" ] DISABLED , # [ doc = "Enable RR[7] register" ] ENABLED } impl RR7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RR7W :: DISABLED => false , RR7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RR7W < 'a > { w : & 'a mut W , } impl < 'a > _RR7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RR7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable RR[7] register" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RR7W :: DISABLED ) } # [ doc = "Enable RR[7] register" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RR7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable RR[0] register" ] # [ inline ] pub fn rr0 ( & self ) -> RR0R { RR0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable RR[1] register" ] # [ inline ] pub fn rr1 ( & self ) -> RR1R { RR1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable RR[2] register" ] # [ inline ] pub fn rr2 ( & self ) -> RR2R { RR2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable RR[3] register" ] # [ inline ] pub fn rr3 ( & self ) -> RR3R { RR3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable RR[4] register" ] # [ inline ] pub fn rr4 ( & self ) -> RR4R { RR4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable RR[5] register" ] # [ inline ] pub fn rr5 ( & self ) -> RR5R { RR5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable RR[6] register" ] # [ inline ] pub fn rr6 ( & self ) -> RR6R { RR6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable RR[7] register" ] # [ inline ] pub fn rr7 ( & self ) -> RR7R { RR7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable RR[0] register" ] # [ inline ] pub fn rr0 ( & mut self ) -> _RR0W { _RR0W { w : self } } # [ doc = "Bit 1 - Enable or disable RR[1] register" ] # [ inline ] pub fn rr1 ( & mut self ) -> _RR1W { _RR1W { w : self } } # [ doc = "Bit 2 - Enable or disable RR[2] register" ] # [ inline ] pub fn rr2 ( & mut self ) -> _RR2W { _RR2W { w : self } } # [ doc = "Bit 3 - Enable or disable RR[3] register" ] # [ inline ] pub fn rr3 ( & mut self ) -> _RR3W { _RR3W { w : self } } # [ doc = "Bit 4 - Enable or disable RR[4] register" ] # [ inline ] pub fn rr4 ( & mut self ) -> _RR4W { _RR4W { w : self } } # [ doc = "Bit 5 - Enable or disable RR[5] register" ] # [ inline ] pub fn rr5 ( & mut self ) -> _RR5W { _RR5W { w : self } } # [ doc = "Bit 6 - Enable or disable RR[6] register" ] # [ inline ] pub fn rr6 ( & mut self ) -> _RR6W { _RR6W { w : self } } # [ doc = "Bit 7 - Enable or disable RR[7] register" ] # [ inline ] pub fn rr7 ( & mut self ) -> _RR7W { _RR7W { w : self } } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SLEEP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SLEEPR { # [ doc = "Pause watchdog while the CPU is sleeping" ] PAUSE , # [ doc = "Keep the watchdog running while the CPU is sleeping" ] RUN } impl SLEEPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SLEEPR :: PAUSE => false , SLEEPR :: RUN => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SLEEPR { match value { false => SLEEPR :: PAUSE , true => SLEEPR :: RUN , } } # [ doc = "Checks if the value of the field is `PAUSE`" ] # [ inline ] pub fn is_pause ( & self ) -> bool { * self == SLEEPR :: PAUSE } # [ doc = "Checks if the value of the field is `RUN`" ] # [ inline ] pub fn is_run ( & self ) -> bool { * self == SLEEPR :: RUN } } # [ doc = "Possible values of the field `HALT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HALTR { # [ doc = "Pause watchdog while the CPU is halted by the debugger" ] PAUSE , # [ doc = "Keep the watchdog running while the CPU is halted by the debugger" ] RUN } impl HALTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HALTR :: PAUSE => false , HALTR :: RUN => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HALTR { match value { false => HALTR :: PAUSE , true => HALTR :: RUN , } } # [ doc = "Checks if the value of the field is `PAUSE`" ] # [ inline ] pub fn is_pause ( & self ) -> bool { * self == HALTR :: PAUSE } # [ doc = "Checks if the value of the field is `RUN`" ] # [ inline ] pub fn is_run ( & self ) -> bool { * self == HALTR :: RUN } } # [ doc = "Values that can be written to the field `SLEEP`" ] pub enum SLEEPW { # [ doc = "Pause watchdog while the CPU is sleeping" ] PAUSE , # [ doc = "Keep the watchdog running while the CPU is sleeping" ] RUN } impl SLEEPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SLEEPW :: PAUSE => false , SLEEPW :: RUN => true } } } # [ doc = r" Proxy" ] pub struct _SLEEPW < 'a > { w : & 'a mut W , } impl < 'a > _SLEEPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SLEEPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pause watchdog while the CPU is sleeping" ] # [ inline ] pub fn pause ( self ) -> & 'a mut W { self . variant ( SLEEPW :: PAUSE ) } # [ doc = "Keep the watchdog running while the CPU is sleeping" ] # [ inline ] pub fn run ( self ) -> & 'a mut W { self . variant ( SLEEPW :: RUN ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `HALT`" ] pub enum HALTW { # [ doc = "Pause watchdog while the CPU is halted by the debugger" ] PAUSE , # [ doc = "Keep the watchdog running while the CPU is halted by the debugger" ] RUN } impl HALTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HALTW :: PAUSE => false , HALTW :: RUN => true } } } # [ doc = r" Proxy" ] pub struct _HALTW < 'a > { w : & 'a mut W , } impl < 'a > _HALTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HALTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pause watchdog while the CPU is halted by the debugger" ] # [ inline ] pub fn pause ( self ) -> & 'a mut W { self . variant ( HALTW :: PAUSE ) } # [ doc = "Keep the watchdog running while the CPU is halted by the debugger" ] # [ inline ] pub fn run ( self ) -> & 'a mut W { self . variant ( HALTW :: RUN ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping" ] # [ inline ] pub fn sleep ( & self ) -> SLEEPR { SLEEPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger" ] # [ inline ] pub fn halt ( & self ) -> HALTR { HALTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x01 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping" ] # [ inline ] pub fn sleep ( & mut self ) -> _SLEEPW { _SLEEPW { w : self } } # [ doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger" ] # [ inline ] pub fn halt ( & mut self ) -> _HALTW { _HALTW { w : self } } } } # [ doc = "Description collection[0]: Reload request 0" ] pub struct RR { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Reload request 0" ] pub mod rr { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: RR { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } # [ doc = "Values that can be written to the field `RR`" ] pub enum RRW { # [ doc = "Value to request a reload of the watchdog timer" ] RELOAD } impl RRW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { RRW :: RELOAD => 1850885685 } } } # [ doc = r" Proxy" ] pub struct _RRW < 'a > { w : & 'a mut W , } impl < 'a > _RRW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RRW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Value to request a reload of the watchdog timer" ] # [ inline ] pub fn reload ( self ) -> & 'a mut W { self . variant ( RRW :: RELOAD ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Reload request register" ] # [ inline ] pub fn rr ( & mut self ) -> _RRW { _RRW { w : self } } } } } # [ doc = "Real time counter 1" ] pub struct RTC1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for RTC1 { } impl RTC1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const rtc0 :: RegisterBlock { 0x4001_1000 as * const _ } } impl Deref for RTC1 { type Target = rtc0 :: RegisterBlock ; fn deref ( & self ) -> & rtc0 :: RegisterBlock { unsafe { & * RTC1 :: ptr ( ) } } } # [ doc = "Quadrature Decoder" ] pub struct QDEC { _marker : PhantomData < * const ( ) > } unsafe impl Send for QDEC { } impl QDEC { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const qdec :: RegisterBlock { 0x4001_2000 as * const _ } } impl Deref for QDEC { type Target = qdec :: RegisterBlock ; fn deref ( & self ) -> & qdec :: RegisterBlock { unsafe { & * QDEC :: ptr ( ) } } } # [ doc = "Quadrature Decoder" ] pub mod qdec { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Task starting the quadrature decoder" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Task stopping the quadrature decoder" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Read and clear ACC and ACCDBL" ] pub tasks_readclracc : TASKS_READCLRACC , # [ doc = "0x0c - Read and clear ACC" ] pub tasks_rdclracc : TASKS_RDCLRACC , # [ doc = "0x10 - Read and clear ACCDBL" ] pub tasks_rdclrdbl : TASKS_RDCLRDBL , _reserved0 : [ u8 ; 236usize ] , # [ doc = "0x100 - Event being generated for every new sample value written to the SAMPLE register" ] pub events_samplerdy : EVENTS_SAMPLERDY , # [ doc = "0x104 - Non-null report ready" ] pub events_reportrdy : EVENTS_REPORTRDY , # [ doc = "0x108 - ACC or ACCDBL register overflow" ] pub events_accof : EVENTS_ACCOF , # [ doc = "0x10c - Double displacement(s) detected" ] pub events_dblrdy : EVENTS_DBLRDY , # [ doc = "0x110 - QDEC has been stopped" ] pub events_stopped : EVENTS_STOPPED , _reserved1 : [ u8 ; 236usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved2 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 500usize ] , # [ doc = "0x500 - Enable the quadrature decoder" ] pub enable : ENABLE , # [ doc = "0x504 - LED output pin polarity" ] pub ledpol : LEDPOL , # [ doc = "0x508 - Sample period" ] pub sampleper : SAMPLEPER , # [ doc = "0x50c - Motion sample value" ] pub sample : SAMPLE , # [ doc = "0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated" ] pub reportper : REPORTPER , # [ doc = "0x514 - Register accumulating the valid transitions" ] pub acc : ACC , # [ doc = "0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task" ] pub accread : ACCREAD , _reserved4 : [ u8 ; 12usize ] , # [ doc = "0x528 - Enable input debounce filters" ] pub dbfen : DBFEN , _reserved5 : [ u8 ; 20usize ] , # [ doc = "0x540 - Time period the LED is switched ON prior to sampling" ] pub ledpre : LEDPRE , # [ doc = "0x544 - Register accumulating the number of detected double transitions" ] pub accdbl : ACCDBL , # [ doc = "0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task" ] pub accdblread : ACCDBLREAD , } # [ doc = "Task starting the quadrature decoder" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Task starting the quadrature decoder" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Task stopping the quadrature decoder" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Task stopping the quadrature decoder" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Read and clear ACC and ACCDBL" ] pub struct TASKS_READCLRACC { register : VolatileCell < u32 > } # [ doc = "Read and clear ACC and ACCDBL" ] pub mod tasks_readclracc { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_READCLRACC { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Read and clear ACC" ] pub struct TASKS_RDCLRACC { register : VolatileCell < u32 > } # [ doc = "Read and clear ACC" ] pub mod tasks_rdclracc { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RDCLRACC { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Read and clear ACCDBL" ] pub struct TASKS_RDCLRDBL { register : VolatileCell < u32 > } # [ doc = "Read and clear ACCDBL" ] pub mod tasks_rdclrdbl { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_RDCLRDBL { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Event being generated for every new sample value written to the SAMPLE register" ] pub struct EVENTS_SAMPLERDY { register : VolatileCell < u32 > } # [ doc = "Event being generated for every new sample value written to the SAMPLE register" ] pub mod events_samplerdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SAMPLERDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Non-null report ready" ] pub struct EVENTS_REPORTRDY { register : VolatileCell < u32 > } # [ doc = "Non-null report ready" ] pub mod events_reportrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_REPORTRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "ACC or ACCDBL register overflow" ] pub struct EVENTS_ACCOF { register : VolatileCell < u32 > } # [ doc = "ACC or ACCDBL register overflow" ] pub mod events_accof { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_ACCOF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Double displacement(s) detected" ] pub struct EVENTS_DBLRDY { register : VolatileCell < u32 > } # [ doc = "Double displacement(s) detected" ] pub mod events_dblrdy { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DBLRDY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "QDEC has been stopped" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "QDEC has been stopped" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REPORTRDY_READCLRACC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTRDY_READCLRACCR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_READCLRACCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REPORTRDY_READCLRACCR :: DISABLED => false , REPORTRDY_READCLRACCR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REPORTRDY_READCLRACCR { match value { false => REPORTRDY_READCLRACCR :: DISABLED , true => REPORTRDY_READCLRACCR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REPORTRDY_READCLRACCR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REPORTRDY_READCLRACCR :: ENABLED } } # [ doc = "Possible values of the field `SAMPLERDY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAMPLERDY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SAMPLERDY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SAMPLERDY_STOPR :: DISABLED => false , SAMPLERDY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SAMPLERDY_STOPR { match value { false => SAMPLERDY_STOPR :: DISABLED , true => SAMPLERDY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SAMPLERDY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SAMPLERDY_STOPR :: ENABLED } } # [ doc = "Possible values of the field `REPORTRDY_RDCLRACC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTRDY_RDCLRACCR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_RDCLRACCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REPORTRDY_RDCLRACCR :: DISABLED => false , REPORTRDY_RDCLRACCR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REPORTRDY_RDCLRACCR { match value { false => REPORTRDY_RDCLRACCR :: DISABLED , true => REPORTRDY_RDCLRACCR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REPORTRDY_RDCLRACCR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REPORTRDY_RDCLRACCR :: ENABLED } } # [ doc = "Possible values of the field `REPORTRDY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTRDY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REPORTRDY_STOPR :: DISABLED => false , REPORTRDY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REPORTRDY_STOPR { match value { false => REPORTRDY_STOPR :: DISABLED , true => REPORTRDY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REPORTRDY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REPORTRDY_STOPR :: ENABLED } } # [ doc = "Possible values of the field `DBLRDY_RDCLRDBL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBLRDY_RDCLRDBLR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DBLRDY_RDCLRDBLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DBLRDY_RDCLRDBLR :: DISABLED => false , DBLRDY_RDCLRDBLR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DBLRDY_RDCLRDBLR { match value { false => DBLRDY_RDCLRDBLR :: DISABLED , true => DBLRDY_RDCLRDBLR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DBLRDY_RDCLRDBLR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DBLRDY_RDCLRDBLR :: ENABLED } } # [ doc = "Possible values of the field `DBLRDY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBLRDY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DBLRDY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DBLRDY_STOPR :: DISABLED => false , DBLRDY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DBLRDY_STOPR { match value { false => DBLRDY_STOPR :: DISABLED , true => DBLRDY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DBLRDY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DBLRDY_STOPR :: ENABLED } } # [ doc = "Possible values of the field `SAMPLERDY_READCLRACC`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAMPLERDY_READCLRACCR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SAMPLERDY_READCLRACCR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SAMPLERDY_READCLRACCR :: DISABLED => false , SAMPLERDY_READCLRACCR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SAMPLERDY_READCLRACCR { match value { false => SAMPLERDY_READCLRACCR :: DISABLED , true => SAMPLERDY_READCLRACCR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SAMPLERDY_READCLRACCR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SAMPLERDY_READCLRACCR :: ENABLED } } # [ doc = "Values that can be written to the field `REPORTRDY_READCLRACC`" ] pub enum REPORTRDY_READCLRACCW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_READCLRACCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REPORTRDY_READCLRACCW :: DISABLED => false , REPORTRDY_READCLRACCW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REPORTRDY_READCLRACCW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTRDY_READCLRACCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTRDY_READCLRACCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_READCLRACCW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_READCLRACCW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SAMPLERDY_STOP`" ] pub enum SAMPLERDY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SAMPLERDY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SAMPLERDY_STOPW :: DISABLED => false , SAMPLERDY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SAMPLERDY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _SAMPLERDY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SAMPLERDY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SAMPLERDY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SAMPLERDY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REPORTRDY_RDCLRACC`" ] pub enum REPORTRDY_RDCLRACCW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_RDCLRACCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REPORTRDY_RDCLRACCW :: DISABLED => false , REPORTRDY_RDCLRACCW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REPORTRDY_RDCLRACCW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTRDY_RDCLRACCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTRDY_RDCLRACCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_RDCLRACCW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_RDCLRACCW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REPORTRDY_STOP`" ] pub enum REPORTRDY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl REPORTRDY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REPORTRDY_STOPW :: DISABLED => false , REPORTRDY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REPORTRDY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTRDY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTRDY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REPORTRDY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DBLRDY_RDCLRDBL`" ] pub enum DBLRDY_RDCLRDBLW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DBLRDY_RDCLRDBLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DBLRDY_RDCLRDBLW :: DISABLED => false , DBLRDY_RDCLRDBLW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DBLRDY_RDCLRDBLW < 'a > { w : & 'a mut W , } impl < 'a > _DBLRDY_RDCLRDBLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DBLRDY_RDCLRDBLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DBLRDY_RDCLRDBLW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DBLRDY_RDCLRDBLW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DBLRDY_STOP`" ] pub enum DBLRDY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DBLRDY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DBLRDY_STOPW :: DISABLED => false , DBLRDY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DBLRDY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _DBLRDY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DBLRDY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DBLRDY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DBLRDY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SAMPLERDY_READCLRACC`" ] pub enum SAMPLERDY_READCLRACCW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SAMPLERDY_READCLRACCW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SAMPLERDY_READCLRACCW :: DISABLED => false , SAMPLERDY_READCLRACCW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SAMPLERDY_READCLRACCW < 'a > { w : & 'a mut W , } impl < 'a > _SAMPLERDY_READCLRACCW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SAMPLERDY_READCLRACCW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SAMPLERDY_READCLRACCW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SAMPLERDY_READCLRACCW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between REPORTRDY event and READCLRACC task" ] # [ inline ] pub fn reportrdy_readclracc ( & self ) -> REPORTRDY_READCLRACCR { REPORTRDY_READCLRACCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between SAMPLERDY event and STOP task" ] # [ inline ] pub fn samplerdy_stop ( & self ) -> SAMPLERDY_STOPR { SAMPLERDY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between REPORTRDY event and RDCLRACC task" ] # [ inline ] pub fn reportrdy_rdclracc ( & self ) -> REPORTRDY_RDCLRACCR { REPORTRDY_RDCLRACCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between REPORTRDY event and STOP task" ] # [ inline ] pub fn reportrdy_stop ( & self ) -> REPORTRDY_STOPR { REPORTRDY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between DBLRDY event and RDCLRDBL task" ] # [ inline ] pub fn dblrdy_rdclrdbl ( & self ) -> DBLRDY_RDCLRDBLR { DBLRDY_RDCLRDBLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Shortcut between DBLRDY event and STOP task" ] # [ inline ] pub fn dblrdy_stop ( & self ) -> DBLRDY_STOPR { DBLRDY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Shortcut between SAMPLERDY event and READCLRACC task" ] # [ inline ] pub fn samplerdy_readclracc ( & self ) -> SAMPLERDY_READCLRACCR { SAMPLERDY_READCLRACCR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between REPORTRDY event and READCLRACC task" ] # [ inline ] pub fn reportrdy_readclracc ( & mut self ) -> _REPORTRDY_READCLRACCW { _REPORTRDY_READCLRACCW { w : self } } # [ doc = "Bit 1 - Shortcut between SAMPLERDY event and STOP task" ] # [ inline ] pub fn samplerdy_stop ( & mut self ) -> _SAMPLERDY_STOPW { _SAMPLERDY_STOPW { w : self } } # [ doc = "Bit 2 - Shortcut between REPORTRDY event and RDCLRACC task" ] # [ inline ] pub fn reportrdy_rdclracc ( & mut self ) -> _REPORTRDY_RDCLRACCW { _REPORTRDY_RDCLRACCW { w : self } } # [ doc = "Bit 3 - Shortcut between REPORTRDY event and STOP task" ] # [ inline ] pub fn reportrdy_stop ( & mut self ) -> _REPORTRDY_STOPW { _REPORTRDY_STOPW { w : self } } # [ doc = "Bit 4 - Shortcut between DBLRDY event and RDCLRDBL task" ] # [ inline ] pub fn dblrdy_rdclrdbl ( & mut self ) -> _DBLRDY_RDCLRDBLW { _DBLRDY_RDCLRDBLW { w : self } } # [ doc = "Bit 5 - Shortcut between DBLRDY event and STOP task" ] # [ inline ] pub fn dblrdy_stop ( & mut self ) -> _DBLRDY_STOPW { _DBLRDY_STOPW { w : self } } # [ doc = "Bit 6 - Shortcut between SAMPLERDY event and READCLRACC task" ] # [ inline ] pub fn samplerdy_readclracc ( & mut self ) -> _SAMPLERDY_READCLRACCW { _SAMPLERDY_READCLRACCW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SAMPLERDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAMPLERDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SAMPLERDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SAMPLERDYR :: DISABLED => false , SAMPLERDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SAMPLERDYR { match value { false => SAMPLERDYR :: DISABLED , true => SAMPLERDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SAMPLERDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SAMPLERDYR :: ENABLED } } # [ doc = "Possible values of the field `REPORTRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REPORTRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REPORTRDYR :: DISABLED => false , REPORTRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REPORTRDYR { match value { false => REPORTRDYR :: DISABLED , true => REPORTRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REPORTRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REPORTRDYR :: ENABLED } } # [ doc = "Possible values of the field `ACCOF`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACCOFR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ACCOFR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ACCOFR :: DISABLED => false , ACCOFR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ACCOFR { match value { false => ACCOFR :: DISABLED , true => ACCOFR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ACCOFR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ACCOFR :: ENABLED } } # [ doc = "Possible values of the field `DBLRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBLRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DBLRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DBLRDYR :: DISABLED => false , DBLRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DBLRDYR { match value { false => DBLRDYR :: DISABLED , true => DBLRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DBLRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DBLRDYR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Values that can be written to the field `SAMPLERDY`" ] pub enum SAMPLERDYW { # [ doc = "Enable" ] SET } impl SAMPLERDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SAMPLERDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SAMPLERDYW < 'a > { w : & 'a mut W , } impl < 'a > _SAMPLERDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SAMPLERDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SAMPLERDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REPORTRDY`" ] pub enum REPORTRDYW { # [ doc = "Enable" ] SET } impl REPORTRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REPORTRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REPORTRDYW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REPORTRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ACCOF`" ] pub enum ACCOFW { # [ doc = "Enable" ] SET } impl ACCOFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ACCOFW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ACCOFW < 'a > { w : & 'a mut W , } impl < 'a > _ACCOFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ACCOFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ACCOFW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DBLRDY`" ] pub enum DBLRDYW { # [ doc = "Enable" ] SET } impl DBLRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DBLRDYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DBLRDYW < 'a > { w : & 'a mut W , } impl < 'a > _DBLRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DBLRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DBLRDYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for SAMPLERDY event" ] # [ inline ] pub fn samplerdy ( & self ) -> SAMPLERDYR { SAMPLERDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for REPORTRDY event" ] # [ inline ] pub fn reportrdy ( & self ) -> REPORTRDYR { REPORTRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for ACCOF event" ] # [ inline ] pub fn accof ( & self ) -> ACCOFR { ACCOFR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for DBLRDY event" ] # [ inline ] pub fn dblrdy ( & self ) -> DBLRDYR { DBLRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for SAMPLERDY event" ] # [ inline ] pub fn samplerdy ( & mut self ) -> _SAMPLERDYW { _SAMPLERDYW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for REPORTRDY event" ] # [ inline ] pub fn reportrdy ( & mut self ) -> _REPORTRDYW { _REPORTRDYW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for ACCOF event" ] # [ inline ] pub fn accof ( & mut self ) -> _ACCOFW { _ACCOFW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for DBLRDY event" ] # [ inline ] pub fn dblrdy ( & mut self ) -> _DBLRDYW { _DBLRDYW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SAMPLERDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAMPLERDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SAMPLERDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SAMPLERDYR :: DISABLED => false , SAMPLERDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SAMPLERDYR { match value { false => SAMPLERDYR :: DISABLED , true => SAMPLERDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SAMPLERDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SAMPLERDYR :: ENABLED } } # [ doc = "Possible values of the field `REPORTRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REPORTRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REPORTRDYR :: DISABLED => false , REPORTRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REPORTRDYR { match value { false => REPORTRDYR :: DISABLED , true => REPORTRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REPORTRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REPORTRDYR :: ENABLED } } # [ doc = "Possible values of the field `ACCOF`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ACCOFR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ACCOFR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ACCOFR :: DISABLED => false , ACCOFR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ACCOFR { match value { false => ACCOFR :: DISABLED , true => ACCOFR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ACCOFR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ACCOFR :: ENABLED } } # [ doc = "Possible values of the field `DBLRDY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBLRDYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DBLRDYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DBLRDYR :: DISABLED => false , DBLRDYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DBLRDYR { match value { false => DBLRDYR :: DISABLED , true => DBLRDYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DBLRDYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DBLRDYR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Values that can be written to the field `SAMPLERDY`" ] pub enum SAMPLERDYW { # [ doc = "Disable" ] CLEAR } impl SAMPLERDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SAMPLERDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SAMPLERDYW < 'a > { w : & 'a mut W , } impl < 'a > _SAMPLERDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SAMPLERDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SAMPLERDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REPORTRDY`" ] pub enum REPORTRDYW { # [ doc = "Disable" ] CLEAR } impl REPORTRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REPORTRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REPORTRDYW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REPORTRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `ACCOF`" ] pub enum ACCOFW { # [ doc = "Disable" ] CLEAR } impl ACCOFW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ACCOFW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ACCOFW < 'a > { w : & 'a mut W , } impl < 'a > _ACCOFW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ACCOFW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ACCOFW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DBLRDY`" ] pub enum DBLRDYW { # [ doc = "Disable" ] CLEAR } impl DBLRDYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DBLRDYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DBLRDYW < 'a > { w : & 'a mut W , } impl < 'a > _DBLRDYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DBLRDYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DBLRDYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for SAMPLERDY event" ] # [ inline ] pub fn samplerdy ( & self ) -> SAMPLERDYR { SAMPLERDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for REPORTRDY event" ] # [ inline ] pub fn reportrdy ( & self ) -> REPORTRDYR { REPORTRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for ACCOF event" ] # [ inline ] pub fn accof ( & self ) -> ACCOFR { ACCOFR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for DBLRDY event" ] # [ inline ] pub fn dblrdy ( & self ) -> DBLRDYR { DBLRDYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for SAMPLERDY event" ] # [ inline ] pub fn samplerdy ( & mut self ) -> _SAMPLERDYW { _SAMPLERDYW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for REPORTRDY event" ] # [ inline ] pub fn reportrdy ( & mut self ) -> _REPORTRDYW { _REPORTRDYW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for ACCOF event" ] # [ inline ] pub fn accof ( & mut self ) -> _ACCOFW { _ACCOFW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for DBLRDY event" ] # [ inline ] pub fn dblrdy ( & mut self ) -> _DBLRDYW { _DBLRDYW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } } } # [ doc = "Enable the quadrature decoder" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable the quadrature decoder" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENABLER :: DISABLED => false , ENABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENABLER { match value { false => ENABLER :: DISABLED , true => ENABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENABLEW :: DISABLED => false , ENABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable the quadrature decoder" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable the quadrature decoder" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "LED output pin polarity" ] pub struct LEDPOL { register : VolatileCell < u32 > } # [ doc = "LED output pin polarity" ] pub mod ledpol { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: LEDPOL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `LEDPOL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LEDPOLR { # [ doc = "Led active on output pin low" ] ACTIVELOW , # [ doc = "Led active on output pin high" ] ACTIVEHIGH } impl LEDPOLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LEDPOLR :: ACTIVELOW => false , LEDPOLR :: ACTIVEHIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LEDPOLR { match value { false => LEDPOLR :: ACTIVELOW , true => LEDPOLR :: ACTIVEHIGH , } } # [ doc = "Checks if the value of the field is `ACTIVELOW`" ] # [ inline ] pub fn is_active_low ( & self ) -> bool { * self == LEDPOLR :: ACTIVELOW } # [ doc = "Checks if the value of the field is `ACTIVEHIGH`" ] # [ inline ] pub fn is_active_high ( & self ) -> bool { * self == LEDPOLR :: ACTIVEHIGH } } # [ doc = "Values that can be written to the field `LEDPOL`" ] pub enum LEDPOLW { # [ doc = "Led active on output pin low" ] ACTIVELOW , # [ doc = "Led active on output pin high" ] ACTIVEHIGH } impl LEDPOLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LEDPOLW :: ACTIVELOW => false , LEDPOLW :: ACTIVEHIGH => true } } } # [ doc = r" Proxy" ] pub struct _LEDPOLW < 'a > { w : & 'a mut W , } impl < 'a > _LEDPOLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LEDPOLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Led active on output pin low" ] # [ inline ] pub fn active_low ( self ) -> & 'a mut W { self . variant ( LEDPOLW :: ACTIVELOW ) } # [ doc = "Led active on output pin high" ] # [ inline ] pub fn active_high ( self ) -> & 'a mut W { self . variant ( LEDPOLW :: ACTIVEHIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - LED output pin polarity" ] # [ inline ] pub fn ledpol ( & self ) -> LEDPOLR { LEDPOLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - LED output pin polarity" ] # [ inline ] pub fn ledpol ( & mut self ) -> _LEDPOLW { _LEDPOLW { w : self } } } } # [ doc = "Sample period" ] pub struct SAMPLEPER { register : VolatileCell < u32 > } # [ doc = "Sample period" ] pub mod sampleper { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SAMPLEPER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SAMPLEPER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SAMPLEPERR { # [ doc = "128 us" ] _128US , # [ doc = "256 us" ] _256US , # [ doc = "512 us" ] _512US , # [ doc = "1024 us" ] _1024US , # [ doc = "2048 us" ] _2048US , # [ doc = "4096 us" ] _4096US , # [ doc = "8192 us" ] _8192US , # [ doc = "16384 us" ] _16384US , # [ doc = "32768 us" ] _32MS , # [ doc = "65536 us" ] _65MS , # [ doc = "131072 us" ] _131MS , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SAMPLEPERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SAMPLEPERR :: _128US => 0 , SAMPLEPERR :: _256US => 0x01 , SAMPLEPERR :: _512US => 0x02 , SAMPLEPERR :: _1024US => 0x03 , SAMPLEPERR :: _2048US => 0x04 , SAMPLEPERR :: _4096US => 0x05 , SAMPLEPERR :: _8192US => 0x06 , SAMPLEPERR :: _16384US => 0x07 , SAMPLEPERR :: _32MS => 0x08 , SAMPLEPERR :: _65MS => 0x09 , SAMPLEPERR :: _131MS => 0x0a , SAMPLEPERR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SAMPLEPERR { match value { 0 => SAMPLEPERR :: _128US , 1 => SAMPLEPERR :: _256US , 2 => SAMPLEPERR :: _512US , 3 => SAMPLEPERR :: _1024US , 4 => SAMPLEPERR :: _2048US , 5 => SAMPLEPERR :: _4096US , 6 => SAMPLEPERR :: _8192US , 7 => SAMPLEPERR :: _16384US , 8 => SAMPLEPERR :: _32MS , 9 => SAMPLEPERR :: _65MS , 10 => SAMPLEPERR :: _131MS , i => SAMPLEPERR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `_128US`" ] # [ inline ] pub fn is_128us ( & self ) -> bool { * self == SAMPLEPERR :: _128US } # [ doc = "Checks if the value of the field is `_256US`" ] # [ inline ] pub fn is_256us ( & self ) -> bool { * self == SAMPLEPERR :: _256US } # [ doc = "Checks if the value of the field is `_512US`" ] # [ inline ] pub fn is_512us ( & self ) -> bool { * self == SAMPLEPERR :: _512US } # [ doc = "Checks if the value of the field is `_1024US`" ] # [ inline ] pub fn is_1024us ( & self ) -> bool { * self == SAMPLEPERR :: _1024US } # [ doc = "Checks if the value of the field is `_2048US`" ] # [ inline ] pub fn is_2048us ( & self ) -> bool { * self == SAMPLEPERR :: _2048US } # [ doc = "Checks if the value of the field is `_4096US`" ] # [ inline ] pub fn is_4096us ( & self ) -> bool { * self == SAMPLEPERR :: _4096US } # [ doc = "Checks if the value of the field is `_8192US`" ] # [ inline ] pub fn is_8192us ( & self ) -> bool { * self == SAMPLEPERR :: _8192US } # [ doc = "Checks if the value of the field is `_16384US`" ] # [ inline ] pub fn is_16384us ( & self ) -> bool { * self == SAMPLEPERR :: _16384US } # [ doc = "Checks if the value of the field is `_32MS`" ] # [ inline ] pub fn is_32ms ( & self ) -> bool { * self == SAMPLEPERR :: _32MS } # [ doc = "Checks if the value of the field is `_65MS`" ] # [ inline ] pub fn is_65ms ( & self ) -> bool { * self == SAMPLEPERR :: _65MS } # [ doc = "Checks if the value of the field is `_131MS`" ] # [ inline ] pub fn is_131ms ( & self ) -> bool { * self == SAMPLEPERR :: _131MS } } # [ doc = "Values that can be written to the field `SAMPLEPER`" ] pub enum SAMPLEPERW { # [ doc = "128 us" ] _128US , # [ doc = "256 us" ] _256US , # [ doc = "512 us" ] _512US , # [ doc = "1024 us" ] _1024US , # [ doc = "2048 us" ] _2048US , # [ doc = "4096 us" ] _4096US , # [ doc = "8192 us" ] _8192US , # [ doc = "16384 us" ] _16384US , # [ doc = "32768 us" ] _32MS , # [ doc = "65536 us" ] _65MS , # [ doc = "131072 us" ] _131MS } impl SAMPLEPERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { SAMPLEPERW :: _128US => 0 , SAMPLEPERW :: _256US => 1 , SAMPLEPERW :: _512US => 2 , SAMPLEPERW :: _1024US => 3 , SAMPLEPERW :: _2048US => 4 , SAMPLEPERW :: _4096US => 5 , SAMPLEPERW :: _8192US => 6 , SAMPLEPERW :: _16384US => 7 , SAMPLEPERW :: _32MS => 8 , SAMPLEPERW :: _65MS => 9 , SAMPLEPERW :: _131MS => 10 } } } # [ doc = r" Proxy" ] pub struct _SAMPLEPERW < 'a > { w : & 'a mut W , } impl < 'a > _SAMPLEPERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SAMPLEPERW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "128 us" ] # [ inline ] pub fn _128us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _128US ) } # [ doc = "256 us" ] # [ inline ] pub fn _256us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _256US ) } # [ doc = "512 us" ] # [ inline ] pub fn _512us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _512US ) } # [ doc = "1024 us" ] # [ inline ] pub fn _1024us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _1024US ) } # [ doc = "2048 us" ] # [ inline ] pub fn _2048us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _2048US ) } # [ doc = "4096 us" ] # [ inline ] pub fn _4096us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _4096US ) } # [ doc = "8192 us" ] # [ inline ] pub fn _8192us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _8192US ) } # [ doc = "16384 us" ] # [ inline ] pub fn _16384us ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _16384US ) } # [ doc = "32768 us" ] # [ inline ] pub fn _32ms ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _32MS ) } # [ doc = "65536 us" ] # [ inline ] pub fn _65ms ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _65MS ) } # [ doc = "131072 us" ] # [ inline ] pub fn _131ms ( self ) -> & 'a mut W { self . variant ( SAMPLEPERW :: _131MS ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample" ] # [ inline ] pub fn sampleper ( & self ) -> SAMPLEPERR { SAMPLEPERR :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample" ] # [ inline ] pub fn sampleper ( & mut self ) -> _SAMPLEPERW { _SAMPLEPERW { w : self } } } } # [ doc = "Motion sample value" ] pub struct SAMPLE { register : VolatileCell < u32 > } # [ doc = "Motion sample value" ] pub mod sample { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: SAMPLE { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct SAMPLER { bits : u32 , } impl SAMPLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Last motion sample" ] # [ inline ] pub fn sample ( & self ) -> SAMPLER { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; SAMPLER { bits } } } } # [ doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated" ] pub struct REPORTPER { register : VolatileCell < u32 > } # [ doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated" ] pub mod reportper { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REPORTPER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REPORTPER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REPORTPERR { # [ doc = "10 samples / report" ] _10SMPL , # [ doc = "40 samples / report" ] _40SMPL , # [ doc = "80 samples / report" ] _80SMPL , # [ doc = "120 samples / report" ] _120SMPL , # [ doc = "160 samples / report" ] _160SMPL , # [ doc = "200 samples / report" ] _200SMPL , # [ doc = "240 samples / report" ] _240SMPL , # [ doc = "280 samples / report" ] _280SMPL , # [ doc = "1 sample / report" ] _1SMPL , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl REPORTPERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { REPORTPERR :: _10SMPL => 0 , REPORTPERR :: _40SMPL => 0x01 , REPORTPERR :: _80SMPL => 0x02 , REPORTPERR :: _120SMPL => 0x03 , REPORTPERR :: _160SMPL => 0x04 , REPORTPERR :: _200SMPL => 0x05 , REPORTPERR :: _240SMPL => 0x06 , REPORTPERR :: _280SMPL => 0x07 , REPORTPERR :: _1SMPL => 0x08 , REPORTPERR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> REPORTPERR { match value { 0 => REPORTPERR :: _10SMPL , 1 => REPORTPERR :: _40SMPL , 2 => REPORTPERR :: _80SMPL , 3 => REPORTPERR :: _120SMPL , 4 => REPORTPERR :: _160SMPL , 5 => REPORTPERR :: _200SMPL , 6 => REPORTPERR :: _240SMPL , 7 => REPORTPERR :: _280SMPL , 8 => REPORTPERR :: _1SMPL , i => REPORTPERR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `_10SMPL`" ] # [ inline ] pub fn is_10smpl ( & self ) -> bool { * self == REPORTPERR :: _10SMPL } # [ doc = "Checks if the value of the field is `_40SMPL`" ] # [ inline ] pub fn is_40smpl ( & self ) -> bool { * self == REPORTPERR :: _40SMPL } # [ doc = "Checks if the value of the field is `_80SMPL`" ] # [ inline ] pub fn is_80smpl ( & self ) -> bool { * self == REPORTPERR :: _80SMPL } # [ doc = "Checks if the value of the field is `_120SMPL`" ] # [ inline ] pub fn is_120smpl ( & self ) -> bool { * self == REPORTPERR :: _120SMPL } # [ doc = "Checks if the value of the field is `_160SMPL`" ] # [ inline ] pub fn is_160smpl ( & self ) -> bool { * self == REPORTPERR :: _160SMPL } # [ doc = "Checks if the value of the field is `_200SMPL`" ] # [ inline ] pub fn is_200smpl ( & self ) -> bool { * self == REPORTPERR :: _200SMPL } # [ doc = "Checks if the value of the field is `_240SMPL`" ] # [ inline ] pub fn is_240smpl ( & self ) -> bool { * self == REPORTPERR :: _240SMPL } # [ doc = "Checks if the value of the field is `_280SMPL`" ] # [ inline ] pub fn is_280smpl ( & self ) -> bool { * self == REPORTPERR :: _280SMPL } # [ doc = "Checks if the value of the field is `_1SMPL`" ] # [ inline ] pub fn is_1smpl ( & self ) -> bool { * self == REPORTPERR :: _1SMPL } } # [ doc = "Values that can be written to the field `REPORTPER`" ] pub enum REPORTPERW { # [ doc = "10 samples / report" ] _10SMPL , # [ doc = "40 samples / report" ] _40SMPL , # [ doc = "80 samples / report" ] _80SMPL , # [ doc = "120 samples / report" ] _120SMPL , # [ doc = "160 samples / report" ] _160SMPL , # [ doc = "200 samples / report" ] _200SMPL , # [ doc = "240 samples / report" ] _240SMPL , # [ doc = "280 samples / report" ] _280SMPL , # [ doc = "1 sample / report" ] _1SMPL } impl REPORTPERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { REPORTPERW :: _10SMPL => 0 , REPORTPERW :: _40SMPL => 1 , REPORTPERW :: _80SMPL => 2 , REPORTPERW :: _120SMPL => 3 , REPORTPERW :: _160SMPL => 4 , REPORTPERW :: _200SMPL => 5 , REPORTPERW :: _240SMPL => 6 , REPORTPERW :: _280SMPL => 7 , REPORTPERW :: _1SMPL => 8 } } } # [ doc = r" Proxy" ] pub struct _REPORTPERW < 'a > { w : & 'a mut W , } impl < 'a > _REPORTPERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REPORTPERW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "10 samples / report" ] # [ inline ] pub fn _10smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _10SMPL ) } # [ doc = "40 samples / report" ] # [ inline ] pub fn _40smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _40SMPL ) } # [ doc = "80 samples / report" ] # [ inline ] pub fn _80smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _80SMPL ) } # [ doc = "120 samples / report" ] # [ inline ] pub fn _120smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _120SMPL ) } # [ doc = "160 samples / report" ] # [ inline ] pub fn _160smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _160SMPL ) } # [ doc = "200 samples / report" ] # [ inline ] pub fn _200smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _200SMPL ) } # [ doc = "240 samples / report" ] # [ inline ] pub fn _240smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _240SMPL ) } # [ doc = "280 samples / report" ] # [ inline ] pub fn _280smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _280SMPL ) } # [ doc = "1 sample / report" ] # [ inline ] pub fn _1smpl ( self ) -> & 'a mut W { self . variant ( REPORTPERW :: _1SMPL ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated" ] # [ inline ] pub fn reportper ( & self ) -> REPORTPERR { REPORTPERR :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated" ] # [ inline ] pub fn reportper ( & mut self ) -> _REPORTPERW { _REPORTPERW { w : self } } } } # [ doc = "Register accumulating the valid transitions" ] pub struct ACC { register : VolatileCell < u32 > } # [ doc = "Register accumulating the valid transitions" ] pub mod acc { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: ACC { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct ACCR { bits : u32 , } impl ACCR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Register accumulating all valid samples (not double transition) read from the SAMPLE register" ] # [ inline ] pub fn acc ( & self ) -> ACCR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ACCR { bits } } } } # [ doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task" ] pub struct ACCREAD { register : VolatileCell < u32 > } # [ doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task" ] pub mod accread { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: ACCREAD { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct ACCREADR { bits : u32 , } impl ACCREADR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Snapshot of the ACC register." ] # [ inline ] pub fn accread ( & self ) -> ACCREADR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ACCREADR { bits } } } } # [ doc = "Enable input debounce filters" ] pub struct DBFEN { register : VolatileCell < u32 > } # [ doc = "Enable input debounce filters" ] pub mod dbfen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DBFEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DBFEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DBFENR { # [ doc = "Debounce input filters disabled" ] DISABLED , # [ doc = "Debounce input filters enabled" ] ENABLED } impl DBFENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DBFENR :: DISABLED => false , DBFENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DBFENR { match value { false => DBFENR :: DISABLED , true => DBFENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DBFENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DBFENR :: ENABLED } } # [ doc = "Values that can be written to the field `DBFEN`" ] pub enum DBFENW { # [ doc = "Debounce input filters disabled" ] DISABLED , # [ doc = "Debounce input filters enabled" ] ENABLED } impl DBFENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DBFENW :: DISABLED => false , DBFENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DBFENW < 'a > { w : & 'a mut W , } impl < 'a > _DBFENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DBFENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Debounce input filters disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DBFENW :: DISABLED ) } # [ doc = "Debounce input filters enabled" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DBFENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable input debounce filters" ] # [ inline ] pub fn dbfen ( & self ) -> DBFENR { DBFENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable input debounce filters" ] # [ inline ] pub fn dbfen ( & mut self ) -> _DBFENW { _DBFENW { w : self } } } } # [ doc = "Time period the LED is switched ON prior to sampling" ] pub struct LEDPRE { register : VolatileCell < u32 > } # [ doc = "Time period the LED is switched ON prior to sampling" ] pub mod ledpre { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: LEDPRE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct LEDPRER { bits : u16 , } impl LEDPRER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _LEDPREW < 'a > { w : & 'a mut W , } impl < 'a > _LEDPREW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x01ff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling" ] # [ inline ] pub fn ledpre ( & self ) -> LEDPRER { let bits = { const MASK : u16 = 0x01ff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; LEDPRER { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x10 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling" ] # [ inline ] pub fn ledpre ( & mut self ) -> _LEDPREW { _LEDPREW { w : self } } } } # [ doc = "Register accumulating the number of detected double transitions" ] pub struct ACCDBL { register : VolatileCell < u32 > } # [ doc = "Register accumulating the number of detected double transitions" ] pub mod accdbl { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: ACCDBL { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct ACCDBLR { bits : u8 , } impl ACCDBLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )." ] # [ inline ] pub fn accdbl ( & self ) -> ACCDBLR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ACCDBLR { bits } } } } # [ doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task" ] pub struct ACCDBLREAD { register : VolatileCell < u32 > } # [ doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task" ] pub mod accdblread { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: ACCDBLREAD { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = r" Value of the field" ] pub struct ACCDBLREADR { bits : u8 , } impl ACCDBLREADR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered." ] # [ inline ] pub fn accdblread ( & self ) -> ACCDBLREADR { let bits = { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; ACCDBLREADR { bits } } } } } # [ doc = "Comparator" ] pub struct COMP { _marker : PhantomData < * const ( ) > } unsafe impl Send for COMP { } impl COMP { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const comp :: RegisterBlock { 0x4001_3000 as * const _ } } impl Deref for COMP { type Target = comp :: RegisterBlock ; fn deref ( & self ) -> & comp :: RegisterBlock { unsafe { & * COMP :: ptr ( ) } } } # [ doc = "Comparator" ] pub mod comp { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start comparator" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stop comparator" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Sample comparator value" ] pub tasks_sample : TASKS_SAMPLE , _reserved0 : [ u8 ; 244usize ] , # [ doc = "0x100 - COMP is ready and output is valid" ] pub events_ready : EVENTS_READY , # [ doc = "0x104 - Downward crossing" ] pub events_down : EVENTS_DOWN , # [ doc = "0x108 - Upward crossing" ] pub events_up : EVENTS_UP , # [ doc = "0x10c - Downward or upward crossing" ] pub events_cross : EVENTS_CROSS , _reserved1 : [ u8 ; 240usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved2 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 244usize ] , # [ doc = "0x400 - Compare result" ] pub result : RESULT , _reserved4 : [ u8 ; 252usize ] , # [ doc = "0x500 - COMP enable" ] pub enable : ENABLE , # [ doc = "0x504 - Pin select" ] pub psel : PSEL , # [ doc = "0x508 - Reference source select" ] pub refsel : REFSEL , # [ doc = "0x50c - External reference select" ] pub extrefsel : EXTREFSEL , _reserved5 : [ u8 ; 32usize ] , # [ doc = "0x530 - Threshold configuration for hysteresis unit" ] pub th : TH , # [ doc = "0x534 - Mode configuration" ] pub mode : MODE , # [ doc = "0x538 - Comparator hysteresis enable" ] pub hyst : HYST , # [ doc = "0x53c - Current source select on analog input" ] pub isource : ISOURCE , } # [ doc = "Start comparator" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start comparator" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop comparator" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop comparator" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Sample comparator value" ] pub struct TASKS_SAMPLE { register : VolatileCell < u32 > } # [ doc = "Sample comparator value" ] pub mod tasks_sample { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SAMPLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "COMP is ready and output is valid" ] pub struct EVENTS_READY { register : VolatileCell < u32 > } # [ doc = "COMP is ready and output is valid" ] pub mod events_ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Downward crossing" ] pub struct EVENTS_DOWN { register : VolatileCell < u32 > } # [ doc = "Downward crossing" ] pub mod events_down { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DOWN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Upward crossing" ] pub struct EVENTS_UP { register : VolatileCell < u32 > } # [ doc = "Upward crossing" ] pub mod events_up { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_UP { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Downward or upward crossing" ] pub struct EVENTS_CROSS { register : VolatileCell < u32 > } # [ doc = "Downward or upward crossing" ] pub mod events_cross { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CROSS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY_SAMPLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READY_SAMPLER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_SAMPLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READY_SAMPLER :: DISABLED => false , READY_SAMPLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READY_SAMPLER { match value { false => READY_SAMPLER :: DISABLED , true => READY_SAMPLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READY_SAMPLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READY_SAMPLER :: ENABLED } } # [ doc = "Possible values of the field `READY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READY_STOPR :: DISABLED => false , READY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READY_STOPR { match value { false => READY_STOPR :: DISABLED , true => READY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READY_STOPR :: ENABLED } } # [ doc = "Possible values of the field `DOWN_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWN_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DOWN_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWN_STOPR :: DISABLED => false , DOWN_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWN_STOPR { match value { false => DOWN_STOPR :: DISABLED , true => DOWN_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWN_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWN_STOPR :: ENABLED } } # [ doc = "Possible values of the field `UP_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UP_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl UP_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UP_STOPR :: DISABLED => false , UP_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UP_STOPR { match value { false => UP_STOPR :: DISABLED , true => UP_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UP_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UP_STOPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSS_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CROSS_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSS_STOPR :: DISABLED => false , CROSS_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSS_STOPR { match value { false => CROSS_STOPR :: DISABLED , true => CROSS_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSS_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSS_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `READY_SAMPLE`" ] pub enum READY_SAMPLEW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_SAMPLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READY_SAMPLEW :: DISABLED => false , READY_SAMPLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READY_SAMPLEW < 'a > { w : & 'a mut W , } impl < 'a > _READY_SAMPLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READY_SAMPLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READY_SAMPLEW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READY_SAMPLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READY_STOP`" ] pub enum READY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READY_STOPW :: DISABLED => false , READY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _READY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN_STOP`" ] pub enum DOWN_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DOWN_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWN_STOPW :: DISABLED => false , DOWN_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DOWN_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _DOWN_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWN_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DOWN_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DOWN_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP_STOP`" ] pub enum UP_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl UP_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UP_STOPW :: DISABLED => false , UP_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _UP_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _UP_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UP_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( UP_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( UP_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS_STOP`" ] pub enum CROSS_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CROSS_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSS_STOPW :: DISABLED => false , CROSS_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CROSS_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _CROSS_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSS_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CROSS_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CROSS_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between READY event and SAMPLE task" ] # [ inline ] pub fn ready_sample ( & self ) -> READY_SAMPLER { READY_SAMPLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between READY event and STOP task" ] # [ inline ] pub fn ready_stop ( & self ) -> READY_STOPR { READY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between DOWN event and STOP task" ] # [ inline ] pub fn down_stop ( & self ) -> DOWN_STOPR { DOWN_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between UP event and STOP task" ] # [ inline ] pub fn up_stop ( & self ) -> UP_STOPR { UP_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between CROSS event and STOP task" ] # [ inline ] pub fn cross_stop ( & self ) -> CROSS_STOPR { CROSS_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between READY event and SAMPLE task" ] # [ inline ] pub fn ready_sample ( & mut self ) -> _READY_SAMPLEW { _READY_SAMPLEW { w : self } } # [ doc = "Bit 1 - Shortcut between READY event and STOP task" ] # [ inline ] pub fn ready_stop ( & mut self ) -> _READY_STOPW { _READY_STOPW { w : self } } # [ doc = "Bit 2 - Shortcut between DOWN event and STOP task" ] # [ inline ] pub fn down_stop ( & mut self ) -> _DOWN_STOPW { _DOWN_STOPW { w : self } } # [ doc = "Bit 3 - Shortcut between UP event and STOP task" ] # [ inline ] pub fn up_stop ( & mut self ) -> _UP_STOPW { _UP_STOPW { w : self } } # [ doc = "Bit 4 - Shortcut between CROSS event and STOP task" ] # [ inline ] pub fn cross_stop ( & mut self ) -> _CROSS_STOPW { _CROSS_STOPW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `DOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWNR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWNR :: DISABLED => false , DOWNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWNR { match value { false => DOWNR :: DISABLED , true => DOWNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWNR :: ENABLED } } # [ doc = "Possible values of the field `UP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl UPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPR :: DISABLED => false , UPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPR { match value { false => UPR :: DISABLED , true => UPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSSR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CROSSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSSR :: DISABLED => false , CROSSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSSR { match value { false => CROSSR :: DISABLED , true => CROSSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSSR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: DISABLED => false , READYW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READYW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READYW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN`" ] pub enum DOWNW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl DOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWNW :: DISABLED => false , DOWNW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DOWNW < 'a > { w : & 'a mut W , } impl < 'a > _DOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DOWNW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DOWNW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP`" ] pub enum UPW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl UPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPW :: DISABLED => false , UPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _UPW < 'a > { w : & 'a mut W , } impl < 'a > _UPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( UPW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( UPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS`" ] pub enum CROSSW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl CROSSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSSW :: DISABLED => false , CROSSW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CROSSW < 'a > { w : & 'a mut W , } impl < 'a > _CROSSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CROSSW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CROSSW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & self ) -> DOWNR { DOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for UP event" ] # [ inline ] pub fn up ( & self ) -> UPR { UPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & self ) -> CROSSR { CROSSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & mut self ) -> _DOWNW { _DOWNW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for UP event" ] # [ inline ] pub fn up ( & mut self ) -> _UPW { _UPW { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & mut self ) -> _CROSSW { _CROSSW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `DOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWNR :: DISABLED => false , DOWNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWNR { match value { false => DOWNR :: DISABLED , true => DOWNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWNR :: ENABLED } } # [ doc = "Possible values of the field `UP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl UPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPR :: DISABLED => false , UPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPR { match value { false => UPR :: DISABLED , true => UPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CROSSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSSR :: DISABLED => false , CROSSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSSR { match value { false => CROSSR :: DISABLED , true => CROSSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSSR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Enable" ] SET } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN`" ] pub enum DOWNW { # [ doc = "Enable" ] SET } impl DOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWNW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DOWNW < 'a > { w : & 'a mut W , } impl < 'a > _DOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DOWNW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP`" ] pub enum UPW { # [ doc = "Enable" ] SET } impl UPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _UPW < 'a > { w : & 'a mut W , } impl < 'a > _UPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( UPW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS`" ] pub enum CROSSW { # [ doc = "Enable" ] SET } impl CROSSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CROSSW < 'a > { w : & 'a mut W , } impl < 'a > _CROSSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CROSSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for DOWN event" ] # [ inline ] pub fn down ( & self ) -> DOWNR { DOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for UP event" ] # [ inline ] pub fn up ( & self ) -> UPR { UPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & self ) -> CROSSR { CROSSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for DOWN event" ] # [ inline ] pub fn down ( & mut self ) -> _DOWNW { _DOWNW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for UP event" ] # [ inline ] pub fn up ( & mut self ) -> _UPW { _UPW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & mut self ) -> _CROSSW { _CROSSW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `DOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWNR :: DISABLED => false , DOWNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWNR { match value { false => DOWNR :: DISABLED , true => DOWNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWNR :: ENABLED } } # [ doc = "Possible values of the field `UP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl UPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPR :: DISABLED => false , UPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPR { match value { false => UPR :: DISABLED , true => UPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CROSSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSSR :: DISABLED => false , CROSSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSSR { match value { false => CROSSR :: DISABLED , true => CROSSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSSR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] CLEAR } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN`" ] pub enum DOWNW { # [ doc = "Disable" ] CLEAR } impl DOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWNW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DOWNW < 'a > { w : & 'a mut W , } impl < 'a > _DOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DOWNW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP`" ] pub enum UPW { # [ doc = "Disable" ] CLEAR } impl UPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _UPW < 'a > { w : & 'a mut W , } impl < 'a > _UPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( UPW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS`" ] pub enum CROSSW { # [ doc = "Disable" ] CLEAR } impl CROSSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CROSSW < 'a > { w : & 'a mut W , } impl < 'a > _CROSSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CROSSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & self ) -> DOWNR { DOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for UP event" ] # [ inline ] pub fn up ( & self ) -> UPR { UPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & self ) -> CROSSR { CROSSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & mut self ) -> _DOWNW { _DOWNW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for UP event" ] # [ inline ] pub fn up ( & mut self ) -> _UPW { _UPW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & mut self ) -> _CROSSW { _CROSSW { w : self } } } } # [ doc = "Compare result" ] pub struct RESULT { register : VolatileCell < u32 > } # [ doc = "Compare result" ] pub mod result { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RESULT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `RESULT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESULTR { # [ doc = "Input voltage is below the threshold (VIN+ &lt; VIN-)" ] BELOW , # [ doc = "Input voltage is above the threshold (VIN+ &gt; VIN-)" ] ABOVE } impl RESULTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESULTR :: BELOW => false , RESULTR :: ABOVE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESULTR { match value { false => RESULTR :: BELOW , true => RESULTR :: ABOVE , } } # [ doc = "Checks if the value of the field is `BELOW`" ] # [ inline ] pub fn is_below ( & self ) -> bool { * self == RESULTR :: BELOW } # [ doc = "Checks if the value of the field is `ABOVE`" ] # [ inline ] pub fn is_above ( & self ) -> bool { * self == RESULTR :: ABOVE } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Result of last compare. Decision point SAMPLE task." ] # [ inline ] pub fn result ( & self ) -> RESULTR { RESULTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "COMP enable" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "COMP enable" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x02 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 2 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 2 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Enable or disable COMP" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Enable or disable COMP" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Pin select" ] pub struct PSEL { register : VolatileCell < u32 > } # [ doc = "Pin select" ] pub mod psel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELR { # [ doc = "AIN0 selected as analog input" ] ANALOGINPUT0 , # [ doc = "AIN1 selected as analog input" ] ANALOGINPUT1 , # [ doc = "AIN2 selected as analog input" ] ANALOGINPUT2 , # [ doc = "AIN3 selected as analog input" ] ANALOGINPUT3 , # [ doc = "AIN4 selected as analog input" ] ANALOGINPUT4 , # [ doc = "AIN5 selected as analog input" ] ANALOGINPUT5 , # [ doc = "AIN6 selected as analog input" ] ANALOGINPUT6 , # [ doc = "AIN7 selected as analog input" ] ANALOGINPUT7 } impl PSELR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PSELR :: ANALOGINPUT0 => 0 , PSELR :: ANALOGINPUT1 => 0x01 , PSELR :: ANALOGINPUT2 => 0x02 , PSELR :: ANALOGINPUT3 => 0x03 , PSELR :: ANALOGINPUT4 => 0x04 , PSELR :: ANALOGINPUT5 => 0x05 , PSELR :: ANALOGINPUT6 => 0x06 , PSELR :: ANALOGINPUT7 => 0x07 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PSELR { match value { 0 => PSELR :: ANALOGINPUT0 , 1 => PSELR :: ANALOGINPUT1 , 2 => PSELR :: ANALOGINPUT2 , 3 => PSELR :: ANALOGINPUT3 , 4 => PSELR :: ANALOGINPUT4 , 5 => PSELR :: ANALOGINPUT5 , 6 => PSELR :: ANALOGINPUT6 , 7 => PSELR :: ANALOGINPUT7 , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `ANALOGINPUT0`" ] # [ inline ] pub fn is_analog_input0 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT0 } # [ doc = "Checks if the value of the field is `ANALOGINPUT1`" ] # [ inline ] pub fn is_analog_input1 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT1 } # [ doc = "Checks if the value of the field is `ANALOGINPUT2`" ] # [ inline ] pub fn is_analog_input2 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT2 } # [ doc = "Checks if the value of the field is `ANALOGINPUT3`" ] # [ inline ] pub fn is_analog_input3 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT3 } # [ doc = "Checks if the value of the field is `ANALOGINPUT4`" ] # [ inline ] pub fn is_analog_input4 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT4 } # [ doc = "Checks if the value of the field is `ANALOGINPUT5`" ] # [ inline ] pub fn is_analog_input5 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT5 } # [ doc = "Checks if the value of the field is `ANALOGINPUT6`" ] # [ inline ] pub fn is_analog_input6 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT6 } # [ doc = "Checks if the value of the field is `ANALOGINPUT7`" ] # [ inline ] pub fn is_analog_input7 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT7 } } # [ doc = "Values that can be written to the field `PSEL`" ] pub enum PSELW { # [ doc = "AIN0 selected as analog input" ] ANALOGINPUT0 , # [ doc = "AIN1 selected as analog input" ] ANALOGINPUT1 , # [ doc = "AIN2 selected as analog input" ] ANALOGINPUT2 , # [ doc = "AIN3 selected as analog input" ] ANALOGINPUT3 , # [ doc = "AIN4 selected as analog input" ] ANALOGINPUT4 , # [ doc = "AIN5 selected as analog input" ] ANALOGINPUT5 , # [ doc = "AIN6 selected as analog input" ] ANALOGINPUT6 , # [ doc = "AIN7 selected as analog input" ] ANALOGINPUT7 } impl PSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PSELW :: ANALOGINPUT0 => 0 , PSELW :: ANALOGINPUT1 => 1 , PSELW :: ANALOGINPUT2 => 2 , PSELW :: ANALOGINPUT3 => 3 , PSELW :: ANALOGINPUT4 => 4 , PSELW :: ANALOGINPUT5 => 5 , PSELW :: ANALOGINPUT6 => 6 , PSELW :: ANALOGINPUT7 => 7 } } } # [ doc = r" Proxy" ] pub struct _PSELW < 'a > { w : & 'a mut W , } impl < 'a > _PSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "AIN0 selected as analog input" ] # [ inline ] pub fn analog_input0 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT0 ) } # [ doc = "AIN1 selected as analog input" ] # [ inline ] pub fn analog_input1 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT1 ) } # [ doc = "AIN2 selected as analog input" ] # [ inline ] pub fn analog_input2 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT2 ) } # [ doc = "AIN3 selected as analog input" ] # [ inline ] pub fn analog_input3 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT3 ) } # [ doc = "AIN4 selected as analog input" ] # [ inline ] pub fn analog_input4 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT4 ) } # [ doc = "AIN5 selected as analog input" ] # [ inline ] pub fn analog_input5 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT5 ) } # [ doc = "AIN6 selected as analog input" ] # [ inline ] pub fn analog_input6 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT6 ) } # [ doc = "AIN7 selected as analog input" ] # [ inline ] pub fn analog_input7 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT7 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Analog pin select" ] # [ inline ] pub fn psel ( & self ) -> PSELR { PSELR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Analog pin select" ] # [ inline ] pub fn psel ( & mut self ) -> _PSELW { _PSELW { w : self } } } } # [ doc = "Reference source select" ] pub struct REFSEL { register : VolatileCell < u32 > } # [ doc = "Reference source select" ] pub mod refsel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REFSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REFSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REFSELR { # [ doc = "VREF = internal 1.2 V reference (VDD &gt;= 1.7 V)" ] INT1V2 , # [ doc = "VREF = internal 1.8 V reference (VDD &gt;= VREF + 0.2 V)" ] INT1V8 , # [ doc = "VREF = internal 2.4 V reference (VDD &gt;= VREF + 0.2 V)" ] INT2V4 , # [ doc = "VREF = VDD" ] VDD , # [ doc = "VREF = AREF (VDD &gt;= VREF &gt;= AREFMIN)" ] AREF , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl REFSELR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { REFSELR :: INT1V2 => 0 , REFSELR :: INT1V8 => 0x01 , REFSELR :: INT2V4 => 0x02 , REFSELR :: VDD => 0x04 , REFSELR :: AREF => 0x07 , REFSELR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> REFSELR { match value { 0 => REFSELR :: INT1V2 , 1 => REFSELR :: INT1V8 , 2 => REFSELR :: INT2V4 , 4 => REFSELR :: VDD , 7 => REFSELR :: AREF , i => REFSELR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `INT1V2`" ] # [ inline ] pub fn is_int1v2 ( & self ) -> bool { * self == REFSELR :: INT1V2 } # [ doc = "Checks if the value of the field is `INT1V8`" ] # [ inline ] pub fn is_int1v8 ( & self ) -> bool { * self == REFSELR :: INT1V8 } # [ doc = "Checks if the value of the field is `INT2V4`" ] # [ inline ] pub fn is_int2v4 ( & self ) -> bool { * self == REFSELR :: INT2V4 } # [ doc = "Checks if the value of the field is `VDD`" ] # [ inline ] pub fn is_vdd ( & self ) -> bool { * self == REFSELR :: VDD } # [ doc = "Checks if the value of the field is `AREF`" ] # [ inline ] pub fn is_aref ( & self ) -> bool { * self == REFSELR :: AREF } } # [ doc = "Values that can be written to the field `REFSEL`" ] pub enum REFSELW { # [ doc = "VREF = internal 1.2 V reference (VDD &gt;= 1.7 V)" ] INT1V2 , # [ doc = "VREF = internal 1.8 V reference (VDD &gt;= VREF + 0.2 V)" ] INT1V8 , # [ doc = "VREF = internal 2.4 V reference (VDD &gt;= VREF + 0.2 V)" ] INT2V4 , # [ doc = "VREF = VDD" ] VDD , # [ doc = "VREF = AREF (VDD &gt;= VREF &gt;= AREFMIN)" ] AREF } impl REFSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { REFSELW :: INT1V2 => 0 , REFSELW :: INT1V8 => 1 , REFSELW :: INT2V4 => 2 , REFSELW :: VDD => 4 , REFSELW :: AREF => 7 } } } # [ doc = r" Proxy" ] pub struct _REFSELW < 'a > { w : & 'a mut W , } impl < 'a > _REFSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REFSELW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "VREF = internal 1.2 V reference (VDD &gt;= 1.7 V)" ] # [ inline ] pub fn int1v2 ( self ) -> & 'a mut W { self . variant ( REFSELW :: INT1V2 ) } # [ doc = "VREF = internal 1.8 V reference (VDD &gt;= VREF + 0.2 V)" ] # [ inline ] pub fn int1v8 ( self ) -> & 'a mut W { self . variant ( REFSELW :: INT1V8 ) } # [ doc = "VREF = internal 2.4 V reference (VDD &gt;= VREF + 0.2 V)" ] # [ inline ] pub fn int2v4 ( self ) -> & 'a mut W { self . variant ( REFSELW :: INT2V4 ) } # [ doc = "VREF = VDD" ] # [ inline ] pub fn vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: VDD ) } # [ doc = "VREF = AREF (VDD &gt;= VREF &gt;= AREFMIN)" ] # [ inline ] pub fn aref ( self ) -> & 'a mut W { self . variant ( REFSELW :: AREF ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Reference select" ] # [ inline ] pub fn refsel ( & self ) -> REFSELR { REFSELR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x04 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Reference select" ] # [ inline ] pub fn refsel ( & mut self ) -> _REFSELW { _REFSELW { w : self } } } } # [ doc = "External reference select" ] pub struct EXTREFSEL { register : VolatileCell < u32 > } # [ doc = "External reference select" ] pub mod extrefsel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EXTREFSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `EXTREFSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTREFSELR { # [ doc = "Use AIN0 as external analog reference" ] ANALOGREFERENCE0 , # [ doc = "Use AIN1 as external analog reference" ] ANALOGREFERENCE1 } impl EXTREFSELR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { EXTREFSELR :: ANALOGREFERENCE0 => false , EXTREFSELR :: ANALOGREFERENCE1 => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> EXTREFSELR { match value { false => EXTREFSELR :: ANALOGREFERENCE0 , true => EXTREFSELR :: ANALOGREFERENCE1 , } } # [ doc = "Checks if the value of the field is `ANALOGREFERENCE0`" ] # [ inline ] pub fn is_analog_reference0 ( & self ) -> bool { * self == EXTREFSELR :: ANALOGREFERENCE0 } # [ doc = "Checks if the value of the field is `ANALOGREFERENCE1`" ] # [ inline ] pub fn is_analog_reference1 ( & self ) -> bool { * self == EXTREFSELR :: ANALOGREFERENCE1 } } # [ doc = "Values that can be written to the field `EXTREFSEL`" ] pub enum EXTREFSELW { # [ doc = "Use AIN0 as external analog reference" ] ANALOGREFERENCE0 , # [ doc = "Use AIN1 as external analog reference" ] ANALOGREFERENCE1 } impl EXTREFSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { EXTREFSELW :: ANALOGREFERENCE0 => false , EXTREFSELW :: ANALOGREFERENCE1 => true } } } # [ doc = r" Proxy" ] pub struct _EXTREFSELW < 'a > { w : & 'a mut W , } impl < 'a > _EXTREFSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : EXTREFSELW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Use AIN0 as external analog reference" ] # [ inline ] pub fn analog_reference0 ( self ) -> & 'a mut W { self . variant ( EXTREFSELW :: ANALOGREFERENCE0 ) } # [ doc = "Use AIN1 as external analog reference" ] # [ inline ] pub fn analog_reference1 ( self ) -> & 'a mut W { self . variant ( EXTREFSELW :: ANALOGREFERENCE1 ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - External analog reference select" ] # [ inline ] pub fn extrefsel ( & self ) -> EXTREFSELR { EXTREFSELR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - External analog reference select" ] # [ inline ] pub fn extrefsel ( & mut self ) -> _EXTREFSELW { _EXTREFSELW { w : self } } } } # [ doc = "Threshold configuration for hysteresis unit" ] pub struct TH { register : VolatileCell < u32 > } # [ doc = "Threshold configuration for hysteresis unit" ] pub mod th { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TH { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct THDOWNR { bits : u8 , } impl THDOWNR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Value of the field" ] pub struct THUPR { bits : u8 , } impl THUPR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { self . bits } } # [ doc = r" Proxy" ] pub struct _THDOWNW < 'a > { w : & 'a mut W , } impl < 'a > _THDOWNW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x3f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = r" Proxy" ] pub struct _THUPW < 'a > { w : & 'a mut W , } impl < 'a > _THUPW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x3f ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF" ] # [ inline ] pub fn thdown ( & self ) -> THDOWNR { let bits = { const MASK : u8 = 0x3f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; THDOWNR { bits } } # [ doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF" ] # [ inline ] pub fn thup ( & self ) -> THUPR { let bits = { const MASK : u8 = 0x3f ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ; THUPR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF" ] # [ inline ] pub fn thdown ( & mut self ) -> _THDOWNW { _THDOWNW { w : self } } # [ doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF" ] # [ inline ] pub fn thup ( & mut self ) -> _THUPW { _THUPW { w : self } } } } # [ doc = "Mode configuration" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Mode configuration" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SPR { # [ doc = "Low power mode" ] LOW , # [ doc = "Normal mode" ] NORMAL , # [ doc = "High speed mode" ] HIGH , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SPR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SPR :: LOW => 0 , SPR :: NORMAL => 0x01 , SPR :: HIGH => 0x02 , SPR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SPR { match value { 0 => SPR :: LOW , 1 => SPR :: NORMAL , 2 => SPR :: HIGH , i => SPR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == SPR :: LOW } # [ doc = "Checks if the value of the field is `NORMAL`" ] # [ inline ] pub fn is_normal ( & self ) -> bool { * self == SPR :: NORMAL } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == SPR :: HIGH } } # [ doc = "Possible values of the field `MAIN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MAINR { # [ doc = "Single ended mode" ] SE , # [ doc = "Differential mode" ] DIFF } impl MAINR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MAINR :: SE => false , MAINR :: DIFF => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MAINR { match value { false => MAINR :: SE , true => MAINR :: DIFF , } } # [ doc = "Checks if the value of the field is `SE`" ] # [ inline ] pub fn is_se ( & self ) -> bool { * self == MAINR :: SE } # [ doc = "Checks if the value of the field is `DIFF`" ] # [ inline ] pub fn is_diff ( & self ) -> bool { * self == MAINR :: DIFF } } # [ doc = "Values that can be written to the field `SP`" ] pub enum SPW { # [ doc = "Low power mode" ] LOW , # [ doc = "Normal mode" ] NORMAL , # [ doc = "High speed mode" ] HIGH } impl SPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { SPW :: LOW => 0 , SPW :: NORMAL => 1 , SPW :: HIGH => 2 } } } # [ doc = r" Proxy" ] pub struct _SPW < 'a > { w : & 'a mut W , } impl < 'a > _SPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SPW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Low power mode" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( SPW :: LOW ) } # [ doc = "Normal mode" ] # [ inline ] pub fn normal ( self ) -> & 'a mut W { self . variant ( SPW :: NORMAL ) } # [ doc = "High speed mode" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( SPW :: HIGH ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `MAIN`" ] pub enum MAINW { # [ doc = "Single ended mode" ] SE , # [ doc = "Differential mode" ] DIFF } impl MAINW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { MAINW :: SE => false , MAINW :: DIFF => true } } } # [ doc = r" Proxy" ] pub struct _MAINW < 'a > { w : & 'a mut W , } impl < 'a > _MAINW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MAINW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Single ended mode" ] # [ inline ] pub fn se ( self ) -> & 'a mut W { self . variant ( MAINW :: SE ) } # [ doc = "Differential mode" ] # [ inline ] pub fn diff ( self ) -> & 'a mut W { self . variant ( MAINW :: DIFF ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Speed and power mode" ] # [ inline ] pub fn sp ( & self ) -> SPR { SPR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 8 - Main operation mode" ] # [ inline ] pub fn main ( & self ) -> MAINR { MAINR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Speed and power mode" ] # [ inline ] pub fn sp ( & mut self ) -> _SPW { _SPW { w : self } } # [ doc = "Bit 8 - Main operation mode" ] # [ inline ] pub fn main ( & mut self ) -> _MAINW { _MAINW { w : self } } } } # [ doc = "Comparator hysteresis enable" ] pub struct HYST { register : VolatileCell < u32 > } # [ doc = "Comparator hysteresis enable" ] pub mod hyst { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: HYST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HYST`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTR { # [ doc = "Comparator hysteresis disabled" ] NOHYST , # [ doc = "Comparator hysteresis enabled" ] HYST50MV } impl HYSTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HYSTR :: NOHYST => false , HYSTR :: HYST50MV => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HYSTR { match value { false => HYSTR :: NOHYST , true => HYSTR :: HYST50MV , } } # [ doc = "Checks if the value of the field is `NOHYST`" ] # [ inline ] pub fn is_no_hyst ( & self ) -> bool { * self == HYSTR :: NOHYST } # [ doc = "Checks if the value of the field is `HYST50MV`" ] # [ inline ] pub fn is_hyst50m_v ( & self ) -> bool { * self == HYSTR :: HYST50MV } } # [ doc = "Values that can be written to the field `HYST`" ] pub enum HYSTW { # [ doc = "Comparator hysteresis disabled" ] NOHYST , # [ doc = "Comparator hysteresis enabled" ] HYST50MV } impl HYSTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HYSTW :: NOHYST => false , HYSTW :: HYST50MV => true } } } # [ doc = r" Proxy" ] pub struct _HYSTW < 'a > { w : & 'a mut W , } impl < 'a > _HYSTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HYSTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Comparator hysteresis disabled" ] # [ inline ] pub fn no_hyst ( self ) -> & 'a mut W { self . variant ( HYSTW :: NOHYST ) } # [ doc = "Comparator hysteresis enabled" ] # [ inline ] pub fn hyst50m_v ( self ) -> & 'a mut W { self . variant ( HYSTW :: HYST50MV ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Comparator hysteresis" ] # [ inline ] pub fn hyst ( & self ) -> HYSTR { HYSTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Comparator hysteresis" ] # [ inline ] pub fn hyst ( & mut self ) -> _HYSTW { _HYSTW { w : self } } } } # [ doc = "Current source select on analog input" ] pub struct ISOURCE { register : VolatileCell < u32 > } # [ doc = "Current source select on analog input" ] pub mod isource { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ISOURCE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ISOURCE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ISOURCER { # [ doc = "Current source disabled" ] OFF , # [ doc = "Current source enabled (+/- 2.5 uA)" ] IEN2MA5 , # [ doc = "Current source enabled (+/- 5 uA)" ] IEN5MA , # [ doc = "Current source enabled (+/- 10 uA)" ] IEN10MA } impl ISOURCER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ISOURCER :: OFF => 0 , ISOURCER :: IEN2MA5 => 0x01 , ISOURCER :: IEN5MA => 0x02 , ISOURCER :: IEN10MA => 0x03 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ISOURCER { match value { 0 => ISOURCER :: OFF , 1 => ISOURCER :: IEN2MA5 , 2 => ISOURCER :: IEN5MA , 3 => ISOURCER :: IEN10MA , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `OFF`" ] # [ inline ] pub fn is_off ( & self ) -> bool { * self == ISOURCER :: OFF } # [ doc = "Checks if the value of the field is `IEN2MA5`" ] # [ inline ] pub fn is_ien2m_a5 ( & self ) -> bool { * self == ISOURCER :: IEN2MA5 } # [ doc = "Checks if the value of the field is `IEN5MA`" ] # [ inline ] pub fn is_ien5m_a ( & self ) -> bool { * self == ISOURCER :: IEN5MA } # [ doc = "Checks if the value of the field is `IEN10MA`" ] # [ inline ] pub fn is_ien10m_a ( & self ) -> bool { * self == ISOURCER :: IEN10MA } } # [ doc = "Values that can be written to the field `ISOURCE`" ] pub enum ISOURCEW { # [ doc = "Current source disabled" ] OFF , # [ doc = "Current source enabled (+/- 2.5 uA)" ] IEN2MA5 , # [ doc = "Current source enabled (+/- 5 uA)" ] IEN5MA , # [ doc = "Current source enabled (+/- 10 uA)" ] IEN10MA } impl ISOURCEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ISOURCEW :: OFF => 0 , ISOURCEW :: IEN2MA5 => 1 , ISOURCEW :: IEN5MA => 2 , ISOURCEW :: IEN10MA => 3 } } } # [ doc = r" Proxy" ] pub struct _ISOURCEW < 'a > { w : & 'a mut W , } impl < 'a > _ISOURCEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ISOURCEW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "Current source disabled" ] # [ inline ] pub fn off ( self ) -> & 'a mut W { self . variant ( ISOURCEW :: OFF ) } # [ doc = "Current source enabled (+/- 2.5 uA)" ] # [ inline ] pub fn ien2m_a5 ( self ) -> & 'a mut W { self . variant ( ISOURCEW :: IEN2MA5 ) } # [ doc = "Current source enabled (+/- 5 uA)" ] # [ inline ] pub fn ien5m_a ( self ) -> & 'a mut W { self . variant ( ISOURCEW :: IEN5MA ) } # [ doc = "Current source enabled (+/- 10 uA)" ] # [ inline ] pub fn ien10m_a ( self ) -> & 'a mut W { self . variant ( ISOURCEW :: IEN10MA ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Comparator hysteresis" ] # [ inline ] pub fn isource ( & self ) -> ISOURCER { ISOURCER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Comparator hysteresis" ] # [ inline ] pub fn isource ( & mut self ) -> _ISOURCEW { _ISOURCEW { w : self } } } } } # [ doc = "Low Power Comparator" ] pub struct LPCOMP { _marker : PhantomData < * const ( ) > } unsafe impl Send for LPCOMP { } impl LPCOMP { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const lpcomp :: RegisterBlock { 0x4001_3000 as * const _ } } impl Deref for LPCOMP { type Target = lpcomp :: RegisterBlock ; fn deref ( & self ) -> & lpcomp :: RegisterBlock { unsafe { & * LPCOMP :: ptr ( ) } } } # [ doc = "Low Power Comparator" ] pub mod lpcomp { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Start comparator" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stop comparator" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Sample comparator value" ] pub tasks_sample : TASKS_SAMPLE , _reserved0 : [ u8 ; 244usize ] , # [ doc = "0x100 - LPCOMP is ready and output is valid" ] pub events_ready : EVENTS_READY , # [ doc = "0x104 - Downward crossing" ] pub events_down : EVENTS_DOWN , # [ doc = "0x108 - Upward crossing" ] pub events_up : EVENTS_UP , # [ doc = "0x10c - Downward or upward crossing" ] pub events_cross : EVENTS_CROSS , _reserved1 : [ u8 ; 240usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved2 : [ u8 ; 256usize ] , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 244usize ] , # [ doc = "0x400 - Compare result" ] pub result : RESULT , _reserved4 : [ u8 ; 252usize ] , # [ doc = "0x500 - Enable LPCOMP" ] pub enable : ENABLE , # [ doc = "0x504 - Input pin select" ] pub psel : PSEL , # [ doc = "0x508 - Reference select" ] pub refsel : REFSEL , # [ doc = "0x50c - External reference select" ] pub extrefsel : EXTREFSEL , _reserved5 : [ u8 ; 16usize ] , # [ doc = "0x520 - Analog detect configuration" ] pub anadetect : ANADETECT , _reserved6 : [ u8 ; 20usize ] , # [ doc = "0x538 - Comparator hysteresis enable" ] pub hyst : HYST , } # [ doc = "Start comparator" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Start comparator" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stop comparator" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stop comparator" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Sample comparator value" ] pub struct TASKS_SAMPLE { register : VolatileCell < u32 > } # [ doc = "Sample comparator value" ] pub mod tasks_sample { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SAMPLE { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "LPCOMP is ready and output is valid" ] pub struct EVENTS_READY { register : VolatileCell < u32 > } # [ doc = "LPCOMP is ready and output is valid" ] pub mod events_ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_READY { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Downward crossing" ] pub struct EVENTS_DOWN { register : VolatileCell < u32 > } # [ doc = "Downward crossing" ] pub mod events_down { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_DOWN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Upward crossing" ] pub struct EVENTS_UP { register : VolatileCell < u32 > } # [ doc = "Upward crossing" ] pub mod events_up { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_UP { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Downward or upward crossing" ] pub struct EVENTS_CROSS { register : VolatileCell < u32 > } # [ doc = "Downward or upward crossing" ] pub mod events_cross { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_CROSS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY_SAMPLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READY_SAMPLER { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_SAMPLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READY_SAMPLER :: DISABLED => false , READY_SAMPLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READY_SAMPLER { match value { false => READY_SAMPLER :: DISABLED , true => READY_SAMPLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READY_SAMPLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READY_SAMPLER :: ENABLED } } # [ doc = "Possible values of the field `READY_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READY_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READY_STOPR :: DISABLED => false , READY_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READY_STOPR { match value { false => READY_STOPR :: DISABLED , true => READY_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READY_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READY_STOPR :: ENABLED } } # [ doc = "Possible values of the field `DOWN_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWN_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DOWN_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWN_STOPR :: DISABLED => false , DOWN_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWN_STOPR { match value { false => DOWN_STOPR :: DISABLED , true => DOWN_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWN_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWN_STOPR :: ENABLED } } # [ doc = "Possible values of the field `UP_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UP_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl UP_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UP_STOPR :: DISABLED => false , UP_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UP_STOPR { match value { false => UP_STOPR :: DISABLED , true => UP_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UP_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UP_STOPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSS_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CROSS_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSS_STOPR :: DISABLED => false , CROSS_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSS_STOPR { match value { false => CROSS_STOPR :: DISABLED , true => CROSS_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSS_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSS_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `READY_SAMPLE`" ] pub enum READY_SAMPLEW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_SAMPLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READY_SAMPLEW :: DISABLED => false , READY_SAMPLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READY_SAMPLEW < 'a > { w : & 'a mut W , } impl < 'a > _READY_SAMPLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READY_SAMPLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READY_SAMPLEW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READY_SAMPLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `READY_STOP`" ] pub enum READY_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl READY_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READY_STOPW :: DISABLED => false , READY_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _READY_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _READY_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READY_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( READY_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( READY_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN_STOP`" ] pub enum DOWN_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl DOWN_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWN_STOPW :: DISABLED => false , DOWN_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _DOWN_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _DOWN_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWN_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( DOWN_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( DOWN_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP_STOP`" ] pub enum UP_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl UP_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UP_STOPW :: DISABLED => false , UP_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _UP_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _UP_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UP_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( UP_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( UP_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS_STOP`" ] pub enum CROSS_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl CROSS_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSS_STOPW :: DISABLED => false , CROSS_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CROSS_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _CROSS_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSS_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CROSS_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CROSS_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between READY event and SAMPLE task" ] # [ inline ] pub fn ready_sample ( & self ) -> READY_SAMPLER { READY_SAMPLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between READY event and STOP task" ] # [ inline ] pub fn ready_stop ( & self ) -> READY_STOPR { READY_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between DOWN event and STOP task" ] # [ inline ] pub fn down_stop ( & self ) -> DOWN_STOPR { DOWN_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between UP event and STOP task" ] # [ inline ] pub fn up_stop ( & self ) -> UP_STOPR { UP_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between CROSS event and STOP task" ] # [ inline ] pub fn cross_stop ( & self ) -> CROSS_STOPR { CROSS_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between READY event and SAMPLE task" ] # [ inline ] pub fn ready_sample ( & mut self ) -> _READY_SAMPLEW { _READY_SAMPLEW { w : self } } # [ doc = "Bit 1 - Shortcut between READY event and STOP task" ] # [ inline ] pub fn ready_stop ( & mut self ) -> _READY_STOPW { _READY_STOPW { w : self } } # [ doc = "Bit 2 - Shortcut between DOWN event and STOP task" ] # [ inline ] pub fn down_stop ( & mut self ) -> _DOWN_STOPW { _DOWN_STOPW { w : self } } # [ doc = "Bit 3 - Shortcut between UP event and STOP task" ] # [ inline ] pub fn up_stop ( & mut self ) -> _UP_STOPW { _UP_STOPW { w : self } } # [ doc = "Bit 4 - Shortcut between CROSS event and STOP task" ] # [ inline ] pub fn cross_stop ( & mut self ) -> _CROSS_STOPW { _CROSS_STOPW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `DOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWNR :: DISABLED => false , DOWNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWNR { match value { false => DOWNR :: DISABLED , true => DOWNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWNR :: ENABLED } } # [ doc = "Possible values of the field `UP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl UPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPR :: DISABLED => false , UPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPR { match value { false => UPR :: DISABLED , true => UPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CROSSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSSR :: DISABLED => false , CROSSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSSR { match value { false => CROSSR :: DISABLED , true => CROSSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSSR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Enable" ] SET } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( READYW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN`" ] pub enum DOWNW { # [ doc = "Enable" ] SET } impl DOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWNW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _DOWNW < 'a > { w : & 'a mut W , } impl < 'a > _DOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( DOWNW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP`" ] pub enum UPW { # [ doc = "Enable" ] SET } impl UPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _UPW < 'a > { w : & 'a mut W , } impl < 'a > _UPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( UPW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS`" ] pub enum CROSSW { # [ doc = "Enable" ] SET } impl CROSSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSSW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CROSSW < 'a > { w : & 'a mut W , } impl < 'a > _CROSSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CROSSW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for DOWN event" ] # [ inline ] pub fn down ( & self ) -> DOWNR { DOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for UP event" ] # [ inline ] pub fn up ( & self ) -> UPR { UPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & self ) -> CROSSR { CROSSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for DOWN event" ] # [ inline ] pub fn down ( & mut self ) -> _DOWNW { _DOWNW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for UP event" ] # [ inline ] pub fn up ( & mut self ) -> _UPW { _UPW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & mut self ) -> _CROSSW { _CROSSW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: DISABLED => false , READYR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: DISABLED , true => READYR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == READYR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == READYR :: ENABLED } } # [ doc = "Possible values of the field `DOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DOWNR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl DOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DOWNR :: DISABLED => false , DOWNR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DOWNR { match value { false => DOWNR :: DISABLED , true => DOWNR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == DOWNR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == DOWNR :: ENABLED } } # [ doc = "Possible values of the field `UP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl UPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPR :: DISABLED => false , UPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPR { match value { false => UPR :: DISABLED , true => UPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == UPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == UPR :: ENABLED } } # [ doc = "Possible values of the field `CROSS`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CROSSR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl CROSSR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CROSSR :: DISABLED => false , CROSSR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CROSSR { match value { false => CROSSR :: DISABLED , true => CROSSR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CROSSR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CROSSR :: ENABLED } } # [ doc = "Values that can be written to the field `READY`" ] pub enum READYW { # [ doc = "Disable" ] CLEAR } impl READYW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { READYW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _READYW < 'a > { w : & 'a mut W , } impl < 'a > _READYW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : READYW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( READYW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DOWN`" ] pub enum DOWNW { # [ doc = "Disable" ] CLEAR } impl DOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DOWNW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _DOWNW < 'a > { w : & 'a mut W , } impl < 'a > _DOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( DOWNW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `UP`" ] pub enum UPW { # [ doc = "Disable" ] CLEAR } impl UPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _UPW < 'a > { w : & 'a mut W , } impl < 'a > _UPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( UPW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CROSS`" ] pub enum CROSSW { # [ doc = "Disable" ] CLEAR } impl CROSSW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CROSSW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CROSSW < 'a > { w : & 'a mut W , } impl < 'a > _CROSSW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CROSSW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CROSSW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & self ) -> DOWNR { DOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for UP event" ] # [ inline ] pub fn up ( & self ) -> UPR { UPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & self ) -> CROSSR { CROSSR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for READY event" ] # [ inline ] pub fn ready ( & mut self ) -> _READYW { _READYW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for DOWN event" ] # [ inline ] pub fn down ( & mut self ) -> _DOWNW { _DOWNW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for UP event" ] # [ inline ] pub fn up ( & mut self ) -> _UPW { _UPW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for CROSS event" ] # [ inline ] pub fn cross ( & mut self ) -> _CROSSW { _CROSSW { w : self } } } } # [ doc = "Compare result" ] pub struct RESULT { register : VolatileCell < u32 > } # [ doc = "Compare result" ] pub mod result { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: RESULT { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `RESULT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RESULTR { # [ doc = "Input voltage is below the reference threshold (VIN+ &lt; VIN-)." ] BELOW , # [ doc = "Input voltage is above the reference threshold (VIN+ &gt; VIN-)." ] ABOVE } impl RESULTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RESULTR :: BELOW => false , RESULTR :: ABOVE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RESULTR { match value { false => RESULTR :: BELOW , true => RESULTR :: ABOVE , } } # [ doc = "Checks if the value of the field is `BELOW`" ] # [ inline ] pub fn is_below ( & self ) -> bool { * self == RESULTR :: BELOW } # [ doc = "Checks if the value of the field is `ABOVE`" ] # [ inline ] pub fn is_above ( & self ) -> bool { * self == RESULTR :: ABOVE } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Result of last compare. Decision point SAMPLE task." ] # [ inline ] pub fn result ( & self ) -> RESULTR { RESULTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Enable LPCOMP" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable LPCOMP" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ENABLER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ENABLER :: DISABLED => 0 , ENABLER :: ENABLED => 0x01 , ENABLER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ENABLER { match value { 0 => ENABLER :: DISABLED , 1 => ENABLER :: ENABLED , i => ENABLER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ENABLEW :: DISABLED => 0 , ENABLEW :: ENABLED => 1 } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Enable or disable LPCOMP" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Enable or disable LPCOMP" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Input pin select" ] pub struct PSEL { register : VolatileCell < u32 > } # [ doc = "Input pin select" ] pub mod psel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PSELR { # [ doc = "AIN0 selected as analog input" ] ANALOGINPUT0 , # [ doc = "AIN1 selected as analog input" ] ANALOGINPUT1 , # [ doc = "AIN2 selected as analog input" ] ANALOGINPUT2 , # [ doc = "AIN3 selected as analog input" ] ANALOGINPUT3 , # [ doc = "AIN4 selected as analog input" ] ANALOGINPUT4 , # [ doc = "AIN5 selected as analog input" ] ANALOGINPUT5 , # [ doc = "AIN6 selected as analog input" ] ANALOGINPUT6 , # [ doc = "AIN7 selected as analog input" ] ANALOGINPUT7 } impl PSELR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PSELR :: ANALOGINPUT0 => 0 , PSELR :: ANALOGINPUT1 => 0x01 , PSELR :: ANALOGINPUT2 => 0x02 , PSELR :: ANALOGINPUT3 => 0x03 , PSELR :: ANALOGINPUT4 => 0x04 , PSELR :: ANALOGINPUT5 => 0x05 , PSELR :: ANALOGINPUT6 => 0x06 , PSELR :: ANALOGINPUT7 => 0x07 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PSELR { match value { 0 => PSELR :: ANALOGINPUT0 , 1 => PSELR :: ANALOGINPUT1 , 2 => PSELR :: ANALOGINPUT2 , 3 => PSELR :: ANALOGINPUT3 , 4 => PSELR :: ANALOGINPUT4 , 5 => PSELR :: ANALOGINPUT5 , 6 => PSELR :: ANALOGINPUT6 , 7 => PSELR :: ANALOGINPUT7 , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `ANALOGINPUT0`" ] # [ inline ] pub fn is_analog_input0 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT0 } # [ doc = "Checks if the value of the field is `ANALOGINPUT1`" ] # [ inline ] pub fn is_analog_input1 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT1 } # [ doc = "Checks if the value of the field is `ANALOGINPUT2`" ] # [ inline ] pub fn is_analog_input2 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT2 } # [ doc = "Checks if the value of the field is `ANALOGINPUT3`" ] # [ inline ] pub fn is_analog_input3 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT3 } # [ doc = "Checks if the value of the field is `ANALOGINPUT4`" ] # [ inline ] pub fn is_analog_input4 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT4 } # [ doc = "Checks if the value of the field is `ANALOGINPUT5`" ] # [ inline ] pub fn is_analog_input5 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT5 } # [ doc = "Checks if the value of the field is `ANALOGINPUT6`" ] # [ inline ] pub fn is_analog_input6 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT6 } # [ doc = "Checks if the value of the field is `ANALOGINPUT7`" ] # [ inline ] pub fn is_analog_input7 ( & self ) -> bool { * self == PSELR :: ANALOGINPUT7 } } # [ doc = "Values that can be written to the field `PSEL`" ] pub enum PSELW { # [ doc = "AIN0 selected as analog input" ] ANALOGINPUT0 , # [ doc = "AIN1 selected as analog input" ] ANALOGINPUT1 , # [ doc = "AIN2 selected as analog input" ] ANALOGINPUT2 , # [ doc = "AIN3 selected as analog input" ] ANALOGINPUT3 , # [ doc = "AIN4 selected as analog input" ] ANALOGINPUT4 , # [ doc = "AIN5 selected as analog input" ] ANALOGINPUT5 , # [ doc = "AIN6 selected as analog input" ] ANALOGINPUT6 , # [ doc = "AIN7 selected as analog input" ] ANALOGINPUT7 } impl PSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PSELW :: ANALOGINPUT0 => 0 , PSELW :: ANALOGINPUT1 => 1 , PSELW :: ANALOGINPUT2 => 2 , PSELW :: ANALOGINPUT3 => 3 , PSELW :: ANALOGINPUT4 => 4 , PSELW :: ANALOGINPUT5 => 5 , PSELW :: ANALOGINPUT6 => 6 , PSELW :: ANALOGINPUT7 => 7 } } } # [ doc = r" Proxy" ] pub struct _PSELW < 'a > { w : & 'a mut W , } impl < 'a > _PSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PSELW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "AIN0 selected as analog input" ] # [ inline ] pub fn analog_input0 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT0 ) } # [ doc = "AIN1 selected as analog input" ] # [ inline ] pub fn analog_input1 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT1 ) } # [ doc = "AIN2 selected as analog input" ] # [ inline ] pub fn analog_input2 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT2 ) } # [ doc = "AIN3 selected as analog input" ] # [ inline ] pub fn analog_input3 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT3 ) } # [ doc = "AIN4 selected as analog input" ] # [ inline ] pub fn analog_input4 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT4 ) } # [ doc = "AIN5 selected as analog input" ] # [ inline ] pub fn analog_input5 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT5 ) } # [ doc = "AIN6 selected as analog input" ] # [ inline ] pub fn analog_input6 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT6 ) } # [ doc = "AIN7 selected as analog input" ] # [ inline ] pub fn analog_input7 ( self ) -> & 'a mut W { self . variant ( PSELW :: ANALOGINPUT7 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Analog pin select" ] # [ inline ] pub fn psel ( & self ) -> PSELR { PSELR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Analog pin select" ] # [ inline ] pub fn psel ( & mut self ) -> _PSELW { _PSELW { w : self } } } } # [ doc = "Reference select" ] pub struct REFSEL { register : VolatileCell < u32 > } # [ doc = "Reference select" ] pub mod refsel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REFSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REFSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REFSELR { # [ doc = "VDD * 1/8 selected as reference" ] REF1_8VDD , # [ doc = "VDD * 2/8 selected as reference" ] REF2_8VDD , # [ doc = "VDD * 3/8 selected as reference" ] REF3_8VDD , # [ doc = "VDD * 4/8 selected as reference" ] REF4_8VDD , # [ doc = "VDD * 5/8 selected as reference" ] REF5_8VDD , # [ doc = "VDD * 6/8 selected as reference" ] REF6_8VDD , # [ doc = "VDD * 7/8 selected as reference" ] REF7_8VDD , # [ doc = "External analog reference selected" ] AREF , # [ doc = "VDD * 1/16 selected as reference" ] REF1_16VDD , # [ doc = "VDD * 3/16 selected as reference" ] REF3_16VDD , # [ doc = "VDD * 5/16 selected as reference" ] REF5_16VDD , # [ doc = "VDD * 7/16 selected as reference" ] REF7_16VDD , # [ doc = "VDD * 9/16 selected as reference" ] REF9_16VDD , # [ doc = "VDD * 11/16 selected as reference" ] REF11_16VDD , # [ doc = "VDD * 13/16 selected as reference" ] REF13_16VDD , # [ doc = "VDD * 15/16 selected as reference" ] REF15_16VDD } impl REFSELR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { REFSELR :: REF1_8VDD => 0 , REFSELR :: REF2_8VDD => 0x01 , REFSELR :: REF3_8VDD => 0x02 , REFSELR :: REF4_8VDD => 0x03 , REFSELR :: REF5_8VDD => 0x04 , REFSELR :: REF6_8VDD => 0x05 , REFSELR :: REF7_8VDD => 0x06 , REFSELR :: AREF => 0x07 , REFSELR :: REF1_16VDD => 0x08 , REFSELR :: REF3_16VDD => 0x09 , REFSELR :: REF5_16VDD => 0x0a , REFSELR :: REF7_16VDD => 0x0b , REFSELR :: REF9_16VDD => 0x0c , REFSELR :: REF11_16VDD => 0x0d , REFSELR :: REF13_16VDD => 0x0e , REFSELR :: REF15_16VDD => 0x0f } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> REFSELR { match value { 0 => REFSELR :: REF1_8VDD , 1 => REFSELR :: REF2_8VDD , 2 => REFSELR :: REF3_8VDD , 3 => REFSELR :: REF4_8VDD , 4 => REFSELR :: REF5_8VDD , 5 => REFSELR :: REF6_8VDD , 6 => REFSELR :: REF7_8VDD , 7 => REFSELR :: AREF , 8 => REFSELR :: REF1_16VDD , 9 => REFSELR :: REF3_16VDD , 10 => REFSELR :: REF5_16VDD , 11 => REFSELR :: REF7_16VDD , 12 => REFSELR :: REF9_16VDD , 13 => REFSELR :: REF11_16VDD , 14 => REFSELR :: REF13_16VDD , 15 => REFSELR :: REF15_16VDD , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `REF1_8VDD`" ] # [ inline ] pub fn is_ref1_8vdd ( & self ) -> bool { * self == REFSELR :: REF1_8VDD } # [ doc = "Checks if the value of the field is `REF2_8VDD`" ] # [ inline ] pub fn is_ref2_8vdd ( & self ) -> bool { * self == REFSELR :: REF2_8VDD } # [ doc = "Checks if the value of the field is `REF3_8VDD`" ] # [ inline ] pub fn is_ref3_8vdd ( & self ) -> bool { * self == REFSELR :: REF3_8VDD } # [ doc = "Checks if the value of the field is `REF4_8VDD`" ] # [ inline ] pub fn is_ref4_8vdd ( & self ) -> bool { * self == REFSELR :: REF4_8VDD } # [ doc = "Checks if the value of the field is `REF5_8VDD`" ] # [ inline ] pub fn is_ref5_8vdd ( & self ) -> bool { * self == REFSELR :: REF5_8VDD } # [ doc = "Checks if the value of the field is `REF6_8VDD`" ] # [ inline ] pub fn is_ref6_8vdd ( & self ) -> bool { * self == REFSELR :: REF6_8VDD } # [ doc = "Checks if the value of the field is `REF7_8VDD`" ] # [ inline ] pub fn is_ref7_8vdd ( & self ) -> bool { * self == REFSELR :: REF7_8VDD } # [ doc = "Checks if the value of the field is `AREF`" ] # [ inline ] pub fn is_aref ( & self ) -> bool { * self == REFSELR :: AREF } # [ doc = "Checks if the value of the field is `REF1_16VDD`" ] # [ inline ] pub fn is_ref1_16vdd ( & self ) -> bool { * self == REFSELR :: REF1_16VDD } # [ doc = "Checks if the value of the field is `REF3_16VDD`" ] # [ inline ] pub fn is_ref3_16vdd ( & self ) -> bool { * self == REFSELR :: REF3_16VDD } # [ doc = "Checks if the value of the field is `REF5_16VDD`" ] # [ inline ] pub fn is_ref5_16vdd ( & self ) -> bool { * self == REFSELR :: REF5_16VDD } # [ doc = "Checks if the value of the field is `REF7_16VDD`" ] # [ inline ] pub fn is_ref7_16vdd ( & self ) -> bool { * self == REFSELR :: REF7_16VDD } # [ doc = "Checks if the value of the field is `REF9_16VDD`" ] # [ inline ] pub fn is_ref9_16vdd ( & self ) -> bool { * self == REFSELR :: REF9_16VDD } # [ doc = "Checks if the value of the field is `REF11_16VDD`" ] # [ inline ] pub fn is_ref11_16vdd ( & self ) -> bool { * self == REFSELR :: REF11_16VDD } # [ doc = "Checks if the value of the field is `REF13_16VDD`" ] # [ inline ] pub fn is_ref13_16vdd ( & self ) -> bool { * self == REFSELR :: REF13_16VDD } # [ doc = "Checks if the value of the field is `REF15_16VDD`" ] # [ inline ] pub fn is_ref15_16vdd ( & self ) -> bool { * self == REFSELR :: REF15_16VDD } } # [ doc = "Values that can be written to the field `REFSEL`" ] pub enum REFSELW { # [ doc = "VDD * 1/8 selected as reference" ] REF1_8VDD , # [ doc = "VDD * 2/8 selected as reference" ] REF2_8VDD , # [ doc = "VDD * 3/8 selected as reference" ] REF3_8VDD , # [ doc = "VDD * 4/8 selected as reference" ] REF4_8VDD , # [ doc = "VDD * 5/8 selected as reference" ] REF5_8VDD , # [ doc = "VDD * 6/8 selected as reference" ] REF6_8VDD , # [ doc = "VDD * 7/8 selected as reference" ] REF7_8VDD , # [ doc = "External analog reference selected" ] AREF , # [ doc = "VDD * 1/16 selected as reference" ] REF1_16VDD , # [ doc = "VDD * 3/16 selected as reference" ] REF3_16VDD , # [ doc = "VDD * 5/16 selected as reference" ] REF5_16VDD , # [ doc = "VDD * 7/16 selected as reference" ] REF7_16VDD , # [ doc = "VDD * 9/16 selected as reference" ] REF9_16VDD , # [ doc = "VDD * 11/16 selected as reference" ] REF11_16VDD , # [ doc = "VDD * 13/16 selected as reference" ] REF13_16VDD , # [ doc = "VDD * 15/16 selected as reference" ] REF15_16VDD } impl REFSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { REFSELW :: REF1_8VDD => 0 , REFSELW :: REF2_8VDD => 1 , REFSELW :: REF3_8VDD => 2 , REFSELW :: REF4_8VDD => 3 , REFSELW :: REF5_8VDD => 4 , REFSELW :: REF6_8VDD => 5 , REFSELW :: REF7_8VDD => 6 , REFSELW :: AREF => 7 , REFSELW :: REF1_16VDD => 8 , REFSELW :: REF3_16VDD => 9 , REFSELW :: REF5_16VDD => 10 , REFSELW :: REF7_16VDD => 11 , REFSELW :: REF9_16VDD => 12 , REFSELW :: REF11_16VDD => 13 , REFSELW :: REF13_16VDD => 14 , REFSELW :: REF15_16VDD => 15 } } } # [ doc = r" Proxy" ] pub struct _REFSELW < 'a > { w : & 'a mut W , } impl < 'a > _REFSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REFSELW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "VDD * 1/8 selected as reference" ] # [ inline ] pub fn ref1_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF1_8VDD ) } # [ doc = "VDD * 2/8 selected as reference" ] # [ inline ] pub fn ref2_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF2_8VDD ) } # [ doc = "VDD * 3/8 selected as reference" ] # [ inline ] pub fn ref3_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF3_8VDD ) } # [ doc = "VDD * 4/8 selected as reference" ] # [ inline ] pub fn ref4_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF4_8VDD ) } # [ doc = "VDD * 5/8 selected as reference" ] # [ inline ] pub fn ref5_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF5_8VDD ) } # [ doc = "VDD * 6/8 selected as reference" ] # [ inline ] pub fn ref6_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF6_8VDD ) } # [ doc = "VDD * 7/8 selected as reference" ] # [ inline ] pub fn ref7_8vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF7_8VDD ) } # [ doc = "External analog reference selected" ] # [ inline ] pub fn aref ( self ) -> & 'a mut W { self . variant ( REFSELW :: AREF ) } # [ doc = "VDD * 1/16 selected as reference" ] # [ inline ] pub fn ref1_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF1_16VDD ) } # [ doc = "VDD * 3/16 selected as reference" ] # [ inline ] pub fn ref3_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF3_16VDD ) } # [ doc = "VDD * 5/16 selected as reference" ] # [ inline ] pub fn ref5_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF5_16VDD ) } # [ doc = "VDD * 7/16 selected as reference" ] # [ inline ] pub fn ref7_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF7_16VDD ) } # [ doc = "VDD * 9/16 selected as reference" ] # [ inline ] pub fn ref9_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF9_16VDD ) } # [ doc = "VDD * 11/16 selected as reference" ] # [ inline ] pub fn ref11_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF11_16VDD ) } # [ doc = "VDD * 13/16 selected as reference" ] # [ inline ] pub fn ref13_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF13_16VDD ) } # [ doc = "VDD * 15/16 selected as reference" ] # [ inline ] pub fn ref15_16vdd ( self ) -> & 'a mut W { self . variant ( REFSELW :: REF15_16VDD ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:3 - Reference select" ] # [ inline ] pub fn refsel ( & self ) -> REFSELR { REFSELR :: _from ( { const MASK : u8 = 0x0f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x04 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:3 - Reference select" ] # [ inline ] pub fn refsel ( & mut self ) -> _REFSELW { _REFSELW { w : self } } } } # [ doc = "External reference select" ] pub struct EXTREFSEL { register : VolatileCell < u32 > } # [ doc = "External reference select" ] pub mod extrefsel { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EXTREFSEL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `EXTREFSEL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EXTREFSELR { # [ doc = "Use AIN0 as external analog reference" ] ANALOGREFERENCE0 , # [ doc = "Use AIN1 as external analog reference" ] ANALOGREFERENCE1 } impl EXTREFSELR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { EXTREFSELR :: ANALOGREFERENCE0 => false , EXTREFSELR :: ANALOGREFERENCE1 => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> EXTREFSELR { match value { false => EXTREFSELR :: ANALOGREFERENCE0 , true => EXTREFSELR :: ANALOGREFERENCE1 , } } # [ doc = "Checks if the value of the field is `ANALOGREFERENCE0`" ] # [ inline ] pub fn is_analog_reference0 ( & self ) -> bool { * self == EXTREFSELR :: ANALOGREFERENCE0 } # [ doc = "Checks if the value of the field is `ANALOGREFERENCE1`" ] # [ inline ] pub fn is_analog_reference1 ( & self ) -> bool { * self == EXTREFSELR :: ANALOGREFERENCE1 } } # [ doc = "Values that can be written to the field `EXTREFSEL`" ] pub enum EXTREFSELW { # [ doc = "Use AIN0 as external analog reference" ] ANALOGREFERENCE0 , # [ doc = "Use AIN1 as external analog reference" ] ANALOGREFERENCE1 } impl EXTREFSELW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { EXTREFSELW :: ANALOGREFERENCE0 => false , EXTREFSELW :: ANALOGREFERENCE1 => true } } } # [ doc = r" Proxy" ] pub struct _EXTREFSELW < 'a > { w : & 'a mut W , } impl < 'a > _EXTREFSELW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : EXTREFSELW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Use AIN0 as external analog reference" ] # [ inline ] pub fn analog_reference0 ( self ) -> & 'a mut W { self . variant ( EXTREFSELW :: ANALOGREFERENCE0 ) } # [ doc = "Use AIN1 as external analog reference" ] # [ inline ] pub fn analog_reference1 ( self ) -> & 'a mut W { self . variant ( EXTREFSELW :: ANALOGREFERENCE1 ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - External analog reference select" ] # [ inline ] pub fn extrefsel ( & self ) -> EXTREFSELR { EXTREFSELR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - External analog reference select" ] # [ inline ] pub fn extrefsel ( & mut self ) -> _EXTREFSELW { _EXTREFSELW { w : self } } } } # [ doc = "Analog detect configuration" ] pub struct ANADETECT { register : VolatileCell < u32 > } # [ doc = "Analog detect configuration" ] pub mod anadetect { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ANADETECT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ANADETECT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ANADETECTR { # [ doc = "Generate ANADETECT on crossing, both upward crossing and downward crossing" ] CROSS , # [ doc = "Generate ANADETECT on upward crossing only" ] UP , # [ doc = "Generate ANADETECT on downward crossing only" ] DOWN , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl ANADETECTR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { ANADETECTR :: CROSS => 0 , ANADETECTR :: UP => 0x01 , ANADETECTR :: DOWN => 0x02 , ANADETECTR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> ANADETECTR { match value { 0 => ANADETECTR :: CROSS , 1 => ANADETECTR :: UP , 2 => ANADETECTR :: DOWN , i => ANADETECTR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `CROSS`" ] # [ inline ] pub fn is_cross ( & self ) -> bool { * self == ANADETECTR :: CROSS } # [ doc = "Checks if the value of the field is `UP`" ] # [ inline ] pub fn is_up ( & self ) -> bool { * self == ANADETECTR :: UP } # [ doc = "Checks if the value of the field is `DOWN`" ] # [ inline ] pub fn is_down ( & self ) -> bool { * self == ANADETECTR :: DOWN } } # [ doc = "Values that can be written to the field `ANADETECT`" ] pub enum ANADETECTW { # [ doc = "Generate ANADETECT on crossing, both upward crossing and downward crossing" ] CROSS , # [ doc = "Generate ANADETECT on upward crossing only" ] UP , # [ doc = "Generate ANADETECT on downward crossing only" ] DOWN } impl ANADETECTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { ANADETECTW :: CROSS => 0 , ANADETECTW :: UP => 1 , ANADETECTW :: DOWN => 2 } } } # [ doc = r" Proxy" ] pub struct _ANADETECTW < 'a > { w : & 'a mut W , } impl < 'a > _ANADETECTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ANADETECTW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Generate ANADETECT on crossing, both upward crossing and downward crossing" ] # [ inline ] pub fn cross ( self ) -> & 'a mut W { self . variant ( ANADETECTW :: CROSS ) } # [ doc = "Generate ANADETECT on upward crossing only" ] # [ inline ] pub fn up ( self ) -> & 'a mut W { self . variant ( ANADETECTW :: UP ) } # [ doc = "Generate ANADETECT on downward crossing only" ] # [ inline ] pub fn down ( self ) -> & 'a mut W { self . variant ( ANADETECTW :: DOWN ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Analog detect configuration" ] # [ inline ] pub fn anadetect ( & self ) -> ANADETECTR { ANADETECTR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Analog detect configuration" ] # [ inline ] pub fn anadetect ( & mut self ) -> _ANADETECTW { _ANADETECTW { w : self } } } } # [ doc = "Comparator hysteresis enable" ] pub struct HYST { register : VolatileCell < u32 > } # [ doc = "Comparator hysteresis enable" ] pub mod hyst { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: HYST { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `HYST`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum HYSTR { # [ doc = "Comparator hysteresis disabled" ] NOHYST , # [ doc = "Comparator hysteresis disabled (typ. 50 mV)" ] HYST50MV } impl HYSTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { HYSTR :: NOHYST => false , HYSTR :: HYST50MV => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> HYSTR { match value { false => HYSTR :: NOHYST , true => HYSTR :: HYST50MV , } } # [ doc = "Checks if the value of the field is `NOHYST`" ] # [ inline ] pub fn is_no_hyst ( & self ) -> bool { * self == HYSTR :: NOHYST } # [ doc = "Checks if the value of the field is `HYST50MV`" ] # [ inline ] pub fn is_hyst50m_v ( & self ) -> bool { * self == HYSTR :: HYST50MV } } # [ doc = "Values that can be written to the field `HYST`" ] pub enum HYSTW { # [ doc = "Comparator hysteresis disabled" ] NOHYST , # [ doc = "Comparator hysteresis disabled (typ. 50 mV)" ] HYST50MV } impl HYSTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { HYSTW :: NOHYST => false , HYSTW :: HYST50MV => true } } } # [ doc = r" Proxy" ] pub struct _HYSTW < 'a > { w : & 'a mut W , } impl < 'a > _HYSTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : HYSTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Comparator hysteresis disabled" ] # [ inline ] pub fn no_hyst ( self ) -> & 'a mut W { self . variant ( HYSTW :: NOHYST ) } # [ doc = "Comparator hysteresis disabled (typ. 50 mV)" ] # [ inline ] pub fn hyst50m_v ( self ) -> & 'a mut W { self . variant ( HYSTW :: HYST50MV ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Comparator hysteresis enable" ] # [ inline ] pub fn hyst ( & self ) -> HYSTR { HYSTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Comparator hysteresis enable" ] # [ inline ] pub fn hyst ( & mut self ) -> _HYSTW { _HYSTW { w : self } } } } } # [ doc = "Software interrupt 0" ] pub struct SWI0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI0 { } impl SWI0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_4000 as * const _ } } impl Deref for SWI0 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI0 :: ptr ( ) } } } # [ doc = "Software interrupt 0" ] pub mod swi0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Unused." ] pub unused : UNUSED , } # [ doc = "Unused." ] pub struct UNUSED { register : VolatileCell < u32 > } # [ doc = "Unused." ] pub mod unused { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: UNUSED { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } } } # [ doc = "Event Generator Unit 0" ] pub struct EGU0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU0 { } impl EGU0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_4000 as * const _ } } impl Deref for EGU0 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU0 :: ptr ( ) } } } # [ doc = "Event Generator Unit 0" ] pub mod egu0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Description collection[0]: Trigger 0 for triggering the corresponding TRIGGERED[0] event" ] pub tasks_trigger : [ TASKS_TRIGGER ; 16 ] , _reserved0 : [ u8 ; 192usize ] , # [ doc = "0x100 - Description collection[0]: Event number 0 generated by triggering the corresponding TRIGGER[0] task" ] pub events_triggered : [ EVENTS_TRIGGERED ; 16 ] , _reserved1 : [ u8 ; 448usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , } # [ doc = "Description collection[0]: Trigger 0 for triggering the corresponding TRIGGERED[0] event" ] pub struct TASKS_TRIGGER { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Trigger 0 for triggering the corresponding TRIGGERED[0] event" ] pub mod tasks_trigger { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_TRIGGER { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Event number 0 generated by triggering the corresponding TRIGGER[0] task" ] pub struct EVENTS_TRIGGERED { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Event number 0 generated by triggering the corresponding TRIGGER[0] task" ] pub mod events_triggered { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TRIGGERED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TRIGGERED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED0R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED0R :: DISABLED => false , TRIGGERED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED0R { match value { false => TRIGGERED0R :: DISABLED , true => TRIGGERED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED0R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED1R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED1R :: DISABLED => false , TRIGGERED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED1R { match value { false => TRIGGERED1R :: DISABLED , true => TRIGGERED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED1R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED2R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED2R :: DISABLED => false , TRIGGERED2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED2R { match value { false => TRIGGERED2R :: DISABLED , true => TRIGGERED2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED2R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED3R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED3R :: DISABLED => false , TRIGGERED3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED3R { match value { false => TRIGGERED3R :: DISABLED , true => TRIGGERED3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED3R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED4R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED4R :: DISABLED => false , TRIGGERED4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED4R { match value { false => TRIGGERED4R :: DISABLED , true => TRIGGERED4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED4R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED5R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED5R :: DISABLED => false , TRIGGERED5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED5R { match value { false => TRIGGERED5R :: DISABLED , true => TRIGGERED5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED5R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED6R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED6R :: DISABLED => false , TRIGGERED6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED6R { match value { false => TRIGGERED6R :: DISABLED , true => TRIGGERED6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED6R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED7R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED7R :: DISABLED => false , TRIGGERED7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED7R { match value { false => TRIGGERED7R :: DISABLED , true => TRIGGERED7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED7R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED8R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED8R :: DISABLED => false , TRIGGERED8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED8R { match value { false => TRIGGERED8R :: DISABLED , true => TRIGGERED8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED8R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED9R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED9R :: DISABLED => false , TRIGGERED9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED9R { match value { false => TRIGGERED9R :: DISABLED , true => TRIGGERED9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED9R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED10R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED10R :: DISABLED => false , TRIGGERED10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED10R { match value { false => TRIGGERED10R :: DISABLED , true => TRIGGERED10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED10R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED11R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED11R :: DISABLED => false , TRIGGERED11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED11R { match value { false => TRIGGERED11R :: DISABLED , true => TRIGGERED11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED11R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED12R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED12R :: DISABLED => false , TRIGGERED12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED12R { match value { false => TRIGGERED12R :: DISABLED , true => TRIGGERED12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED12R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED13R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED13R :: DISABLED => false , TRIGGERED13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED13R { match value { false => TRIGGERED13R :: DISABLED , true => TRIGGERED13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED13R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED14R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED14R :: DISABLED => false , TRIGGERED14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED14R { match value { false => TRIGGERED14R :: DISABLED , true => TRIGGERED14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED14R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED15R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED15R :: DISABLED => false , TRIGGERED15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED15R { match value { false => TRIGGERED15R :: DISABLED , true => TRIGGERED15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED15R :: ENABLED } } # [ doc = "Values that can be written to the field `TRIGGERED0`" ] pub enum TRIGGERED0W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED0W :: DISABLED => false , TRIGGERED0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED0W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED0W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED1`" ] pub enum TRIGGERED1W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED1W :: DISABLED => false , TRIGGERED1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED1W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED1W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED2`" ] pub enum TRIGGERED2W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED2W :: DISABLED => false , TRIGGERED2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED2W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED2W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED3`" ] pub enum TRIGGERED3W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED3W :: DISABLED => false , TRIGGERED3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED3W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED3W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED4`" ] pub enum TRIGGERED4W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED4W :: DISABLED => false , TRIGGERED4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED4W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED4W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED5`" ] pub enum TRIGGERED5W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED5W :: DISABLED => false , TRIGGERED5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED5W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED5W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED6`" ] pub enum TRIGGERED6W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED6W :: DISABLED => false , TRIGGERED6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED6W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED6W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED7`" ] pub enum TRIGGERED7W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED7W :: DISABLED => false , TRIGGERED7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED7W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED7W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED8`" ] pub enum TRIGGERED8W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED8W :: DISABLED => false , TRIGGERED8W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED8W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED8W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED8W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED9`" ] pub enum TRIGGERED9W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED9W :: DISABLED => false , TRIGGERED9W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED9W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED9W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED9W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED10`" ] pub enum TRIGGERED10W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED10W :: DISABLED => false , TRIGGERED10W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED10W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED10W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED10W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED11`" ] pub enum TRIGGERED11W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED11W :: DISABLED => false , TRIGGERED11W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED11W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED11W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED11W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED12`" ] pub enum TRIGGERED12W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED12W :: DISABLED => false , TRIGGERED12W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED12W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED12W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED12W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED13`" ] pub enum TRIGGERED13W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED13W :: DISABLED => false , TRIGGERED13W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED13W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED13W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED13W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED14`" ] pub enum TRIGGERED14W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED14W :: DISABLED => false , TRIGGERED14W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED14W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED14W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED14W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED15`" ] pub enum TRIGGERED15W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TRIGGERED15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED15W :: DISABLED => false , TRIGGERED15W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED15W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED15W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TRIGGERED15W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & self ) -> TRIGGERED0R { TRIGGERED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & self ) -> TRIGGERED1R { TRIGGERED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & self ) -> TRIGGERED2R { TRIGGERED2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & self ) -> TRIGGERED3R { TRIGGERED3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & self ) -> TRIGGERED4R { TRIGGERED4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & self ) -> TRIGGERED5R { TRIGGERED5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & self ) -> TRIGGERED6R { TRIGGERED6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & self ) -> TRIGGERED7R { TRIGGERED7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable or disable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & self ) -> TRIGGERED8R { TRIGGERED8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & self ) -> TRIGGERED9R { TRIGGERED9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable or disable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & self ) -> TRIGGERED10R { TRIGGERED10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable or disable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & self ) -> TRIGGERED11R { TRIGGERED11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable or disable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & self ) -> TRIGGERED12R { TRIGGERED12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable or disable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & self ) -> TRIGGERED13R { TRIGGERED13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable or disable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & self ) -> TRIGGERED14R { TRIGGERED14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable or disable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & self ) -> TRIGGERED15R { TRIGGERED15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & mut self ) -> _TRIGGERED0W { _TRIGGERED0W { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & mut self ) -> _TRIGGERED1W { _TRIGGERED1W { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & mut self ) -> _TRIGGERED2W { _TRIGGERED2W { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & mut self ) -> _TRIGGERED3W { _TRIGGERED3W { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & mut self ) -> _TRIGGERED4W { _TRIGGERED4W { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & mut self ) -> _TRIGGERED5W { _TRIGGERED5W { w : self } } # [ doc = "Bit 6 - Enable or disable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & mut self ) -> _TRIGGERED6W { _TRIGGERED6W { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & mut self ) -> _TRIGGERED7W { _TRIGGERED7W { w : self } } # [ doc = "Bit 8 - Enable or disable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & mut self ) -> _TRIGGERED8W { _TRIGGERED8W { w : self } } # [ doc = "Bit 9 - Enable or disable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & mut self ) -> _TRIGGERED9W { _TRIGGERED9W { w : self } } # [ doc = "Bit 10 - Enable or disable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & mut self ) -> _TRIGGERED10W { _TRIGGERED10W { w : self } } # [ doc = "Bit 11 - Enable or disable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & mut self ) -> _TRIGGERED11W { _TRIGGERED11W { w : self } } # [ doc = "Bit 12 - Enable or disable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & mut self ) -> _TRIGGERED12W { _TRIGGERED12W { w : self } } # [ doc = "Bit 13 - Enable or disable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & mut self ) -> _TRIGGERED13W { _TRIGGERED13W { w : self } } # [ doc = "Bit 14 - Enable or disable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & mut self ) -> _TRIGGERED14W { _TRIGGERED14W { w : self } } # [ doc = "Bit 15 - Enable or disable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & mut self ) -> _TRIGGERED15W { _TRIGGERED15W { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TRIGGERED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED0R :: DISABLED => false , TRIGGERED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED0R { match value { false => TRIGGERED0R :: DISABLED , true => TRIGGERED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED0R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED1R :: DISABLED => false , TRIGGERED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED1R { match value { false => TRIGGERED1R :: DISABLED , true => TRIGGERED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED1R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED2R :: DISABLED => false , TRIGGERED2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED2R { match value { false => TRIGGERED2R :: DISABLED , true => TRIGGERED2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED2R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED3R :: DISABLED => false , TRIGGERED3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED3R { match value { false => TRIGGERED3R :: DISABLED , true => TRIGGERED3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED3R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED4R :: DISABLED => false , TRIGGERED4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED4R { match value { false => TRIGGERED4R :: DISABLED , true => TRIGGERED4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED4R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED5R :: DISABLED => false , TRIGGERED5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED5R { match value { false => TRIGGERED5R :: DISABLED , true => TRIGGERED5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED5R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED6R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED6R :: DISABLED => false , TRIGGERED6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED6R { match value { false => TRIGGERED6R :: DISABLED , true => TRIGGERED6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED6R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED7R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED7R :: DISABLED => false , TRIGGERED7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED7R { match value { false => TRIGGERED7R :: DISABLED , true => TRIGGERED7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED7R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED8R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED8R :: DISABLED => false , TRIGGERED8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED8R { match value { false => TRIGGERED8R :: DISABLED , true => TRIGGERED8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED8R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED9R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED9R :: DISABLED => false , TRIGGERED9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED9R { match value { false => TRIGGERED9R :: DISABLED , true => TRIGGERED9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED9R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED10R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED10R :: DISABLED => false , TRIGGERED10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED10R { match value { false => TRIGGERED10R :: DISABLED , true => TRIGGERED10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED10R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED11R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED11R :: DISABLED => false , TRIGGERED11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED11R { match value { false => TRIGGERED11R :: DISABLED , true => TRIGGERED11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED11R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED12R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED12R :: DISABLED => false , TRIGGERED12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED12R { match value { false => TRIGGERED12R :: DISABLED , true => TRIGGERED12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED12R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED13R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED13R :: DISABLED => false , TRIGGERED13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED13R { match value { false => TRIGGERED13R :: DISABLED , true => TRIGGERED13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED13R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED14R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED14R :: DISABLED => false , TRIGGERED14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED14R { match value { false => TRIGGERED14R :: DISABLED , true => TRIGGERED14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED14R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED15R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED15R :: DISABLED => false , TRIGGERED15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED15R { match value { false => TRIGGERED15R :: DISABLED , true => TRIGGERED15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED15R :: ENABLED } } # [ doc = "Values that can be written to the field `TRIGGERED0`" ] pub enum TRIGGERED0W { # [ doc = "Enable" ] SET } impl TRIGGERED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED0W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED1`" ] pub enum TRIGGERED1W { # [ doc = "Enable" ] SET } impl TRIGGERED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED1W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED2`" ] pub enum TRIGGERED2W { # [ doc = "Enable" ] SET } impl TRIGGERED2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED2W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED3`" ] pub enum TRIGGERED3W { # [ doc = "Enable" ] SET } impl TRIGGERED3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED3W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED4`" ] pub enum TRIGGERED4W { # [ doc = "Enable" ] SET } impl TRIGGERED4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED4W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED5`" ] pub enum TRIGGERED5W { # [ doc = "Enable" ] SET } impl TRIGGERED5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED5W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED6`" ] pub enum TRIGGERED6W { # [ doc = "Enable" ] SET } impl TRIGGERED6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED6W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED6W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED6W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED7`" ] pub enum TRIGGERED7W { # [ doc = "Enable" ] SET } impl TRIGGERED7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED7W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED7W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED7W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED8`" ] pub enum TRIGGERED8W { # [ doc = "Enable" ] SET } impl TRIGGERED8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED8W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED8W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED8W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED9`" ] pub enum TRIGGERED9W { # [ doc = "Enable" ] SET } impl TRIGGERED9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED9W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED9W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED9W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED10`" ] pub enum TRIGGERED10W { # [ doc = "Enable" ] SET } impl TRIGGERED10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED10W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED10W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED10W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED11`" ] pub enum TRIGGERED11W { # [ doc = "Enable" ] SET } impl TRIGGERED11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED11W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED11W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED11W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED12`" ] pub enum TRIGGERED12W { # [ doc = "Enable" ] SET } impl TRIGGERED12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED12W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED12W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED12W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED13`" ] pub enum TRIGGERED13W { # [ doc = "Enable" ] SET } impl TRIGGERED13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED13W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED13W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED13W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED14`" ] pub enum TRIGGERED14W { # [ doc = "Enable" ] SET } impl TRIGGERED14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED14W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED14W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED14W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED15`" ] pub enum TRIGGERED15W { # [ doc = "Enable" ] SET } impl TRIGGERED15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED15W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED15W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TRIGGERED15W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & self ) -> TRIGGERED0R { TRIGGERED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & self ) -> TRIGGERED1R { TRIGGERED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & self ) -> TRIGGERED2R { TRIGGERED2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & self ) -> TRIGGERED3R { TRIGGERED3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & self ) -> TRIGGERED4R { TRIGGERED4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & self ) -> TRIGGERED5R { TRIGGERED5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & self ) -> TRIGGERED6R { TRIGGERED6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & self ) -> TRIGGERED7R { TRIGGERED7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Enable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & self ) -> TRIGGERED8R { TRIGGERED8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Enable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & self ) -> TRIGGERED9R { TRIGGERED9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Enable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & self ) -> TRIGGERED10R { TRIGGERED10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Enable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & self ) -> TRIGGERED11R { TRIGGERED11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Enable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & self ) -> TRIGGERED12R { TRIGGERED12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Enable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & self ) -> TRIGGERED13R { TRIGGERED13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Enable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & self ) -> TRIGGERED14R { TRIGGERED14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Write '1' to Enable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & self ) -> TRIGGERED15R { TRIGGERED15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & mut self ) -> _TRIGGERED0W { _TRIGGERED0W { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & mut self ) -> _TRIGGERED1W { _TRIGGERED1W { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & mut self ) -> _TRIGGERED2W { _TRIGGERED2W { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & mut self ) -> _TRIGGERED3W { _TRIGGERED3W { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & mut self ) -> _TRIGGERED4W { _TRIGGERED4W { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & mut self ) -> _TRIGGERED5W { _TRIGGERED5W { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & mut self ) -> _TRIGGERED6W { _TRIGGERED6W { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & mut self ) -> _TRIGGERED7W { _TRIGGERED7W { w : self } } # [ doc = "Bit 8 - Write '1' to Enable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & mut self ) -> _TRIGGERED8W { _TRIGGERED8W { w : self } } # [ doc = "Bit 9 - Write '1' to Enable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & mut self ) -> _TRIGGERED9W { _TRIGGERED9W { w : self } } # [ doc = "Bit 10 - Write '1' to Enable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & mut self ) -> _TRIGGERED10W { _TRIGGERED10W { w : self } } # [ doc = "Bit 11 - Write '1' to Enable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & mut self ) -> _TRIGGERED11W { _TRIGGERED11W { w : self } } # [ doc = "Bit 12 - Write '1' to Enable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & mut self ) -> _TRIGGERED12W { _TRIGGERED12W { w : self } } # [ doc = "Bit 13 - Write '1' to Enable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & mut self ) -> _TRIGGERED13W { _TRIGGERED13W { w : self } } # [ doc = "Bit 14 - Write '1' to Enable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & mut self ) -> _TRIGGERED14W { _TRIGGERED14W { w : self } } # [ doc = "Bit 15 - Write '1' to Enable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & mut self ) -> _TRIGGERED15W { _TRIGGERED15W { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `TRIGGERED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED0R :: DISABLED => false , TRIGGERED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED0R { match value { false => TRIGGERED0R :: DISABLED , true => TRIGGERED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED0R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED1R :: DISABLED => false , TRIGGERED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED1R { match value { false => TRIGGERED1R :: DISABLED , true => TRIGGERED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED1R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED2R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED2R :: DISABLED => false , TRIGGERED2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED2R { match value { false => TRIGGERED2R :: DISABLED , true => TRIGGERED2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED2R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED3R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED3R :: DISABLED => false , TRIGGERED3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED3R { match value { false => TRIGGERED3R :: DISABLED , true => TRIGGERED3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED3R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED4R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED4R :: DISABLED => false , TRIGGERED4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED4R { match value { false => TRIGGERED4R :: DISABLED , true => TRIGGERED4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED4R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED5R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED5R :: DISABLED => false , TRIGGERED5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED5R { match value { false => TRIGGERED5R :: DISABLED , true => TRIGGERED5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED5R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED6R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED6R :: DISABLED => false , TRIGGERED6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED6R { match value { false => TRIGGERED6R :: DISABLED , true => TRIGGERED6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED6R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED7R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED7R :: DISABLED => false , TRIGGERED7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED7R { match value { false => TRIGGERED7R :: DISABLED , true => TRIGGERED7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED7R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED8R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED8R :: DISABLED => false , TRIGGERED8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED8R { match value { false => TRIGGERED8R :: DISABLED , true => TRIGGERED8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED8R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED9R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED9R :: DISABLED => false , TRIGGERED9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED9R { match value { false => TRIGGERED9R :: DISABLED , true => TRIGGERED9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED9R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED10R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED10R :: DISABLED => false , TRIGGERED10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED10R { match value { false => TRIGGERED10R :: DISABLED , true => TRIGGERED10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED10R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED11R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED11R :: DISABLED => false , TRIGGERED11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED11R { match value { false => TRIGGERED11R :: DISABLED , true => TRIGGERED11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED11R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED12R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED12R :: DISABLED => false , TRIGGERED12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED12R { match value { false => TRIGGERED12R :: DISABLED , true => TRIGGERED12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED12R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED13R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED13R :: DISABLED => false , TRIGGERED13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED13R { match value { false => TRIGGERED13R :: DISABLED , true => TRIGGERED13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED13R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED14R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED14R :: DISABLED => false , TRIGGERED14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED14R { match value { false => TRIGGERED14R :: DISABLED , true => TRIGGERED14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED14R :: ENABLED } } # [ doc = "Possible values of the field `TRIGGERED15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TRIGGERED15R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TRIGGERED15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TRIGGERED15R :: DISABLED => false , TRIGGERED15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TRIGGERED15R { match value { false => TRIGGERED15R :: DISABLED , true => TRIGGERED15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TRIGGERED15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TRIGGERED15R :: ENABLED } } # [ doc = "Values that can be written to the field `TRIGGERED0`" ] pub enum TRIGGERED0W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED0W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED1`" ] pub enum TRIGGERED1W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED1W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED2`" ] pub enum TRIGGERED2W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED2W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED3`" ] pub enum TRIGGERED3W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED3W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED4`" ] pub enum TRIGGERED4W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED4W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED5`" ] pub enum TRIGGERED5W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED5W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED6`" ] pub enum TRIGGERED6W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED6W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED6W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED6W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED7`" ] pub enum TRIGGERED7W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED7W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED7W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED7W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED8`" ] pub enum TRIGGERED8W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED8W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED8W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED8W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED9`" ] pub enum TRIGGERED9W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED9W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED9W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED9W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED10`" ] pub enum TRIGGERED10W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED10W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED10W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED10W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED11`" ] pub enum TRIGGERED11W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED11W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED11W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED11W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED12`" ] pub enum TRIGGERED12W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED12W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED12W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED12W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED13`" ] pub enum TRIGGERED13W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED13W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED13W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED13W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED14`" ] pub enum TRIGGERED14W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED14W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED14W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED14W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TRIGGERED15`" ] pub enum TRIGGERED15W { # [ doc = "Disable" ] CLEAR } impl TRIGGERED15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TRIGGERED15W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TRIGGERED15W < 'a > { w : & 'a mut W , } impl < 'a > _TRIGGERED15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TRIGGERED15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TRIGGERED15W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & self ) -> TRIGGERED0R { TRIGGERED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & self ) -> TRIGGERED1R { TRIGGERED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & self ) -> TRIGGERED2R { TRIGGERED2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & self ) -> TRIGGERED3R { TRIGGERED3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & self ) -> TRIGGERED4R { TRIGGERED4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & self ) -> TRIGGERED5R { TRIGGERED5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & self ) -> TRIGGERED6R { TRIGGERED6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & self ) -> TRIGGERED7R { TRIGGERED7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Write '1' to Disable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & self ) -> TRIGGERED8R { TRIGGERED8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Write '1' to Disable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & self ) -> TRIGGERED9R { TRIGGERED9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Write '1' to Disable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & self ) -> TRIGGERED10R { TRIGGERED10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Write '1' to Disable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & self ) -> TRIGGERED11R { TRIGGERED11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Write '1' to Disable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & self ) -> TRIGGERED12R { TRIGGERED12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Write '1' to Disable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & self ) -> TRIGGERED13R { TRIGGERED13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Write '1' to Disable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & self ) -> TRIGGERED14R { TRIGGERED14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Write '1' to Disable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & self ) -> TRIGGERED15R { TRIGGERED15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for TRIGGERED[0] event" ] # [ inline ] pub fn triggered0 ( & mut self ) -> _TRIGGERED0W { _TRIGGERED0W { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for TRIGGERED[1] event" ] # [ inline ] pub fn triggered1 ( & mut self ) -> _TRIGGERED1W { _TRIGGERED1W { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for TRIGGERED[2] event" ] # [ inline ] pub fn triggered2 ( & mut self ) -> _TRIGGERED2W { _TRIGGERED2W { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for TRIGGERED[3] event" ] # [ inline ] pub fn triggered3 ( & mut self ) -> _TRIGGERED3W { _TRIGGERED3W { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for TRIGGERED[4] event" ] # [ inline ] pub fn triggered4 ( & mut self ) -> _TRIGGERED4W { _TRIGGERED4W { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for TRIGGERED[5] event" ] # [ inline ] pub fn triggered5 ( & mut self ) -> _TRIGGERED5W { _TRIGGERED5W { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for TRIGGERED[6] event" ] # [ inline ] pub fn triggered6 ( & mut self ) -> _TRIGGERED6W { _TRIGGERED6W { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for TRIGGERED[7] event" ] # [ inline ] pub fn triggered7 ( & mut self ) -> _TRIGGERED7W { _TRIGGERED7W { w : self } } # [ doc = "Bit 8 - Write '1' to Disable interrupt for TRIGGERED[8] event" ] # [ inline ] pub fn triggered8 ( & mut self ) -> _TRIGGERED8W { _TRIGGERED8W { w : self } } # [ doc = "Bit 9 - Write '1' to Disable interrupt for TRIGGERED[9] event" ] # [ inline ] pub fn triggered9 ( & mut self ) -> _TRIGGERED9W { _TRIGGERED9W { w : self } } # [ doc = "Bit 10 - Write '1' to Disable interrupt for TRIGGERED[10] event" ] # [ inline ] pub fn triggered10 ( & mut self ) -> _TRIGGERED10W { _TRIGGERED10W { w : self } } # [ doc = "Bit 11 - Write '1' to Disable interrupt for TRIGGERED[11] event" ] # [ inline ] pub fn triggered11 ( & mut self ) -> _TRIGGERED11W { _TRIGGERED11W { w : self } } # [ doc = "Bit 12 - Write '1' to Disable interrupt for TRIGGERED[12] event" ] # [ inline ] pub fn triggered12 ( & mut self ) -> _TRIGGERED12W { _TRIGGERED12W { w : self } } # [ doc = "Bit 13 - Write '1' to Disable interrupt for TRIGGERED[13] event" ] # [ inline ] pub fn triggered13 ( & mut self ) -> _TRIGGERED13W { _TRIGGERED13W { w : self } } # [ doc = "Bit 14 - Write '1' to Disable interrupt for TRIGGERED[14] event" ] # [ inline ] pub fn triggered14 ( & mut self ) -> _TRIGGERED14W { _TRIGGERED14W { w : self } } # [ doc = "Bit 15 - Write '1' to Disable interrupt for TRIGGERED[15] event" ] # [ inline ] pub fn triggered15 ( & mut self ) -> _TRIGGERED15W { _TRIGGERED15W { w : self } } } } } # [ doc = "Software interrupt 1" ] pub struct SWI1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI1 { } impl SWI1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_5000 as * const _ } } impl Deref for SWI1 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI1 :: ptr ( ) } } } # [ doc = "Event Generator Unit 1" ] pub struct EGU1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU1 { } impl EGU1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_5000 as * const _ } } impl Deref for EGU1 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU1 :: ptr ( ) } } } # [ doc = "Software interrupt 2" ] pub struct SWI2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI2 { } impl SWI2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_6000 as * const _ } } impl Deref for SWI2 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI2 :: ptr ( ) } } } # [ doc = "Event Generator Unit 2" ] pub struct EGU2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU2 { } impl EGU2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_6000 as * const _ } } impl Deref for EGU2 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU2 :: ptr ( ) } } } # [ doc = "Software interrupt 3" ] pub struct SWI3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI3 { } impl SWI3 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_7000 as * const _ } } impl Deref for SWI3 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI3 :: ptr ( ) } } } # [ doc = "Event Generator Unit 3" ] pub struct EGU3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU3 { } impl EGU3 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_7000 as * const _ } } impl Deref for EGU3 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU3 :: ptr ( ) } } } # [ doc = "Software interrupt 4" ] pub struct SWI4 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI4 { } impl SWI4 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_8000 as * const _ } } impl Deref for SWI4 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI4 :: ptr ( ) } } } # [ doc = "Event Generator Unit 4" ] pub struct EGU4 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU4 { } impl EGU4 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_8000 as * const _ } } impl Deref for EGU4 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU4 :: ptr ( ) } } } # [ doc = "Software interrupt 5" ] pub struct SWI5 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SWI5 { } impl SWI5 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const swi0 :: RegisterBlock { 0x4001_9000 as * const _ } } impl Deref for SWI5 { type Target = swi0 :: RegisterBlock ; fn deref ( & self ) -> & swi0 :: RegisterBlock { unsafe { & * SWI5 :: ptr ( ) } } } # [ doc = "Event Generator Unit 5" ] pub struct EGU5 { _marker : PhantomData < * const ( ) > } unsafe impl Send for EGU5 { } impl EGU5 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const egu0 :: RegisterBlock { 0x4001_9000 as * const _ } } impl Deref for EGU5 { type Target = egu0 :: RegisterBlock ; fn deref ( & self ) -> & egu0 :: RegisterBlock { unsafe { & * EGU5 :: ptr ( ) } } } # [ doc = "Timer/Counter 3" ] pub struct TIMER3 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TIMER3 { } impl TIMER3 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const timer0 :: RegisterBlock { 0x4001_a000 as * const _ } } impl Deref for TIMER3 { type Target = timer0 :: RegisterBlock ; fn deref ( & self ) -> & timer0 :: RegisterBlock { unsafe { & * TIMER3 :: ptr ( ) } } } # [ doc = "Timer/Counter 4" ] pub struct TIMER4 { _marker : PhantomData < * const ( ) > } unsafe impl Send for TIMER4 { } impl TIMER4 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const timer0 :: RegisterBlock { 0x4001_b000 as * const _ } } impl Deref for TIMER4 { type Target = timer0 :: RegisterBlock ; fn deref ( & self ) -> & timer0 :: RegisterBlock { unsafe { & * TIMER4 :: ptr ( ) } } } # [ doc = "Pulse Width Modulation Unit 0" ] pub struct PWM0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for PWM0 { } impl PWM0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const pwm0 :: RegisterBlock { 0x4001_c000 as * const _ } } impl Deref for PWM0 { type Target = pwm0 :: RegisterBlock ; fn deref ( & self ) -> & pwm0 :: RegisterBlock { unsafe { & * PWM0 :: ptr ( ) } } } # [ doc = "Pulse Width Modulation Unit 0" ] pub mod pwm0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 4usize ] , # [ doc = "0x04 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback" ] pub tasks_stop : TASKS_STOP , # [ doc = "0x08 - Description collection[0]: Loads the first PWM value on all enabled channels from sequence 0, and starts playing that sequence at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running." ] pub tasks_seqstart : [ TASKS_SEQSTART ; 2 ] , # [ doc = "0x10 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running." ] pub tasks_nextstep : TASKS_NEXTSTEP , _reserved1 : [ u8 ; 240usize ] , # [ doc = "0x104 - Response to STOP task, emitted when PWM pulses are no longer generated" ] pub events_stopped : EVENTS_STOPPED , # [ doc = "0x108 - Description collection[0]: First PWM period started on sequence 0" ] pub events_seqstarted : [ EVENTS_SEQSTARTED ; 2 ] , # [ doc = "0x110 - Description collection[0]: Emitted at end of every sequence 0, when last value from RAM has been applied to wave counter" ] pub events_seqend : [ EVENTS_SEQEND ; 2 ] , # [ doc = "0x118 - Emitted at the end of each PWM period" ] pub events_pwmperiodend : EVENTS_PWMPERIODEND , # [ doc = "0x11c - Concatenated sequences have been played the amount of times defined in LOOP.CNT" ] pub events_loopsdone : EVENTS_LOOPSDONE , _reserved2 : [ u8 ; 224usize ] , # [ doc = "0x200 - Shortcut register" ] pub shorts : SHORTS , _reserved3 : [ u8 ; 252usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved4 : [ u8 ; 500usize ] , # [ doc = "0x500 - PWM module enable register" ] pub enable : ENABLE , # [ doc = "0x504 - Selects operating mode of the wave counter" ] pub mode : MODE , # [ doc = "0x508 - Value up to which the pulse generator counter counts" ] pub countertop : COUNTERTOP , # [ doc = "0x50c - Configuration for PWM_CLK" ] pub prescaler : PRESCALER , # [ doc = "0x510 - Configuration of the decoder" ] pub decoder : DECODER , # [ doc = "0x514 - Amount of playback of a loop" ] pub loop_ : LOOP , } # [ doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Loads the first PWM value on all enabled channels from sequence 0, and starts playing that sequence at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running." ] pub struct TASKS_SEQSTART { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Loads the first PWM value on all enabled channels from sequence 0, and starts playing that sequence at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running." ] pub mod tasks_seqstart { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_SEQSTART { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running." ] pub struct TASKS_NEXTSTEP { register : VolatileCell < u32 > } # [ doc = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running." ] pub mod tasks_nextstep { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_NEXTSTEP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Response to STOP task, emitted when PWM pulses are no longer generated" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "Response to STOP task, emitted when PWM pulses are no longer generated" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: First PWM period started on sequence 0" ] pub struct EVENTS_SEQSTARTED { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: First PWM period started on sequence 0" ] pub mod events_seqstarted { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SEQSTARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Description collection[0]: Emitted at end of every sequence 0, when last value from RAM has been applied to wave counter" ] pub struct EVENTS_SEQEND { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Emitted at end of every sequence 0, when last value from RAM has been applied to wave counter" ] pub mod events_seqend { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_SEQEND { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Emitted at the end of each PWM period" ] pub struct EVENTS_PWMPERIODEND { register : VolatileCell < u32 > } # [ doc = "Emitted at the end of each PWM period" ] pub mod events_pwmperiodend { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_PWMPERIODEND { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT" ] pub struct EVENTS_LOOPSDONE { register : VolatileCell < u32 > } # [ doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT" ] pub mod events_loopsdone { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_LOOPSDONE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Shortcut register" ] pub struct SHORTS { register : VolatileCell < u32 > } # [ doc = "Shortcut register" ] pub mod shorts { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: SHORTS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `SEQEND0_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND0_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SEQEND0_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND0_STOPR :: DISABLED => false , SEQEND0_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND0_STOPR { match value { false => SEQEND0_STOPR :: DISABLED , true => SEQEND0_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND0_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND0_STOPR :: ENABLED } } # [ doc = "Possible values of the field `SEQEND1_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND1_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SEQEND1_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND1_STOPR :: DISABLED => false , SEQEND1_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND1_STOPR { match value { false => SEQEND1_STOPR :: DISABLED , true => SEQEND1_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND1_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND1_STOPR :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE_SEQSTART0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONE_SEQSTART0R { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_SEQSTART0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONE_SEQSTART0R :: DISABLED => false , LOOPSDONE_SEQSTART0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONE_SEQSTART0R { match value { false => LOOPSDONE_SEQSTART0R :: DISABLED , true => LOOPSDONE_SEQSTART0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONE_SEQSTART0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONE_SEQSTART0R :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE_SEQSTART1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONE_SEQSTART1R { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_SEQSTART1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONE_SEQSTART1R :: DISABLED => false , LOOPSDONE_SEQSTART1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONE_SEQSTART1R { match value { false => LOOPSDONE_SEQSTART1R :: DISABLED , true => LOOPSDONE_SEQSTART1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONE_SEQSTART1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONE_SEQSTART1R :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE_STOP`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONE_STOPR { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_STOPR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONE_STOPR :: DISABLED => false , LOOPSDONE_STOPR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONE_STOPR { match value { false => LOOPSDONE_STOPR :: DISABLED , true => LOOPSDONE_STOPR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONE_STOPR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONE_STOPR :: ENABLED } } # [ doc = "Values that can be written to the field `SEQEND0_STOP`" ] pub enum SEQEND0_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SEQEND0_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND0_STOPW :: DISABLED => false , SEQEND0_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND0_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND0_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND0_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQEND0_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQEND0_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND1_STOP`" ] pub enum SEQEND1_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl SEQEND1_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND1_STOPW :: DISABLED => false , SEQEND1_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND1_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND1_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND1_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQEND1_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQEND1_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE_SEQSTART0`" ] pub enum LOOPSDONE_SEQSTART0W { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_SEQSTART0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONE_SEQSTART0W :: DISABLED => false , LOOPSDONE_SEQSTART0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONE_SEQSTART0W < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONE_SEQSTART0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONE_SEQSTART0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_SEQSTART0W :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_SEQSTART0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE_SEQSTART1`" ] pub enum LOOPSDONE_SEQSTART1W { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_SEQSTART1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONE_SEQSTART1W :: DISABLED => false , LOOPSDONE_SEQSTART1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONE_SEQSTART1W < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONE_SEQSTART1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONE_SEQSTART1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_SEQSTART1W :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_SEQSTART1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE_STOP`" ] pub enum LOOPSDONE_STOPW { # [ doc = "Disable shortcut" ] DISABLED , # [ doc = "Enable shortcut" ] ENABLED } impl LOOPSDONE_STOPW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONE_STOPW :: DISABLED => false , LOOPSDONE_STOPW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONE_STOPW < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONE_STOPW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONE_STOPW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable shortcut" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_STOPW :: DISABLED ) } # [ doc = "Enable shortcut" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONE_STOPW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Shortcut between SEQEND[0] event and STOP task" ] # [ inline ] pub fn seqend0_stop ( & self ) -> SEQEND0_STOPR { SEQEND0_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Shortcut between SEQEND[1] event and STOP task" ] # [ inline ] pub fn seqend1_stop ( & self ) -> SEQEND1_STOPR { SEQEND1_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Shortcut between LOOPSDONE event and SEQSTART[0] task" ] # [ inline ] pub fn loopsdone_seqstart0 ( & self ) -> LOOPSDONE_SEQSTART0R { LOOPSDONE_SEQSTART0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Shortcut between LOOPSDONE event and SEQSTART[1] task" ] # [ inline ] pub fn loopsdone_seqstart1 ( & self ) -> LOOPSDONE_SEQSTART1R { LOOPSDONE_SEQSTART1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Shortcut between LOOPSDONE event and STOP task" ] # [ inline ] pub fn loopsdone_stop ( & self ) -> LOOPSDONE_STOPR { LOOPSDONE_STOPR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Shortcut between SEQEND[0] event and STOP task" ] # [ inline ] pub fn seqend0_stop ( & mut self ) -> _SEQEND0_STOPW { _SEQEND0_STOPW { w : self } } # [ doc = "Bit 1 - Shortcut between SEQEND[1] event and STOP task" ] # [ inline ] pub fn seqend1_stop ( & mut self ) -> _SEQEND1_STOPW { _SEQEND1_STOPW { w : self } } # [ doc = "Bit 2 - Shortcut between LOOPSDONE event and SEQSTART[0] task" ] # [ inline ] pub fn loopsdone_seqstart0 ( & mut self ) -> _LOOPSDONE_SEQSTART0W { _LOOPSDONE_SEQSTART0W { w : self } } # [ doc = "Bit 3 - Shortcut between LOOPSDONE event and SEQSTART[1] task" ] # [ inline ] pub fn loopsdone_seqstart1 ( & mut self ) -> _LOOPSDONE_SEQSTART1W { _LOOPSDONE_SEQSTART1W { w : self } } # [ doc = "Bit 4 - Shortcut between LOOPSDONE event and STOP task" ] # [ inline ] pub fn loopsdone_stop ( & mut self ) -> _LOOPSDONE_STOPW { _LOOPSDONE_STOPW { w : self } } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED0R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQSTARTED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED0R :: DISABLED => false , SEQSTARTED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED0R { match value { false => SEQSTARTED0R :: DISABLED , true => SEQSTARTED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED0R :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED1R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQSTARTED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED1R :: DISABLED => false , SEQSTARTED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED1R { match value { false => SEQSTARTED1R :: DISABLED , true => SEQSTARTED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED1R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND0R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQEND0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND0R :: DISABLED => false , SEQEND0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND0R { match value { false => SEQEND0R :: DISABLED , true => SEQEND0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND0R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND1R { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQEND1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND1R :: DISABLED => false , SEQEND1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND1R { match value { false => SEQEND1R :: DISABLED , true => SEQEND1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND1R :: ENABLED } } # [ doc = "Possible values of the field `PWMPERIODEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMPERIODENDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PWMPERIODENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PWMPERIODENDR :: DISABLED => false , PWMPERIODENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PWMPERIODENDR { match value { false => PWMPERIODENDR :: DISABLED , true => PWMPERIODENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PWMPERIODENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PWMPERIODENDR :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LOOPSDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONER :: DISABLED => false , LOOPSDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONER { match value { false => LOOPSDONER :: DISABLED , true => LOOPSDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONER :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED0`" ] pub enum SEQSTARTED0W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQSTARTED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED0W :: DISABLED => false , SEQSTARTED0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQSTARTED0W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQSTARTED0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED1`" ] pub enum SEQSTARTED1W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQSTARTED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED1W :: DISABLED => false , SEQSTARTED1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQSTARTED1W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQSTARTED1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND0`" ] pub enum SEQEND0W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQEND0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND0W :: DISABLED => false , SEQEND0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQEND0W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQEND0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND1`" ] pub enum SEQEND1W { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl SEQEND1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND1W :: DISABLED => false , SEQEND1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SEQEND1W :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( SEQEND1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PWMPERIODEND`" ] pub enum PWMPERIODENDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PWMPERIODENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PWMPERIODENDW :: DISABLED => false , PWMPERIODENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PWMPERIODENDW < 'a > { w : & 'a mut W , } impl < 'a > _PWMPERIODENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PWMPERIODENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PWMPERIODENDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PWMPERIODENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE`" ] pub enum LOOPSDONEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl LOOPSDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONEW :: DISABLED => false , LOOPSDONEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONEW < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( LOOPSDONEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & self ) -> SEQSTARTED0R { SEQSTARTED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & self ) -> SEQSTARTED1R { SEQSTARTED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & self ) -> SEQEND0R { SEQEND0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & self ) -> SEQEND1R { SEQEND1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & self ) -> PWMPERIODENDR { PWMPERIODENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & self ) -> LOOPSDONER { LOOPSDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & mut self ) -> _SEQSTARTED0W { _SEQSTARTED0W { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & mut self ) -> _SEQSTARTED1W { _SEQSTARTED1W { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & mut self ) -> _SEQEND0W { _SEQEND0W { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & mut self ) -> _SEQEND1W { _SEQEND1W { w : self } } # [ doc = "Bit 6 - Enable or disable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & mut self ) -> _PWMPERIODENDW { _PWMPERIODENDW { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & mut self ) -> _LOOPSDONEW { _LOOPSDONEW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQSTARTED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED0R :: DISABLED => false , SEQSTARTED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED0R { match value { false => SEQSTARTED0R :: DISABLED , true => SEQSTARTED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED0R :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQSTARTED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED1R :: DISABLED => false , SEQSTARTED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED1R { match value { false => SEQSTARTED1R :: DISABLED , true => SEQSTARTED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED1R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQEND0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND0R :: DISABLED => false , SEQEND0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND0R { match value { false => SEQEND0R :: DISABLED , true => SEQEND0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND0R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQEND1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND1R :: DISABLED => false , SEQEND1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND1R { match value { false => SEQEND1R :: DISABLED , true => SEQEND1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND1R :: ENABLED } } # [ doc = "Possible values of the field `PWMPERIODEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMPERIODENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PWMPERIODENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PWMPERIODENDR :: DISABLED => false , PWMPERIODENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PWMPERIODENDR { match value { false => PWMPERIODENDR :: DISABLED , true => PWMPERIODENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PWMPERIODENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PWMPERIODENDR :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LOOPSDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONER :: DISABLED => false , LOOPSDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONER { match value { false => LOOPSDONER :: DISABLED , true => LOOPSDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONER :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED0`" ] pub enum SEQSTARTED0W { # [ doc = "Enable" ] SET } impl SEQSTARTED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SEQSTARTED0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED1`" ] pub enum SEQSTARTED1W { # [ doc = "Enable" ] SET } impl SEQSTARTED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SEQSTARTED1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND0`" ] pub enum SEQEND0W { # [ doc = "Enable" ] SET } impl SEQEND0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SEQEND0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND1`" ] pub enum SEQEND1W { # [ doc = "Enable" ] SET } impl SEQEND1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( SEQEND1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PWMPERIODEND`" ] pub enum PWMPERIODENDW { # [ doc = "Enable" ] SET } impl PWMPERIODENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PWMPERIODENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PWMPERIODENDW < 'a > { w : & 'a mut W , } impl < 'a > _PWMPERIODENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PWMPERIODENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PWMPERIODENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE`" ] pub enum LOOPSDONEW { # [ doc = "Enable" ] SET } impl LOOPSDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONEW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONEW < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( LOOPSDONEW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & self ) -> SEQSTARTED0R { SEQSTARTED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & self ) -> SEQSTARTED1R { SEQSTARTED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & self ) -> SEQEND0R { SEQEND0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & self ) -> SEQEND1R { SEQEND1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & self ) -> PWMPERIODENDR { PWMPERIODENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & self ) -> LOOPSDONER { LOOPSDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & mut self ) -> _SEQSTARTED0W { _SEQSTARTED0W { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & mut self ) -> _SEQSTARTED1W { _SEQSTARTED1W { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & mut self ) -> _SEQEND0W { _SEQEND0W { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & mut self ) -> _SEQEND1W { _SEQEND1W { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & mut self ) -> _PWMPERIODENDW { _PWMPERIODENDW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & mut self ) -> _LOOPSDONEW { _LOOPSDONEW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQSTARTED0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED0R :: DISABLED => false , SEQSTARTED0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED0R { match value { false => SEQSTARTED0R :: DISABLED , true => SEQSTARTED0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED0R :: ENABLED } } # [ doc = "Possible values of the field `SEQSTARTED1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQSTARTED1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQSTARTED1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQSTARTED1R :: DISABLED => false , SEQSTARTED1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQSTARTED1R { match value { false => SEQSTARTED1R :: DISABLED , true => SEQSTARTED1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQSTARTED1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQSTARTED1R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND0R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQEND0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND0R :: DISABLED => false , SEQEND0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND0R { match value { false => SEQEND0R :: DISABLED , true => SEQEND0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND0R :: ENABLED } } # [ doc = "Possible values of the field `SEQEND1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SEQEND1R { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl SEQEND1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { SEQEND1R :: DISABLED => false , SEQEND1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> SEQEND1R { match value { false => SEQEND1R :: DISABLED , true => SEQEND1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SEQEND1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == SEQEND1R :: ENABLED } } # [ doc = "Possible values of the field `PWMPERIODEND`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PWMPERIODENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PWMPERIODENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PWMPERIODENDR :: DISABLED => false , PWMPERIODENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PWMPERIODENDR { match value { false => PWMPERIODENDR :: DISABLED , true => PWMPERIODENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PWMPERIODENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PWMPERIODENDR :: ENABLED } } # [ doc = "Possible values of the field `LOOPSDONE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOOPSDONER { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl LOOPSDONER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { LOOPSDONER :: DISABLED => false , LOOPSDONER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> LOOPSDONER { match value { false => LOOPSDONER :: DISABLED , true => LOOPSDONER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == LOOPSDONER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == LOOPSDONER :: ENABLED } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED0`" ] pub enum SEQSTARTED0W { # [ doc = "Disable" ] CLEAR } impl SEQSTARTED0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SEQSTARTED0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQSTARTED1`" ] pub enum SEQSTARTED1W { # [ doc = "Disable" ] CLEAR } impl SEQSTARTED1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQSTARTED1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SEQSTARTED1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQSTARTED1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQSTARTED1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SEQSTARTED1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND0`" ] pub enum SEQEND0W { # [ doc = "Disable" ] CLEAR } impl SEQEND0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND0W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SEQEND0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SEQEND1`" ] pub enum SEQEND1W { # [ doc = "Disable" ] CLEAR } impl SEQEND1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { SEQEND1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _SEQEND1W < 'a > { w : & 'a mut W , } impl < 'a > _SEQEND1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SEQEND1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( SEQEND1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PWMPERIODEND`" ] pub enum PWMPERIODENDW { # [ doc = "Disable" ] CLEAR } impl PWMPERIODENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PWMPERIODENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PWMPERIODENDW < 'a > { w : & 'a mut W , } impl < 'a > _PWMPERIODENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PWMPERIODENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PWMPERIODENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `LOOPSDONE`" ] pub enum LOOPSDONEW { # [ doc = "Disable" ] CLEAR } impl LOOPSDONEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { LOOPSDONEW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _LOOPSDONEW < 'a > { w : & 'a mut W , } impl < 'a > _LOOPSDONEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOOPSDONEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( LOOPSDONEW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & self ) -> SEQSTARTED0R { SEQSTARTED0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & self ) -> SEQSTARTED1R { SEQSTARTED1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & self ) -> SEQEND0R { SEQEND0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & self ) -> SEQEND1R { SEQEND1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & self ) -> PWMPERIODENDR { PWMPERIODENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & self ) -> LOOPSDONER { LOOPSDONER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for SEQSTARTED[0] event" ] # [ inline ] pub fn seqstarted0 ( & mut self ) -> _SEQSTARTED0W { _SEQSTARTED0W { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for SEQSTARTED[1] event" ] # [ inline ] pub fn seqstarted1 ( & mut self ) -> _SEQSTARTED1W { _SEQSTARTED1W { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for SEQEND[0] event" ] # [ inline ] pub fn seqend0 ( & mut self ) -> _SEQEND0W { _SEQEND0W { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for SEQEND[1] event" ] # [ inline ] pub fn seqend1 ( & mut self ) -> _SEQEND1W { _SEQEND1W { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for PWMPERIODEND event" ] # [ inline ] pub fn pwmperiodend ( & mut self ) -> _PWMPERIODENDW { _PWMPERIODENDW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for LOOPSDONE event" ] # [ inline ] pub fn loopsdone ( & mut self ) -> _LOOPSDONEW { _LOOPSDONEW { w : self } } } } # [ doc = "PWM module enable register" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "PWM module enable register" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENABLER :: DISABLED => false , ENABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENABLER { match value { false => ENABLER :: DISABLED , true => ENABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disabled" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENABLEW :: DISABLED => false , ENABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable PWM module" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable PWM module" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "Selects operating mode of the wave counter" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Selects operating mode of the wave counter" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `UPDOWN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum UPDOWNR { # [ doc = "Up counter - edge aligned PWM duty-cycle" ] UP , # [ doc = "Up and down counter - center aligned PWM duty cycle" ] UPANDDOWN } impl UPDOWNR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { UPDOWNR :: UP => false , UPDOWNR :: UPANDDOWN => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> UPDOWNR { match value { false => UPDOWNR :: UP , true => UPDOWNR :: UPANDDOWN , } } # [ doc = "Checks if the value of the field is `UP`" ] # [ inline ] pub fn is_up ( & self ) -> bool { * self == UPDOWNR :: UP } # [ doc = "Checks if the value of the field is `UPANDDOWN`" ] # [ inline ] pub fn is_up_and_down ( & self ) -> bool { * self == UPDOWNR :: UPANDDOWN } } # [ doc = "Values that can be written to the field `UPDOWN`" ] pub enum UPDOWNW { # [ doc = "Up counter - edge aligned PWM duty-cycle" ] UP , # [ doc = "Up and down counter - center aligned PWM duty cycle" ] UPANDDOWN } impl UPDOWNW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { UPDOWNW :: UP => false , UPDOWNW :: UPANDDOWN => true } } } # [ doc = r" Proxy" ] pub struct _UPDOWNW < 'a > { w : & 'a mut W , } impl < 'a > _UPDOWNW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : UPDOWNW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Up counter - edge aligned PWM duty-cycle" ] # [ inline ] pub fn up ( self ) -> & 'a mut W { self . variant ( UPDOWNW :: UP ) } # [ doc = "Up and down counter - center aligned PWM duty cycle" ] # [ inline ] pub fn up_and_down ( self ) -> & 'a mut W { self . variant ( UPDOWNW :: UPANDDOWN ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Selects up or up and down as wave counter mode" ] # [ inline ] pub fn updown ( & self ) -> UPDOWNR { UPDOWNR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Selects up or up and down as wave counter mode" ] # [ inline ] pub fn updown ( & mut self ) -> _UPDOWNW { _UPDOWNW { w : self } } } } # [ doc = "Value up to which the pulse generator counter counts" ] pub struct COUNTERTOP { register : VolatileCell < u32 > } # [ doc = "Value up to which the pulse generator counter counts" ] pub mod countertop { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: COUNTERTOP { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct COUNTERTOPR { bits : u16 , } impl COUNTERTOPR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { self . bits } } # [ doc = r" Proxy" ] pub struct _COUNTERTOPW < 'a > { w : & 'a mut W , } impl < 'a > _COUNTERTOPW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0x7fff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used." ] # [ inline ] pub fn countertop ( & self ) -> COUNTERTOPR { let bits = { const MASK : u16 = 0x7fff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ; COUNTERTOPR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x03ff } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used." ] # [ inline ] pub fn countertop ( & mut self ) -> _COUNTERTOPW { _COUNTERTOPW { w : self } } } } # [ doc = "Configuration for PWM_CLK" ] pub struct PRESCALER { register : VolatileCell < u32 > } # [ doc = "Configuration for PWM_CLK" ] pub mod prescaler { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PRESCALER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PRESCALER`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRESCALERR { # [ doc = "Divide by   1 (16MHz)" ] DIV_1 , # [ doc = "Divide by   2 ( 8MHz)" ] DIV_2 , # [ doc = "Divide by   4 ( 4MHz)" ] DIV_4 , # [ doc = "Divide by   8 ( 2MHz)" ] DIV_8 , # [ doc = "Divide by  16 ( 1MHz)" ] DIV_16 , # [ doc = "Divide by  32 ( 500kHz)" ] DIV_32 , # [ doc = "Divide by  64 ( 250kHz)" ] DIV_64 , # [ doc = "Divide by 128 ( 125kHz)" ] DIV_128 } impl PRESCALERR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PRESCALERR :: DIV_1 => 0 , PRESCALERR :: DIV_2 => 0x01 , PRESCALERR :: DIV_4 => 0x02 , PRESCALERR :: DIV_8 => 0x03 , PRESCALERR :: DIV_16 => 0x04 , PRESCALERR :: DIV_32 => 0x05 , PRESCALERR :: DIV_64 => 0x06 , PRESCALERR :: DIV_128 => 0x07 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PRESCALERR { match value { 0 => PRESCALERR :: DIV_1 , 1 => PRESCALERR :: DIV_2 , 2 => PRESCALERR :: DIV_4 , 3 => PRESCALERR :: DIV_8 , 4 => PRESCALERR :: DIV_16 , 5 => PRESCALERR :: DIV_32 , 6 => PRESCALERR :: DIV_64 , 7 => PRESCALERR :: DIV_128 , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `DIV_1`" ] # [ inline ] pub fn is_div_1 ( & self ) -> bool { * self == PRESCALERR :: DIV_1 } # [ doc = "Checks if the value of the field is `DIV_2`" ] # [ inline ] pub fn is_div_2 ( & self ) -> bool { * self == PRESCALERR :: DIV_2 } # [ doc = "Checks if the value of the field is `DIV_4`" ] # [ inline ] pub fn is_div_4 ( & self ) -> bool { * self == PRESCALERR :: DIV_4 } # [ doc = "Checks if the value of the field is `DIV_8`" ] # [ inline ] pub fn is_div_8 ( & self ) -> bool { * self == PRESCALERR :: DIV_8 } # [ doc = "Checks if the value of the field is `DIV_16`" ] # [ inline ] pub fn is_div_16 ( & self ) -> bool { * self == PRESCALERR :: DIV_16 } # [ doc = "Checks if the value of the field is `DIV_32`" ] # [ inline ] pub fn is_div_32 ( & self ) -> bool { * self == PRESCALERR :: DIV_32 } # [ doc = "Checks if the value of the field is `DIV_64`" ] # [ inline ] pub fn is_div_64 ( & self ) -> bool { * self == PRESCALERR :: DIV_64 } # [ doc = "Checks if the value of the field is `DIV_128`" ] # [ inline ] pub fn is_div_128 ( & self ) -> bool { * self == PRESCALERR :: DIV_128 } } # [ doc = "Values that can be written to the field `PRESCALER`" ] pub enum PRESCALERW { # [ doc = "Divide by   1 (16MHz)" ] DIV_1 , # [ doc = "Divide by   2 ( 8MHz)" ] DIV_2 , # [ doc = "Divide by   4 ( 4MHz)" ] DIV_4 , # [ doc = "Divide by   8 ( 2MHz)" ] DIV_8 , # [ doc = "Divide by  16 ( 1MHz)" ] DIV_16 , # [ doc = "Divide by  32 ( 500kHz)" ] DIV_32 , # [ doc = "Divide by  64 ( 250kHz)" ] DIV_64 , # [ doc = "Divide by 128 ( 125kHz)" ] DIV_128 } impl PRESCALERW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PRESCALERW :: DIV_1 => 0 , PRESCALERW :: DIV_2 => 1 , PRESCALERW :: DIV_4 => 2 , PRESCALERW :: DIV_8 => 3 , PRESCALERW :: DIV_16 => 4 , PRESCALERW :: DIV_32 => 5 , PRESCALERW :: DIV_64 => 6 , PRESCALERW :: DIV_128 => 7 } } } # [ doc = r" Proxy" ] pub struct _PRESCALERW < 'a > { w : & 'a mut W , } impl < 'a > _PRESCALERW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRESCALERW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "Divide by 1 (16MHz)" ] # [ inline ] pub fn div_1 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_1 ) } # [ doc = "Divide by 2 ( 8MHz)" ] # [ inline ] pub fn div_2 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_2 ) } # [ doc = "Divide by 4 ( 4MHz)" ] # [ inline ] pub fn div_4 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_4 ) } # [ doc = "Divide by 8 ( 2MHz)" ] # [ inline ] pub fn div_8 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_8 ) } # [ doc = "Divide by 16 ( 1MHz)" ] # [ inline ] pub fn div_16 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_16 ) } # [ doc = "Divide by 32 ( 500kHz)" ] # [ inline ] pub fn div_32 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_32 ) } # [ doc = "Divide by 64 ( 250kHz)" ] # [ inline ] pub fn div_64 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_64 ) } # [ doc = "Divide by 128 ( 125kHz)" ] # [ inline ] pub fn div_128 ( self ) -> & 'a mut W { self . variant ( PRESCALERW :: DIV_128 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - Pre-scaler of PWM_CLK" ] # [ inline ] pub fn prescaler ( & self ) -> PRESCALERR { PRESCALERR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - Pre-scaler of PWM_CLK" ] # [ inline ] pub fn prescaler ( & mut self ) -> _PRESCALERW { _PRESCALERW { w : self } } } } # [ doc = "Configuration of the decoder" ] pub struct DECODER { register : VolatileCell < u32 > } # [ doc = "Configuration of the decoder" ] pub mod decoder { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DECODER { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `LOAD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum LOADR { # [ doc = "1st half word (16-bit) used in all PWM channels 0..3" ] COMMON , # [ doc = "1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3" ] GROUPED , # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3" ] INDIVIDUAL , # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP" ] WAVEFORM , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl LOADR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { LOADR :: COMMON => 0 , LOADR :: GROUPED => 0x01 , LOADR :: INDIVIDUAL => 0x02 , LOADR :: WAVEFORM => 0x03 , LOADR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> LOADR { match value { 0 => LOADR :: COMMON , 1 => LOADR :: GROUPED , 2 => LOADR :: INDIVIDUAL , 3 => LOADR :: WAVEFORM , i => LOADR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `COMMON`" ] # [ inline ] pub fn is_common ( & self ) -> bool { * self == LOADR :: COMMON } # [ doc = "Checks if the value of the field is `GROUPED`" ] # [ inline ] pub fn is_grouped ( & self ) -> bool { * self == LOADR :: GROUPED } # [ doc = "Checks if the value of the field is `INDIVIDUAL`" ] # [ inline ] pub fn is_individual ( & self ) -> bool { * self == LOADR :: INDIVIDUAL } # [ doc = "Checks if the value of the field is `WAVEFORM`" ] # [ inline ] pub fn is_wave_form ( & self ) -> bool { * self == LOADR :: WAVEFORM } } # [ doc = "Possible values of the field `MODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum MODER { # [ doc = "SEQ[n].REFRESH is used to determine loading internal compare registers" ] REFRESHCOUNT , # [ doc = "NEXTSTEP task causes a new value to be loaded to internal compare registers" ] NEXTSTEP } impl MODER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { MODER :: REFRESHCOUNT => false , MODER :: NEXTSTEP => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> MODER { match value { false => MODER :: REFRESHCOUNT , true => MODER :: NEXTSTEP , } } # [ doc = "Checks if the value of the field is `REFRESHCOUNT`" ] # [ inline ] pub fn is_refresh_count ( & self ) -> bool { * self == MODER :: REFRESHCOUNT } # [ doc = "Checks if the value of the field is `NEXTSTEP`" ] # [ inline ] pub fn is_next_step ( & self ) -> bool { * self == MODER :: NEXTSTEP } } # [ doc = "Values that can be written to the field `LOAD`" ] pub enum LOADW { # [ doc = "1st half word (16-bit) used in all PWM channels 0..3" ] COMMON , # [ doc = "1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3" ] GROUPED , # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3" ] INDIVIDUAL , # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP" ] WAVEFORM } impl LOADW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { LOADW :: COMMON => 0 , LOADW :: GROUPED => 1 , LOADW :: INDIVIDUAL => 2 , LOADW :: WAVEFORM => 3 } } } # [ doc = r" Proxy" ] pub struct _LOADW < 'a > { w : & 'a mut W , } impl < 'a > _LOADW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : LOADW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "1st half word (16-bit) used in all PWM channels 0..3" ] # [ inline ] pub fn common ( self ) -> & 'a mut W { self . variant ( LOADW :: COMMON ) } # [ doc = "1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3" ] # [ inline ] pub fn grouped ( self ) -> & 'a mut W { self . variant ( LOADW :: GROUPED ) } # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3" ] # [ inline ] pub fn individual ( self ) -> & 'a mut W { self . variant ( LOADW :: INDIVIDUAL ) } # [ doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP" ] # [ inline ] pub fn wave_form ( self ) -> & 'a mut W { self . variant ( LOADW :: WAVEFORM ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `MODE`" ] pub enum MODEW { # [ doc = "SEQ[n].REFRESH is used to determine loading internal compare registers" ] REFRESHCOUNT , # [ doc = "NEXTSTEP task causes a new value to be loaded to internal compare registers" ] NEXTSTEP } impl MODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { MODEW :: REFRESHCOUNT => false , MODEW :: NEXTSTEP => true } } } # [ doc = r" Proxy" ] pub struct _MODEW < 'a > { w : & 'a mut W , } impl < 'a > _MODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : MODEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "SEQ[n].REFRESH is used to determine loading internal compare registers" ] # [ inline ] pub fn refresh_count ( self ) -> & 'a mut W { self . variant ( MODEW :: REFRESHCOUNT ) } # [ doc = "NEXTSTEP task causes a new value to be loaded to internal compare registers" ] # [ inline ] pub fn next_step ( self ) -> & 'a mut W { self . variant ( MODEW :: NEXTSTEP ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:2 - How a sequence is read from RAM and spread to the compare register" ] # [ inline ] pub fn load ( & self ) -> LOADR { LOADR :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bit 8 - Selects source for advancing the active sequence" ] # [ inline ] pub fn mode ( & self ) -> MODER { MODER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:2 - How a sequence is read from RAM and spread to the compare register" ] # [ inline ] pub fn load ( & mut self ) -> _LOADW { _LOADW { w : self } } # [ doc = "Bit 8 - Selects source for advancing the active sequence" ] # [ inline ] pub fn mode ( & mut self ) -> _MODEW { _MODEW { w : self } } } } # [ doc = "Amount of playback of a loop" ] pub struct LOOP { register : VolatileCell < u32 > } # [ doc = "Amount of playback of a loop" ] pub mod loop_ { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: LOOP { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CNT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CNTR { # [ doc = "Looping disabled (stop at the end of the sequence)" ] DISABLED , # [ doc = r" Reserved" ] _Reserved ( u16 ) } impl CNTR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u16 { match * self { CNTR :: DISABLED => 0 , CNTR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u16 ) -> CNTR { match value { 0 => CNTR :: DISABLED , i => CNTR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CNTR :: DISABLED } } # [ doc = "Values that can be written to the field `CNT`" ] pub enum CNTW { # [ doc = "Looping disabled (stop at the end of the sequence)" ] DISABLED } impl CNTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u16 { match * self { CNTW :: DISABLED => 0 } } } # [ doc = r" Proxy" ] pub struct _CNTW < 'a > { w : & 'a mut W , } impl < 'a > _CNTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CNTW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Looping disabled (stop at the end of the sequence)" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CNTW :: DISABLED ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u16 ) -> & 'a mut W { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:15 - Amount of playback of pattern cycles" ] # [ inline ] pub fn cnt ( & self ) -> CNTR { CNTR :: _from ( { const MASK : u16 = 0xffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u16 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:15 - Amount of playback of pattern cycles" ] # [ inline ] pub fn cnt ( & mut self ) -> _CNTW { _CNTW { w : self } } } } } # [ doc = "Pulse Density Modulation (Digital Microphone) Interface" ] pub struct PDM { _marker : PhantomData < * const ( ) > } unsafe impl Send for PDM { } impl PDM { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const pdm :: RegisterBlock { 0x4001_d000 as * const _ } } impl Deref for PDM { type Target = pdm :: RegisterBlock ; fn deref ( & self ) -> & pdm :: RegisterBlock { unsafe { & * PDM :: ptr ( ) } } } # [ doc = "Pulse Density Modulation (Digital Microphone) Interface" ] pub mod pdm { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Starts continuous PDM transfer" ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stops PDM transfer" ] pub tasks_stop : TASKS_STOP , _reserved0 : [ u8 ; 248usize ] , # [ doc = "0x100 - PDM transfer has started" ] pub events_started : EVENTS_STARTED , # [ doc = "0x104 - PDM transfer has finished" ] pub events_stopped : EVENTS_STOPPED , # [ doc = "0x108 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM" ] pub events_end : EVENTS_END , _reserved1 : [ u8 ; 500usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved2 : [ u8 ; 500usize ] , # [ doc = "0x500 - PDM module enable register" ] pub enable : ENABLE , # [ doc = "0x504 - PDM clock generator control" ] pub pdmclkctrl : PDMCLKCTRL , # [ doc = "0x508 - Defines the routing of the connected PDM microphones' signals" ] pub mode : MODE , _reserved3 : [ u8 ; 12usize ] , # [ doc = "0x518 - Left output gain adjustment" ] pub gainl : GAINL , # [ doc = "0x51c - Right output gain adjustment" ] pub gainr : GAINR , } # [ doc = "Starts continuous PDM transfer" ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Starts continuous PDM transfer" ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stops PDM transfer" ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stops PDM transfer" ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "PDM transfer has started" ] pub struct EVENTS_STARTED { register : VolatileCell < u32 > } # [ doc = "PDM transfer has started" ] pub mod events_started { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STARTED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "PDM transfer has finished" ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "PDM transfer has finished" ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM" ] pub struct EVENTS_END { register : VolatileCell < u32 > } # [ doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM" ] pub mod events_end { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_END { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: DISABLED => false , STARTEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STARTEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: DISABLED => false , ENDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Enable" ] SET } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STARTEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Enable" ] SET } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( ENDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `STARTED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STARTEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STARTEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STARTEDR :: DISABLED => false , STARTEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STARTEDR { match value { false => STARTEDR :: DISABLED , true => STARTEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STARTEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STARTEDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `END`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl ENDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENDR :: DISABLED => false , ENDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENDR { match value { false => ENDR :: DISABLED , true => ENDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENDR :: ENABLED } } # [ doc = "Values that can be written to the field `STARTED`" ] pub enum STARTEDW { # [ doc = "Disable" ] CLEAR } impl STARTEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STARTEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STARTEDW < 'a > { w : & 'a mut W , } impl < 'a > _STARTEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STARTEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STARTEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `END`" ] pub enum ENDW { # [ doc = "Disable" ] CLEAR } impl ENDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _ENDW < 'a > { w : & 'a mut W , } impl < 'a > _ENDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( ENDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & self ) -> STARTEDR { STARTEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & self ) -> ENDR { ENDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for STARTED event" ] # [ inline ] pub fn started ( & mut self ) -> _STARTEDW { _STARTEDW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for END event" ] # [ inline ] pub fn end ( & mut self ) -> _ENDW { _ENDW { w : self } } } } # [ doc = "PDM module enable register" ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "PDM module enable register" ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENABLER :: DISABLED => false , ENABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENABLER { match value { false => ENABLER :: DISABLED , true => ENABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENABLEW :: DISABLED => false , ENABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable PDM module" ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable PDM module" ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } # [ doc = "PDM clock generator control" ] pub struct PDMCLKCTRL { register : VolatileCell < u32 > } # [ doc = "PDM clock generator control" ] pub mod pdmclkctrl { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PDMCLKCTRL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `FREQ`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum FREQR { # [ doc = "PDM_CLK = 32 MHz / 32 = 1.000 MHz" ] _1000K , # [ doc = "PDM_CLK = 32 MHz / 31 = 1.032 MHz" ] DEFAULT , # [ doc = "PDM_CLK = 32 MHz / 30 = 1.067 MHz" ] _1067K , # [ doc = r" Reserved" ] _Reserved ( u32 ) } impl FREQR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { match * self { FREQR :: _1000K => 0x0800_0000 , FREQR :: DEFAULT => 0x0840_0000 , FREQR :: _1067K => 0x0880_0000 , FREQR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u32 ) -> FREQR { match value { 134217728 => FREQR :: _1000K , 138412032 => FREQR :: DEFAULT , 142606336 => FREQR :: _1067K , i => FREQR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `_1000K`" ] # [ inline ] pub fn is_1000k ( & self ) -> bool { * self == FREQR :: _1000K } # [ doc = "Checks if the value of the field is `DEFAULT`" ] # [ inline ] pub fn is_default ( & self ) -> bool { * self == FREQR :: DEFAULT } # [ doc = "Checks if the value of the field is `_1067K`" ] # [ inline ] pub fn is_1067k ( & self ) -> bool { * self == FREQR :: _1067K } } # [ doc = "Values that can be written to the field `FREQ`" ] pub enum FREQW { # [ doc = "PDM_CLK = 32 MHz / 32 = 1.000 MHz" ] _1000K , # [ doc = "PDM_CLK = 32 MHz / 31 = 1.032 MHz" ] DEFAULT , # [ doc = "PDM_CLK = 32 MHz / 30 = 1.067 MHz" ] _1067K } impl FREQW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u32 { match * self { FREQW :: _1000K => 134217728 , FREQW :: DEFAULT => 138412032 , FREQW :: _1067K => 142606336 } } } # [ doc = r" Proxy" ] pub struct _FREQW < 'a > { w : & 'a mut W , } impl < 'a > _FREQW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : FREQW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "PDM_CLK = 32 MHz / 32 = 1.000 MHz" ] # [ inline ] pub fn _1000k ( self ) -> & 'a mut W { self . variant ( FREQW :: _1000K ) } # [ doc = "PDM_CLK = 32 MHz / 31 = 1.032 MHz" ] # [ inline ] pub fn default ( self ) -> & 'a mut W { self . variant ( FREQW :: DEFAULT ) } # [ doc = "PDM_CLK = 32 MHz / 30 = 1.067 MHz" ] # [ inline ] pub fn _1067k ( self ) -> & 'a mut W { self . variant ( FREQW :: _1067K ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - PDM_CLK frequency" ] # [ inline ] pub fn freq ( & self ) -> FREQR { FREQR :: _from ( { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x0840_0000 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - PDM_CLK frequency" ] # [ inline ] pub fn freq ( & mut self ) -> _FREQW { _FREQW { w : self } } } } # [ doc = "Defines the routing of the connected PDM microphones' signals" ] pub struct MODE { register : VolatileCell < u32 > } # [ doc = "Defines the routing of the connected PDM microphones' signals" ] pub mod mode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: MODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `OPERATION`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum OPERATIONR { # [ doc = "Sample and store one pair (Left + Right) of 16bit samples per RAM word R=[31:16]; L=[15:0]" ] STEREO , # [ doc = "Sample and store two successive Left samples (16 bit each) per RAM word L1=[31:16]; L0=[15:0]" ] MONO } impl OPERATIONR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { OPERATIONR :: STEREO => false , OPERATIONR :: MONO => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> OPERATIONR { match value { false => OPERATIONR :: STEREO , true => OPERATIONR :: MONO , } } # [ doc = "Checks if the value of the field is `STEREO`" ] # [ inline ] pub fn is_stereo ( & self ) -> bool { * self == OPERATIONR :: STEREO } # [ doc = "Checks if the value of the field is `MONO`" ] # [ inline ] pub fn is_mono ( & self ) -> bool { * self == OPERATIONR :: MONO } } # [ doc = "Possible values of the field `EDGE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum EDGER { # [ doc = "Left (or mono) is sampled on falling edge of PDM_CLK" ] LEFTFALLING , # [ doc = "Left (or mono) is sampled on rising edge of PDM_CLK" ] LEFTRISING } impl EDGER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { EDGER :: LEFTFALLING => false , EDGER :: LEFTRISING => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> EDGER { match value { false => EDGER :: LEFTFALLING , true => EDGER :: LEFTRISING , } } # [ doc = "Checks if the value of the field is `LEFTFALLING`" ] # [ inline ] pub fn is_left_falling ( & self ) -> bool { * self == EDGER :: LEFTFALLING } # [ doc = "Checks if the value of the field is `LEFTRISING`" ] # [ inline ] pub fn is_left_rising ( & self ) -> bool { * self == EDGER :: LEFTRISING } } # [ doc = "Values that can be written to the field `OPERATION`" ] pub enum OPERATIONW { # [ doc = "Sample and store one pair (Left + Right) of 16bit samples per RAM word R=[31:16]; L=[15:0]" ] STEREO , # [ doc = "Sample and store two successive Left samples (16 bit each) per RAM word L1=[31:16]; L0=[15:0]" ] MONO } impl OPERATIONW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { OPERATIONW :: STEREO => false , OPERATIONW :: MONO => true } } } # [ doc = r" Proxy" ] pub struct _OPERATIONW < 'a > { w : & 'a mut W , } impl < 'a > _OPERATIONW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : OPERATIONW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Sample and store one pair (Left + Right) of 16bit samples per RAM word R=[31:16]; L=[15:0]" ] # [ inline ] pub fn stereo ( self ) -> & 'a mut W { self . variant ( OPERATIONW :: STEREO ) } # [ doc = "Sample and store two successive Left samples (16 bit each) per RAM word L1=[31:16]; L0=[15:0]" ] # [ inline ] pub fn mono ( self ) -> & 'a mut W { self . variant ( OPERATIONW :: MONO ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `EDGE`" ] pub enum EDGEW { # [ doc = "Left (or mono) is sampled on falling edge of PDM_CLK" ] LEFTFALLING , # [ doc = "Left (or mono) is sampled on rising edge of PDM_CLK" ] LEFTRISING } impl EDGEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { EDGEW :: LEFTFALLING => false , EDGEW :: LEFTRISING => true } } } # [ doc = r" Proxy" ] pub struct _EDGEW < 'a > { w : & 'a mut W , } impl < 'a > _EDGEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : EDGEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Left (or mono) is sampled on falling edge of PDM_CLK" ] # [ inline ] pub fn left_falling ( self ) -> & 'a mut W { self . variant ( EDGEW :: LEFTFALLING ) } # [ doc = "Left (or mono) is sampled on rising edge of PDM_CLK" ] # [ inline ] pub fn left_rising ( self ) -> & 'a mut W { self . variant ( EDGEW :: LEFTRISING ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Mono or stereo operation" ] # [ inline ] pub fn operation ( & self ) -> OPERATIONR { OPERATIONR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled" ] # [ inline ] pub fn edge ( & self ) -> EDGER { EDGER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Mono or stereo operation" ] # [ inline ] pub fn operation ( & mut self ) -> _OPERATIONW { _OPERATIONW { w : self } } # [ doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled" ] # [ inline ] pub fn edge ( & mut self ) -> _EDGEW { _EDGEW { w : self } } } } # [ doc = "Left output gain adjustment" ] pub struct GAINL { register : VolatileCell < u32 > } # [ doc = "Left output gain adjustment" ] pub mod gainl { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: GAINL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `GAINL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GAINLR { # [ doc = "-20dB gain adjustment (minimum)" ] MINGAIN , # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] DEFAULTGAIN , # [ doc = "+20dB gain adjustment (maximum)" ] MAXGAIN , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl GAINLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { GAINLR :: MINGAIN => 0 , GAINLR :: DEFAULTGAIN => 0x28 , GAINLR :: MAXGAIN => 0x50 , GAINLR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> GAINLR { match value { 0 => GAINLR :: MINGAIN , 40 => GAINLR :: DEFAULTGAIN , 80 => GAINLR :: MAXGAIN , i => GAINLR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `MINGAIN`" ] # [ inline ] pub fn is_min_gain ( & self ) -> bool { * self == GAINLR :: MINGAIN } # [ doc = "Checks if the value of the field is `DEFAULTGAIN`" ] # [ inline ] pub fn is_default_gain ( & self ) -> bool { * self == GAINLR :: DEFAULTGAIN } # [ doc = "Checks if the value of the field is `MAXGAIN`" ] # [ inline ] pub fn is_max_gain ( & self ) -> bool { * self == GAINLR :: MAXGAIN } } # [ doc = "Values that can be written to the field `GAINL`" ] pub enum GAINLW { # [ doc = "-20dB gain adjustment (minimum)" ] MINGAIN , # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] DEFAULTGAIN , # [ doc = "+20dB gain adjustment (maximum)" ] MAXGAIN } impl GAINLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { GAINLW :: MINGAIN => 0 , GAINLW :: DEFAULTGAIN => 40 , GAINLW :: MAXGAIN => 80 } } } # [ doc = r" Proxy" ] pub struct _GAINLW < 'a > { w : & 'a mut W , } impl < 'a > _GAINLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : GAINLW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "-20dB gain adjustment (minimum)" ] # [ inline ] pub fn min_gain ( self ) -> & 'a mut W { self . variant ( GAINLW :: MINGAIN ) } # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] # [ inline ] pub fn default_gain ( self ) -> & 'a mut W { self . variant ( GAINLW :: DEFAULTGAIN ) } # [ doc = "+20dB gain adjustment (maximum)" ] # [ inline ] pub fn max_gain ( self ) -> & 'a mut W { self . variant ( GAINLW :: MAXGAIN ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust" ] # [ inline ] pub fn gainl ( & self ) -> GAINLR { GAINLR :: _from ( { const MASK : u8 = 0x7f ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x28 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust" ] # [ inline ] pub fn gainl ( & mut self ) -> _GAINLW { _GAINLW { w : self } } } } # [ doc = "Right output gain adjustment" ] pub struct GAINR { register : VolatileCell < u32 > } # [ doc = "Right output gain adjustment" ] pub mod gainr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: GAINR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `GAINR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum GAINRR { # [ doc = "-20dB gain adjustment (minimum)" ] MINGAIN , # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] DEFAULTGAIN , # [ doc = "+20dB gain adjustment (maximum)" ] MAXGAIN , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl GAINRR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { GAINRR :: MINGAIN => 0 , GAINRR :: DEFAULTGAIN => 0x28 , GAINRR :: MAXGAIN => 0x50 , GAINRR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> GAINRR { match value { 0 => GAINRR :: MINGAIN , 40 => GAINRR :: DEFAULTGAIN , 80 => GAINRR :: MAXGAIN , i => GAINRR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `MINGAIN`" ] # [ inline ] pub fn is_min_gain ( & self ) -> bool { * self == GAINRR :: MINGAIN } # [ doc = "Checks if the value of the field is `DEFAULTGAIN`" ] # [ inline ] pub fn is_default_gain ( & self ) -> bool { * self == GAINRR :: DEFAULTGAIN } # [ doc = "Checks if the value of the field is `MAXGAIN`" ] # [ inline ] pub fn is_max_gain ( & self ) -> bool { * self == GAINRR :: MAXGAIN } } # [ doc = "Values that can be written to the field `GAINR`" ] pub enum GAINRW { # [ doc = "-20dB gain adjustment (minimum)" ] MINGAIN , # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] DEFAULTGAIN , # [ doc = "+20dB gain adjustment (maximum)" ] MAXGAIN } impl GAINRW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { GAINRW :: MINGAIN => 0 , GAINRW :: DEFAULTGAIN => 40 , GAINRW :: MAXGAIN => 80 } } } # [ doc = r" Proxy" ] pub struct _GAINRW < 'a > { w : & 'a mut W , } impl < 'a > _GAINRW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : GAINRW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "-20dB gain adjustment (minimum)" ] # [ inline ] pub fn min_gain ( self ) -> & 'a mut W { self . variant ( GAINRW :: MINGAIN ) } # [ doc = "0dB gain adjustment ('2500 RMS' requirement)" ] # [ inline ] pub fn default_gain ( self ) -> & 'a mut W { self . variant ( GAINRW :: DEFAULTGAIN ) } # [ doc = "+20dB gain adjustment (maximum)" ] # [ inline ] pub fn max_gain ( self ) -> & 'a mut W { self . variant ( GAINRW :: MAXGAIN ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)" ] # [ inline ] pub fn gainr ( & self ) -> GAINRR { GAINRR :: _from ( { const MASK : u8 = 0xff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x28 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)" ] # [ inline ] pub fn gainr ( & mut self ) -> _GAINRW { _GAINRW { w : self } } } } } # [ doc = "Non Volatile Memory Controller" ] pub struct NVMC { _marker : PhantomData < * const ( ) > } unsafe impl Send for NVMC { } impl NVMC { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const nvmc :: RegisterBlock { 0x4001_e000 as * const _ } } impl Deref for NVMC { type Target = nvmc :: RegisterBlock ; fn deref ( & self ) -> & nvmc :: RegisterBlock { unsafe { & * NVMC :: ptr ( ) } } } # [ doc = "Non Volatile Memory Controller" ] pub mod nvmc { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 1024usize ] , # [ doc = "0x400 - Ready flag" ] pub ready : READY , _reserved1 : [ u8 ; 256usize ] , # [ doc = "0x504 - Configuration register" ] pub config : CONFIG , # [ doc = "0x508 - Register for erasing a page in Code area" ] pub erasepage : ERASEPAGE , # [ doc = "0x50c - Register for erasing all non-volatile user memory" ] pub eraseall : ERASEALL , # [ doc = "0x510 - Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE." ] pub erasepcr0 : ERASEPCR0 , # [ doc = "0x514 - Register for erasing User Information Configuration Registers" ] pub eraseuicr : ERASEUICR , _reserved2 : [ u8 ; 40usize ] , # [ doc = "0x540 - I-Code cache configuration register." ] pub icachecnf : ICACHECNF , _reserved3 : [ u8 ; 4usize ] , # [ doc = "0x548 - I-Code cache hit counter." ] pub ihit : IHIT , # [ doc = "0x54c - I-Code cache miss counter." ] pub imiss : IMISS , } # [ doc = "Ready flag" ] pub struct READY { register : VolatileCell < u32 > } # [ doc = "Ready flag" ] pub mod ready { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: READY { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `READY`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum READYR { # [ doc = "NVMC is busy (on-going write or erase operation)" ] BUSY , # [ doc = "NVMC is ready" ] READY } impl READYR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { READYR :: BUSY => false , READYR :: READY => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> READYR { match value { false => READYR :: BUSY , true => READYR :: READY , } } # [ doc = "Checks if the value of the field is `BUSY`" ] # [ inline ] pub fn is_busy ( & self ) -> bool { * self == READYR :: BUSY } # [ doc = "Checks if the value of the field is `READY`" ] # [ inline ] pub fn is_ready ( & self ) -> bool { * self == READYR :: READY } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - NVMC is ready or busy" ] # [ inline ] pub fn ready ( & self ) -> READYR { READYR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Configuration register" ] pub struct CONFIG { register : VolatileCell < u32 > } # [ doc = "Configuration register" ] pub mod config { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CONFIG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `WEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum WENR { # [ doc = "Read only access" ] REN , # [ doc = "Write Enabled" ] WEN , # [ doc = "Erase enabled" ] EEN , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl WENR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { WENR :: REN => 0 , WENR :: WEN => 0x01 , WENR :: EEN => 0x02 , WENR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> WENR { match value { 0 => WENR :: REN , 1 => WENR :: WEN , 2 => WENR :: EEN , i => WENR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `REN`" ] # [ inline ] pub fn is_ren ( & self ) -> bool { * self == WENR :: REN } # [ doc = "Checks if the value of the field is `WEN`" ] # [ inline ] pub fn is_wen ( & self ) -> bool { * self == WENR :: WEN } # [ doc = "Checks if the value of the field is `EEN`" ] # [ inline ] pub fn is_een ( & self ) -> bool { * self == WENR :: EEN } } # [ doc = "Values that can be written to the field `WEN`" ] pub enum WENW { # [ doc = "Read only access" ] REN , # [ doc = "Write Enabled" ] WEN , # [ doc = "Erase enabled" ] EEN } impl WENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { WENW :: REN => 0 , WENW :: WEN => 1 , WENW :: EEN => 2 } } } # [ doc = r" Proxy" ] pub struct _WENW < 'a > { w : & 'a mut W , } impl < 'a > _WENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : WENW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Read only access" ] # [ inline ] pub fn ren ( self ) -> & 'a mut W { self . variant ( WENW :: REN ) } # [ doc = "Write Enabled" ] # [ inline ] pub fn wen ( self ) -> & 'a mut W { self . variant ( WENW :: WEN ) } # [ doc = "Erase enabled" ] # [ inline ] pub fn een ( self ) -> & 'a mut W { self . variant ( WENW :: EEN ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated." ] # [ inline ] pub fn wen ( & self ) -> WENR { WENR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated." ] # [ inline ] pub fn wen ( & mut self ) -> _WENW { _WENW { w : self } } } } # [ doc = "Register for erasing a page in Code area" ] pub struct ERASEPAGE { register : VolatileCell < u32 > } # [ doc = "Register for erasing a page in Code area" ] pub mod erasepage { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERASEPAGE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ERASEPAGER { bits : u32 , } impl ERASEPAGER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _ERASEPAGEW < 'a > { w : & 'a mut W , } impl < 'a > _ERASEPAGEW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Register for starting erase of a page in Code area" ] # [ inline ] pub fn erasepage ( & self ) -> ERASEPAGER { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ERASEPAGER { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Register for starting erase of a page in Code area" ] # [ inline ] pub fn erasepage ( & mut self ) -> _ERASEPAGEW { _ERASEPAGEW { w : self } } } } # [ doc = "Register for erasing all non-volatile user memory" ] pub struct ERASEALL { register : VolatileCell < u32 > } # [ doc = "Register for erasing all non-volatile user memory" ] pub mod eraseall { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERASEALL { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ERASEALL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERASEALLR { # [ doc = "No operation" ] NOOPERATION , # [ doc = "Start chip erase" ] ERASE } impl ERASEALLR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERASEALLR :: NOOPERATION => false , ERASEALLR :: ERASE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERASEALLR { match value { false => ERASEALLR :: NOOPERATION , true => ERASEALLR :: ERASE , } } # [ doc = "Checks if the value of the field is `NOOPERATION`" ] # [ inline ] pub fn is_no_operation ( & self ) -> bool { * self == ERASEALLR :: NOOPERATION } # [ doc = "Checks if the value of the field is `ERASE`" ] # [ inline ] pub fn is_erase ( & self ) -> bool { * self == ERASEALLR :: ERASE } } # [ doc = "Values that can be written to the field `ERASEALL`" ] pub enum ERASEALLW { # [ doc = "No operation" ] NOOPERATION , # [ doc = "Start chip erase" ] ERASE } impl ERASEALLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERASEALLW :: NOOPERATION => false , ERASEALLW :: ERASE => true } } } # [ doc = r" Proxy" ] pub struct _ERASEALLW < 'a > { w : & 'a mut W , } impl < 'a > _ERASEALLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERASEALLW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "No operation" ] # [ inline ] pub fn no_operation ( self ) -> & 'a mut W { self . variant ( ERASEALLW :: NOOPERATION ) } # [ doc = "Start chip erase" ] # [ inline ] pub fn erase ( self ) -> & 'a mut W { self . variant ( ERASEALLW :: ERASE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased." ] # [ inline ] pub fn eraseall ( & self ) -> ERASEALLR { ERASEALLR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased." ] # [ inline ] pub fn eraseall ( & mut self ) -> _ERASEALLW { _ERASEALLW { w : self } } } } # [ doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE." ] pub struct ERASEPCR0 { register : VolatileCell < u32 > } # [ doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE." ] pub mod erasepcr0 { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERASEPCR0 { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct ERASEPCR0R { bits : u32 , } impl ERASEPCR0R { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _ERASEPCR0W < 'a > { w : & 'a mut W , } impl < 'a > _ERASEPCR0W < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE." ] # [ inline ] pub fn erasepcr0 ( & self ) -> ERASEPCR0R { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; ERASEPCR0R { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE." ] # [ inline ] pub fn erasepcr0 ( & mut self ) -> _ERASEPCR0W { _ERASEPCR0W { w : self } } } } # [ doc = "Register for erasing User Information Configuration Registers" ] pub struct ERASEUICR { register : VolatileCell < u32 > } # [ doc = "Register for erasing User Information Configuration Registers" ] pub mod eraseuicr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ERASEUICR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ERASEUICR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ERASEUICRR { # [ doc = "No operation" ] NOOPERATION , # [ doc = "Start erase of UICR" ] ERASE } impl ERASEUICRR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ERASEUICRR :: NOOPERATION => false , ERASEUICRR :: ERASE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ERASEUICRR { match value { false => ERASEUICRR :: NOOPERATION , true => ERASEUICRR :: ERASE , } } # [ doc = "Checks if the value of the field is `NOOPERATION`" ] # [ inline ] pub fn is_no_operation ( & self ) -> bool { * self == ERASEUICRR :: NOOPERATION } # [ doc = "Checks if the value of the field is `ERASE`" ] # [ inline ] pub fn is_erase ( & self ) -> bool { * self == ERASEUICRR :: ERASE } } # [ doc = "Values that can be written to the field `ERASEUICR`" ] pub enum ERASEUICRW { # [ doc = "No operation" ] NOOPERATION , # [ doc = "Start erase of UICR" ] ERASE } impl ERASEUICRW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ERASEUICRW :: NOOPERATION => false , ERASEUICRW :: ERASE => true } } } # [ doc = r" Proxy" ] pub struct _ERASEUICRW < 'a > { w : & 'a mut W , } impl < 'a > _ERASEUICRW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ERASEUICRW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "No operation" ] # [ inline ] pub fn no_operation ( self ) -> & 'a mut W { self . variant ( ERASEUICRW :: NOOPERATION ) } # [ doc = "Start erase of UICR" ] # [ inline ] pub fn erase ( self ) -> & 'a mut W { self . variant ( ERASEUICRW :: ERASE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased." ] # [ inline ] pub fn eraseuicr ( & self ) -> ERASEUICRR { ERASEUICRR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased." ] # [ inline ] pub fn eraseuicr ( & mut self ) -> _ERASEUICRW { _ERASEUICRW { w : self } } } } # [ doc = "I-Code cache configuration register." ] pub struct ICACHECNF { register : VolatileCell < u32 > } # [ doc = "I-Code cache configuration register." ] pub mod icachecnf { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ICACHECNF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CACHEEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CACHEENR { # [ doc = "Disable cache. Invalidates all cache entries." ] DISABLED , # [ doc = "Enable cache" ] ENABLED } impl CACHEENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CACHEENR :: DISABLED => false , CACHEENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CACHEENR { match value { false => CACHEENR :: DISABLED , true => CACHEENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CACHEENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CACHEENR :: ENABLED } } # [ doc = "Possible values of the field `CACHEPROFEN`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CACHEPROFENR { # [ doc = "Disable cache profiling" ] DISABLED , # [ doc = "Enable cache profiling" ] ENABLED } impl CACHEPROFENR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CACHEPROFENR :: DISABLED => false , CACHEPROFENR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CACHEPROFENR { match value { false => CACHEPROFENR :: DISABLED , true => CACHEPROFENR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CACHEPROFENR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CACHEPROFENR :: ENABLED } } # [ doc = "Values that can be written to the field `CACHEEN`" ] pub enum CACHEENW { # [ doc = "Disable cache. Invalidates all cache entries." ] DISABLED , # [ doc = "Enable cache" ] ENABLED } impl CACHEENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CACHEENW :: DISABLED => false , CACHEENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CACHEENW < 'a > { w : & 'a mut W , } impl < 'a > _CACHEENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CACHEENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable cache. Invalidates all cache entries." ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CACHEENW :: DISABLED ) } # [ doc = "Enable cache" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CACHEENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CACHEPROFEN`" ] pub enum CACHEPROFENW { # [ doc = "Disable cache profiling" ] DISABLED , # [ doc = "Enable cache profiling" ] ENABLED } impl CACHEPROFENW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CACHEPROFENW :: DISABLED => false , CACHEPROFENW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CACHEPROFENW < 'a > { w : & 'a mut W , } impl < 'a > _CACHEPROFENW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CACHEPROFENW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable cache profiling" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CACHEPROFENW :: DISABLED ) } # [ doc = "Enable cache profiling" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CACHEPROFENW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Cache enable" ] # [ inline ] pub fn cacheen ( & self ) -> CACHEENR { CACHEENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Cache profiling enable" ] # [ inline ] pub fn cacheprofen ( & self ) -> CACHEPROFENR { CACHEPROFENR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Cache enable" ] # [ inline ] pub fn cacheen ( & mut self ) -> _CACHEENW { _CACHEENW { w : self } } # [ doc = "Bit 8 - Cache profiling enable" ] # [ inline ] pub fn cacheprofen ( & mut self ) -> _CACHEPROFENW { _CACHEPROFENW { w : self } } } } # [ doc = "I-Code cache hit counter." ] pub struct IHIT { register : VolatileCell < u32 > } # [ doc = "I-Code cache hit counter." ] pub mod ihit { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: IHIT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct HITSR { bits : u32 , } impl HITSR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _HITSW < 'a > { w : & 'a mut W , } impl < 'a > _HITSW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Number of cache hits" ] # [ inline ] pub fn hits ( & self ) -> HITSR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; HITSR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Number of cache hits" ] # [ inline ] pub fn hits ( & mut self ) -> _HITSW { _HITSW { w : self } } } } # [ doc = "I-Code cache miss counter." ] pub struct IMISS { register : VolatileCell < u32 > } # [ doc = "I-Code cache miss counter." ] pub mod imiss { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: IMISS { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = r" Value of the field" ] pub struct MISSESR { bits : u32 , } impl MISSESR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } # [ doc = r" Proxy" ] pub struct _MISSESW < 'a > { w : & 'a mut W , } impl < 'a > _MISSESW < 'a > { # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u32 ) -> & 'a mut W { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bits 0:31 - Number of cache misses" ] # [ inline ] pub fn misses ( & self ) -> MISSESR { let bits = { const MASK : u32 = 0xffff_ffff ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u32 } ; MISSESR { bits } } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bits 0:31 - Number of cache misses" ] # [ inline ] pub fn misses ( & mut self ) -> _MISSESW { _MISSESW { w : self } } } } } # [ doc = "Programmable Peripheral Interconnect" ] pub struct PPI { _marker : PhantomData < * const ( ) > } unsafe impl Send for PPI { } impl PPI { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const ppi :: RegisterBlock { 0x4001_f000 as * const _ } } impl Deref for PPI { type Target = ppi :: RegisterBlock ; fn deref ( & self ) -> & ppi :: RegisterBlock { unsafe { & * PPI :: ptr ( ) } } } # [ doc = "Programmable Peripheral Interconnect" ] pub mod ppi { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 1280usize ] , # [ doc = "0x500 - Channel enable register" ] pub chen : CHEN , # [ doc = "0x504 - Channel enable set register" ] pub chenset : CHENSET , # [ doc = "0x508 - Channel enable clear register" ] pub chenclr : CHENCLR , _reserved1 : [ u8 ; 756usize ] , # [ doc = "0x800 - Description collection[0]: Channel group 0" ] pub chg : [ CHG ; 6 ] , } # [ doc = "Channel enable register" ] pub struct CHEN { register : VolatileCell < u32 > } # [ doc = "Channel enable register" ] pub mod chen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CHEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CH0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0R :: DISABLED => false , CH0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0R { match value { false => CH0R :: DISABLED , true => CH0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0R :: ENABLED } } # [ doc = "Possible values of the field `CH1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1R :: DISABLED => false , CH1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1R { match value { false => CH1R :: DISABLED , true => CH1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1R :: ENABLED } } # [ doc = "Possible values of the field `CH2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2R :: DISABLED => false , CH2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2R { match value { false => CH2R :: DISABLED , true => CH2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2R :: ENABLED } } # [ doc = "Possible values of the field `CH3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3R :: DISABLED => false , CH3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3R { match value { false => CH3R :: DISABLED , true => CH3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3R :: ENABLED } } # [ doc = "Possible values of the field `CH4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4R :: DISABLED => false , CH4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4R { match value { false => CH4R :: DISABLED , true => CH4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4R :: ENABLED } } # [ doc = "Possible values of the field `CH5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5R :: DISABLED => false , CH5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5R { match value { false => CH5R :: DISABLED , true => CH5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5R :: ENABLED } } # [ doc = "Possible values of the field `CH6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6R :: DISABLED => false , CH6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6R { match value { false => CH6R :: DISABLED , true => CH6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6R :: ENABLED } } # [ doc = "Possible values of the field `CH7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7R :: DISABLED => false , CH7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7R { match value { false => CH7R :: DISABLED , true => CH7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7R :: ENABLED } } # [ doc = "Possible values of the field `CH8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH8R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH8R :: DISABLED => false , CH8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH8R { match value { false => CH8R :: DISABLED , true => CH8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH8R :: ENABLED } } # [ doc = "Possible values of the field `CH9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH9R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH9R :: DISABLED => false , CH9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH9R { match value { false => CH9R :: DISABLED , true => CH9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH9R :: ENABLED } } # [ doc = "Possible values of the field `CH10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH10R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH10R :: DISABLED => false , CH10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH10R { match value { false => CH10R :: DISABLED , true => CH10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH10R :: ENABLED } } # [ doc = "Possible values of the field `CH11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH11R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH11R :: DISABLED => false , CH11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH11R { match value { false => CH11R :: DISABLED , true => CH11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH11R :: ENABLED } } # [ doc = "Possible values of the field `CH12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH12R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH12R :: DISABLED => false , CH12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH12R { match value { false => CH12R :: DISABLED , true => CH12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH12R :: ENABLED } } # [ doc = "Possible values of the field `CH13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH13R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH13R :: DISABLED => false , CH13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH13R { match value { false => CH13R :: DISABLED , true => CH13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH13R :: ENABLED } } # [ doc = "Possible values of the field `CH14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH14R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH14R :: DISABLED => false , CH14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH14R { match value { false => CH14R :: DISABLED , true => CH14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH14R :: ENABLED } } # [ doc = "Possible values of the field `CH15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH15R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH15R :: DISABLED => false , CH15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH15R { match value { false => CH15R :: DISABLED , true => CH15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH15R :: ENABLED } } # [ doc = "Possible values of the field `CH16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH16R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH16R :: DISABLED => false , CH16R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH16R { match value { false => CH16R :: DISABLED , true => CH16R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH16R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH16R :: ENABLED } } # [ doc = "Possible values of the field `CH17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH17R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH17R :: DISABLED => false , CH17R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH17R { match value { false => CH17R :: DISABLED , true => CH17R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH17R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH17R :: ENABLED } } # [ doc = "Possible values of the field `CH18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH18R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH18R :: DISABLED => false , CH18R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH18R { match value { false => CH18R :: DISABLED , true => CH18R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH18R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH18R :: ENABLED } } # [ doc = "Possible values of the field `CH19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH19R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH19R :: DISABLED => false , CH19R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH19R { match value { false => CH19R :: DISABLED , true => CH19R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH19R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH19R :: ENABLED } } # [ doc = "Possible values of the field `CH20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH20R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH20R :: DISABLED => false , CH20R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH20R { match value { false => CH20R :: DISABLED , true => CH20R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH20R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH20R :: ENABLED } } # [ doc = "Possible values of the field `CH21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH21R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH21R :: DISABLED => false , CH21R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH21R { match value { false => CH21R :: DISABLED , true => CH21R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH21R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH21R :: ENABLED } } # [ doc = "Possible values of the field `CH22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH22R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH22R :: DISABLED => false , CH22R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH22R { match value { false => CH22R :: DISABLED , true => CH22R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH22R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH22R :: ENABLED } } # [ doc = "Possible values of the field `CH23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH23R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH23R :: DISABLED => false , CH23R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH23R { match value { false => CH23R :: DISABLED , true => CH23R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH23R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH23R :: ENABLED } } # [ doc = "Possible values of the field `CH24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH24R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH24R :: DISABLED => false , CH24R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH24R { match value { false => CH24R :: DISABLED , true => CH24R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH24R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH24R :: ENABLED } } # [ doc = "Possible values of the field `CH25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH25R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH25R :: DISABLED => false , CH25R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH25R { match value { false => CH25R :: DISABLED , true => CH25R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH25R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH25R :: ENABLED } } # [ doc = "Possible values of the field `CH26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH26R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH26R :: DISABLED => false , CH26R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH26R { match value { false => CH26R :: DISABLED , true => CH26R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH26R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH26R :: ENABLED } } # [ doc = "Possible values of the field `CH27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH27R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH27R :: DISABLED => false , CH27R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH27R { match value { false => CH27R :: DISABLED , true => CH27R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH27R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH27R :: ENABLED } } # [ doc = "Possible values of the field `CH28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH28R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH28R :: DISABLED => false , CH28R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH28R { match value { false => CH28R :: DISABLED , true => CH28R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH28R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH28R :: ENABLED } } # [ doc = "Possible values of the field `CH29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH29R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH29R :: DISABLED => false , CH29R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH29R { match value { false => CH29R :: DISABLED , true => CH29R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH29R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH29R :: ENABLED } } # [ doc = "Possible values of the field `CH30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH30R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH30R :: DISABLED => false , CH30R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH30R { match value { false => CH30R :: DISABLED , true => CH30R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH30R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH30R :: ENABLED } } # [ doc = "Possible values of the field `CH31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH31R { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH31R :: DISABLED => false , CH31R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH31R { match value { false => CH31R :: DISABLED , true => CH31R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH31R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH31R :: ENABLED } } # [ doc = "Values that can be written to the field `CH0`" ] pub enum CH0W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0W :: DISABLED => false , CH0W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH0W < 'a > { w : & 'a mut W , } impl < 'a > _CH0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH0W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH0W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1`" ] pub enum CH1W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1W :: DISABLED => false , CH1W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH1W < 'a > { w : & 'a mut W , } impl < 'a > _CH1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH1W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH1W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2`" ] pub enum CH2W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2W :: DISABLED => false , CH2W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH2W < 'a > { w : & 'a mut W , } impl < 'a > _CH2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH2W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH2W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3`" ] pub enum CH3W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3W :: DISABLED => false , CH3W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH3W < 'a > { w : & 'a mut W , } impl < 'a > _CH3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH3W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH3W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4`" ] pub enum CH4W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4W :: DISABLED => false , CH4W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH4W < 'a > { w : & 'a mut W , } impl < 'a > _CH4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH4W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH4W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5`" ] pub enum CH5W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5W :: DISABLED => false , CH5W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH5W < 'a > { w : & 'a mut W , } impl < 'a > _CH5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH5W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH5W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6`" ] pub enum CH6W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6W :: DISABLED => false , CH6W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH6W < 'a > { w : & 'a mut W , } impl < 'a > _CH6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH6W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH6W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7`" ] pub enum CH7W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7W :: DISABLED => false , CH7W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH7W < 'a > { w : & 'a mut W , } impl < 'a > _CH7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH7W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH7W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH8`" ] pub enum CH8W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH8W :: DISABLED => false , CH8W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH8W < 'a > { w : & 'a mut W , } impl < 'a > _CH8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH8W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH8W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH9`" ] pub enum CH9W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH9W :: DISABLED => false , CH9W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH9W < 'a > { w : & 'a mut W , } impl < 'a > _CH9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH9W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH9W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH10`" ] pub enum CH10W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH10W :: DISABLED => false , CH10W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH10W < 'a > { w : & 'a mut W , } impl < 'a > _CH10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH10W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH10W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH11`" ] pub enum CH11W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH11W :: DISABLED => false , CH11W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH11W < 'a > { w : & 'a mut W , } impl < 'a > _CH11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH11W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH11W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH12`" ] pub enum CH12W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH12W :: DISABLED => false , CH12W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH12W < 'a > { w : & 'a mut W , } impl < 'a > _CH12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH12W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH12W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH13`" ] pub enum CH13W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH13W :: DISABLED => false , CH13W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH13W < 'a > { w : & 'a mut W , } impl < 'a > _CH13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH13W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH13W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH14`" ] pub enum CH14W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH14W :: DISABLED => false , CH14W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH14W < 'a > { w : & 'a mut W , } impl < 'a > _CH14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH14W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH14W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH15`" ] pub enum CH15W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH15W :: DISABLED => false , CH15W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH15W < 'a > { w : & 'a mut W , } impl < 'a > _CH15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH15W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH15W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH16`" ] pub enum CH16W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH16W :: DISABLED => false , CH16W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH16W < 'a > { w : & 'a mut W , } impl < 'a > _CH16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH16W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH16W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH17`" ] pub enum CH17W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH17W :: DISABLED => false , CH17W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH17W < 'a > { w : & 'a mut W , } impl < 'a > _CH17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH17W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH17W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH18`" ] pub enum CH18W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH18W :: DISABLED => false , CH18W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH18W < 'a > { w : & 'a mut W , } impl < 'a > _CH18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH18W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH18W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH19`" ] pub enum CH19W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH19W :: DISABLED => false , CH19W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH19W < 'a > { w : & 'a mut W , } impl < 'a > _CH19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH19W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH19W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH20`" ] pub enum CH20W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH20W :: DISABLED => false , CH20W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH20W < 'a > { w : & 'a mut W , } impl < 'a > _CH20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH20W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH20W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH21`" ] pub enum CH21W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH21W :: DISABLED => false , CH21W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH21W < 'a > { w : & 'a mut W , } impl < 'a > _CH21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH21W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH21W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH22`" ] pub enum CH22W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH22W :: DISABLED => false , CH22W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH22W < 'a > { w : & 'a mut W , } impl < 'a > _CH22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH22W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH22W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH23`" ] pub enum CH23W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH23W :: DISABLED => false , CH23W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH23W < 'a > { w : & 'a mut W , } impl < 'a > _CH23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH23W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH23W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH24`" ] pub enum CH24W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH24W :: DISABLED => false , CH24W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH24W < 'a > { w : & 'a mut W , } impl < 'a > _CH24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH24W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH24W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH25`" ] pub enum CH25W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH25W :: DISABLED => false , CH25W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH25W < 'a > { w : & 'a mut W , } impl < 'a > _CH25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH25W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH25W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH26`" ] pub enum CH26W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH26W :: DISABLED => false , CH26W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH26W < 'a > { w : & 'a mut W , } impl < 'a > _CH26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH26W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH26W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH27`" ] pub enum CH27W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH27W :: DISABLED => false , CH27W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH27W < 'a > { w : & 'a mut W , } impl < 'a > _CH27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH27W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH27W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH28`" ] pub enum CH28W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH28W :: DISABLED => false , CH28W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH28W < 'a > { w : & 'a mut W , } impl < 'a > _CH28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH28W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH28W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH29`" ] pub enum CH29W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH29W :: DISABLED => false , CH29W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH29W < 'a > { w : & 'a mut W , } impl < 'a > _CH29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH29W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH29W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH30`" ] pub enum CH30W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH30W :: DISABLED => false , CH30W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH30W < 'a > { w : & 'a mut W , } impl < 'a > _CH30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH30W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH30W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH31`" ] pub enum CH31W { # [ doc = "Disable channel" ] DISABLED , # [ doc = "Enable channel" ] ENABLED } impl CH31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH31W :: DISABLED => false , CH31W :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _CH31W < 'a > { w : & 'a mut W , } impl < 'a > _CH31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable channel" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( CH31W :: DISABLED ) } # [ doc = "Enable channel" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( CH31W :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable channel 0" ] # [ inline ] pub fn ch0 ( & self ) -> CH0R { CH0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable channel 1" ] # [ inline ] pub fn ch1 ( & self ) -> CH1R { CH1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable channel 2" ] # [ inline ] pub fn ch2 ( & self ) -> CH2R { CH2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable channel 3" ] # [ inline ] pub fn ch3 ( & self ) -> CH3R { CH3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable channel 4" ] # [ inline ] pub fn ch4 ( & self ) -> CH4R { CH4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable channel 5" ] # [ inline ] pub fn ch5 ( & self ) -> CH5R { CH5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable channel 6" ] # [ inline ] pub fn ch6 ( & self ) -> CH6R { CH6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable channel 7" ] # [ inline ] pub fn ch7 ( & self ) -> CH7R { CH7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Enable or disable channel 8" ] # [ inline ] pub fn ch8 ( & self ) -> CH8R { CH8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Enable or disable channel 9" ] # [ inline ] pub fn ch9 ( & self ) -> CH9R { CH9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Enable or disable channel 10" ] # [ inline ] pub fn ch10 ( & self ) -> CH10R { CH10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Enable or disable channel 11" ] # [ inline ] pub fn ch11 ( & self ) -> CH11R { CH11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Enable or disable channel 12" ] # [ inline ] pub fn ch12 ( & self ) -> CH12R { CH12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Enable or disable channel 13" ] # [ inline ] pub fn ch13 ( & self ) -> CH13R { CH13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Enable or disable channel 14" ] # [ inline ] pub fn ch14 ( & self ) -> CH14R { CH14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Enable or disable channel 15" ] # [ inline ] pub fn ch15 ( & self ) -> CH15R { CH15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Enable or disable channel 16" ] # [ inline ] pub fn ch16 ( & self ) -> CH16R { CH16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Enable or disable channel 17" ] # [ inline ] pub fn ch17 ( & self ) -> CH17R { CH17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Enable or disable channel 18" ] # [ inline ] pub fn ch18 ( & self ) -> CH18R { CH18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Enable or disable channel 19" ] # [ inline ] pub fn ch19 ( & self ) -> CH19R { CH19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Enable or disable channel 20" ] # [ inline ] pub fn ch20 ( & self ) -> CH20R { CH20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Enable or disable channel 21" ] # [ inline ] pub fn ch21 ( & self ) -> CH21R { CH21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Enable or disable channel 22" ] # [ inline ] pub fn ch22 ( & self ) -> CH22R { CH22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Enable or disable channel 23" ] # [ inline ] pub fn ch23 ( & self ) -> CH23R { CH23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable or disable channel 24" ] # [ inline ] pub fn ch24 ( & self ) -> CH24R { CH24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable or disable channel 25" ] # [ inline ] pub fn ch25 ( & self ) -> CH25R { CH25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable or disable channel 26" ] # [ inline ] pub fn ch26 ( & self ) -> CH26R { CH26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable or disable channel 27" ] # [ inline ] pub fn ch27 ( & self ) -> CH27R { CH27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Enable or disable channel 28" ] # [ inline ] pub fn ch28 ( & self ) -> CH28R { CH28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Enable or disable channel 29" ] # [ inline ] pub fn ch29 ( & self ) -> CH29R { CH29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Enable or disable channel 30" ] # [ inline ] pub fn ch30 ( & self ) -> CH30R { CH30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Enable or disable channel 31" ] # [ inline ] pub fn ch31 ( & self ) -> CH31R { CH31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable channel 0" ] # [ inline ] pub fn ch0 ( & mut self ) -> _CH0W { _CH0W { w : self } } # [ doc = "Bit 1 - Enable or disable channel 1" ] # [ inline ] pub fn ch1 ( & mut self ) -> _CH1W { _CH1W { w : self } } # [ doc = "Bit 2 - Enable or disable channel 2" ] # [ inline ] pub fn ch2 ( & mut self ) -> _CH2W { _CH2W { w : self } } # [ doc = "Bit 3 - Enable or disable channel 3" ] # [ inline ] pub fn ch3 ( & mut self ) -> _CH3W { _CH3W { w : self } } # [ doc = "Bit 4 - Enable or disable channel 4" ] # [ inline ] pub fn ch4 ( & mut self ) -> _CH4W { _CH4W { w : self } } # [ doc = "Bit 5 - Enable or disable channel 5" ] # [ inline ] pub fn ch5 ( & mut self ) -> _CH5W { _CH5W { w : self } } # [ doc = "Bit 6 - Enable or disable channel 6" ] # [ inline ] pub fn ch6 ( & mut self ) -> _CH6W { _CH6W { w : self } } # [ doc = "Bit 7 - Enable or disable channel 7" ] # [ inline ] pub fn ch7 ( & mut self ) -> _CH7W { _CH7W { w : self } } # [ doc = "Bit 8 - Enable or disable channel 8" ] # [ inline ] pub fn ch8 ( & mut self ) -> _CH8W { _CH8W { w : self } } # [ doc = "Bit 9 - Enable or disable channel 9" ] # [ inline ] pub fn ch9 ( & mut self ) -> _CH9W { _CH9W { w : self } } # [ doc = "Bit 10 - Enable or disable channel 10" ] # [ inline ] pub fn ch10 ( & mut self ) -> _CH10W { _CH10W { w : self } } # [ doc = "Bit 11 - Enable or disable channel 11" ] # [ inline ] pub fn ch11 ( & mut self ) -> _CH11W { _CH11W { w : self } } # [ doc = "Bit 12 - Enable or disable channel 12" ] # [ inline ] pub fn ch12 ( & mut self ) -> _CH12W { _CH12W { w : self } } # [ doc = "Bit 13 - Enable or disable channel 13" ] # [ inline ] pub fn ch13 ( & mut self ) -> _CH13W { _CH13W { w : self } } # [ doc = "Bit 14 - Enable or disable channel 14" ] # [ inline ] pub fn ch14 ( & mut self ) -> _CH14W { _CH14W { w : self } } # [ doc = "Bit 15 - Enable or disable channel 15" ] # [ inline ] pub fn ch15 ( & mut self ) -> _CH15W { _CH15W { w : self } } # [ doc = "Bit 16 - Enable or disable channel 16" ] # [ inline ] pub fn ch16 ( & mut self ) -> _CH16W { _CH16W { w : self } } # [ doc = "Bit 17 - Enable or disable channel 17" ] # [ inline ] pub fn ch17 ( & mut self ) -> _CH17W { _CH17W { w : self } } # [ doc = "Bit 18 - Enable or disable channel 18" ] # [ inline ] pub fn ch18 ( & mut self ) -> _CH18W { _CH18W { w : self } } # [ doc = "Bit 19 - Enable or disable channel 19" ] # [ inline ] pub fn ch19 ( & mut self ) -> _CH19W { _CH19W { w : self } } # [ doc = "Bit 20 - Enable or disable channel 20" ] # [ inline ] pub fn ch20 ( & mut self ) -> _CH20W { _CH20W { w : self } } # [ doc = "Bit 21 - Enable or disable channel 21" ] # [ inline ] pub fn ch21 ( & mut self ) -> _CH21W { _CH21W { w : self } } # [ doc = "Bit 22 - Enable or disable channel 22" ] # [ inline ] pub fn ch22 ( & mut self ) -> _CH22W { _CH22W { w : self } } # [ doc = "Bit 23 - Enable or disable channel 23" ] # [ inline ] pub fn ch23 ( & mut self ) -> _CH23W { _CH23W { w : self } } # [ doc = "Bit 24 - Enable or disable channel 24" ] # [ inline ] pub fn ch24 ( & mut self ) -> _CH24W { _CH24W { w : self } } # [ doc = "Bit 25 - Enable or disable channel 25" ] # [ inline ] pub fn ch25 ( & mut self ) -> _CH25W { _CH25W { w : self } } # [ doc = "Bit 26 - Enable or disable channel 26" ] # [ inline ] pub fn ch26 ( & mut self ) -> _CH26W { _CH26W { w : self } } # [ doc = "Bit 27 - Enable or disable channel 27" ] # [ inline ] pub fn ch27 ( & mut self ) -> _CH27W { _CH27W { w : self } } # [ doc = "Bit 28 - Enable or disable channel 28" ] # [ inline ] pub fn ch28 ( & mut self ) -> _CH28W { _CH28W { w : self } } # [ doc = "Bit 29 - Enable or disable channel 29" ] # [ inline ] pub fn ch29 ( & mut self ) -> _CH29W { _CH29W { w : self } } # [ doc = "Bit 30 - Enable or disable channel 30" ] # [ inline ] pub fn ch30 ( & mut self ) -> _CH30W { _CH30W { w : self } } # [ doc = "Bit 31 - Enable or disable channel 31" ] # [ inline ] pub fn ch31 ( & mut self ) -> _CH31W { _CH31W { w : self } } } } # [ doc = "Channel enable set register" ] pub struct CHENSET { register : VolatileCell < u32 > } # [ doc = "Channel enable set register" ] pub mod chenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CHENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CH0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0R :: DISABLED => false , CH0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0R { match value { false => CH0R :: DISABLED , true => CH0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0R :: ENABLED } } # [ doc = "Possible values of the field `CH1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1R :: DISABLED => false , CH1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1R { match value { false => CH1R :: DISABLED , true => CH1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1R :: ENABLED } } # [ doc = "Possible values of the field `CH2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2R :: DISABLED => false , CH2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2R { match value { false => CH2R :: DISABLED , true => CH2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2R :: ENABLED } } # [ doc = "Possible values of the field `CH3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3R :: DISABLED => false , CH3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3R { match value { false => CH3R :: DISABLED , true => CH3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3R :: ENABLED } } # [ doc = "Possible values of the field `CH4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4R :: DISABLED => false , CH4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4R { match value { false => CH4R :: DISABLED , true => CH4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4R :: ENABLED } } # [ doc = "Possible values of the field `CH5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5R :: DISABLED => false , CH5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5R { match value { false => CH5R :: DISABLED , true => CH5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5R :: ENABLED } } # [ doc = "Possible values of the field `CH6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6R :: DISABLED => false , CH6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6R { match value { false => CH6R :: DISABLED , true => CH6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6R :: ENABLED } } # [ doc = "Possible values of the field `CH7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7R :: DISABLED => false , CH7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7R { match value { false => CH7R :: DISABLED , true => CH7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7R :: ENABLED } } # [ doc = "Possible values of the field `CH8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH8R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH8R :: DISABLED => false , CH8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH8R { match value { false => CH8R :: DISABLED , true => CH8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH8R :: ENABLED } } # [ doc = "Possible values of the field `CH9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH9R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH9R :: DISABLED => false , CH9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH9R { match value { false => CH9R :: DISABLED , true => CH9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH9R :: ENABLED } } # [ doc = "Possible values of the field `CH10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH10R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH10R :: DISABLED => false , CH10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH10R { match value { false => CH10R :: DISABLED , true => CH10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH10R :: ENABLED } } # [ doc = "Possible values of the field `CH11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH11R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH11R :: DISABLED => false , CH11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH11R { match value { false => CH11R :: DISABLED , true => CH11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH11R :: ENABLED } } # [ doc = "Possible values of the field `CH12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH12R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH12R :: DISABLED => false , CH12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH12R { match value { false => CH12R :: DISABLED , true => CH12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH12R :: ENABLED } } # [ doc = "Possible values of the field `CH13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH13R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH13R :: DISABLED => false , CH13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH13R { match value { false => CH13R :: DISABLED , true => CH13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH13R :: ENABLED } } # [ doc = "Possible values of the field `CH14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH14R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH14R :: DISABLED => false , CH14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH14R { match value { false => CH14R :: DISABLED , true => CH14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH14R :: ENABLED } } # [ doc = "Possible values of the field `CH15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH15R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH15R :: DISABLED => false , CH15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH15R { match value { false => CH15R :: DISABLED , true => CH15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH15R :: ENABLED } } # [ doc = "Possible values of the field `CH16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH16R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH16R :: DISABLED => false , CH16R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH16R { match value { false => CH16R :: DISABLED , true => CH16R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH16R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH16R :: ENABLED } } # [ doc = "Possible values of the field `CH17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH17R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH17R :: DISABLED => false , CH17R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH17R { match value { false => CH17R :: DISABLED , true => CH17R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH17R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH17R :: ENABLED } } # [ doc = "Possible values of the field `CH18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH18R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH18R :: DISABLED => false , CH18R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH18R { match value { false => CH18R :: DISABLED , true => CH18R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH18R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH18R :: ENABLED } } # [ doc = "Possible values of the field `CH19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH19R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH19R :: DISABLED => false , CH19R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH19R { match value { false => CH19R :: DISABLED , true => CH19R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH19R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH19R :: ENABLED } } # [ doc = "Possible values of the field `CH20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH20R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH20R :: DISABLED => false , CH20R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH20R { match value { false => CH20R :: DISABLED , true => CH20R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH20R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH20R :: ENABLED } } # [ doc = "Possible values of the field `CH21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH21R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH21R :: DISABLED => false , CH21R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH21R { match value { false => CH21R :: DISABLED , true => CH21R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH21R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH21R :: ENABLED } } # [ doc = "Possible values of the field `CH22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH22R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH22R :: DISABLED => false , CH22R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH22R { match value { false => CH22R :: DISABLED , true => CH22R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH22R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH22R :: ENABLED } } # [ doc = "Possible values of the field `CH23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH23R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH23R :: DISABLED => false , CH23R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH23R { match value { false => CH23R :: DISABLED , true => CH23R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH23R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH23R :: ENABLED } } # [ doc = "Possible values of the field `CH24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH24R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH24R :: DISABLED => false , CH24R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH24R { match value { false => CH24R :: DISABLED , true => CH24R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH24R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH24R :: ENABLED } } # [ doc = "Possible values of the field `CH25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH25R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH25R :: DISABLED => false , CH25R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH25R { match value { false => CH25R :: DISABLED , true => CH25R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH25R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH25R :: ENABLED } } # [ doc = "Possible values of the field `CH26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH26R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH26R :: DISABLED => false , CH26R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH26R { match value { false => CH26R :: DISABLED , true => CH26R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH26R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH26R :: ENABLED } } # [ doc = "Possible values of the field `CH27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH27R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH27R :: DISABLED => false , CH27R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH27R { match value { false => CH27R :: DISABLED , true => CH27R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH27R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH27R :: ENABLED } } # [ doc = "Possible values of the field `CH28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH28R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH28R :: DISABLED => false , CH28R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH28R { match value { false => CH28R :: DISABLED , true => CH28R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH28R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH28R :: ENABLED } } # [ doc = "Possible values of the field `CH29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH29R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH29R :: DISABLED => false , CH29R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH29R { match value { false => CH29R :: DISABLED , true => CH29R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH29R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH29R :: ENABLED } } # [ doc = "Possible values of the field `CH30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH30R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH30R :: DISABLED => false , CH30R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH30R { match value { false => CH30R :: DISABLED , true => CH30R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH30R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH30R :: ENABLED } } # [ doc = "Possible values of the field `CH31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH31R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH31R :: DISABLED => false , CH31R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH31R { match value { false => CH31R :: DISABLED , true => CH31R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH31R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH31R :: ENABLED } } # [ doc = "Values that can be written to the field `CH0`" ] pub enum CH0W { # [ doc = "Write: Enable channel" ] SET } impl CH0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH0W < 'a > { w : & 'a mut W , } impl < 'a > _CH0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1`" ] pub enum CH1W { # [ doc = "Write: Enable channel" ] SET } impl CH1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH1W < 'a > { w : & 'a mut W , } impl < 'a > _CH1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2`" ] pub enum CH2W { # [ doc = "Write: Enable channel" ] SET } impl CH2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH2W < 'a > { w : & 'a mut W , } impl < 'a > _CH2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3`" ] pub enum CH3W { # [ doc = "Write: Enable channel" ] SET } impl CH3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH3W < 'a > { w : & 'a mut W , } impl < 'a > _CH3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4`" ] pub enum CH4W { # [ doc = "Write: Enable channel" ] SET } impl CH4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH4W < 'a > { w : & 'a mut W , } impl < 'a > _CH4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5`" ] pub enum CH5W { # [ doc = "Write: Enable channel" ] SET } impl CH5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH5W < 'a > { w : & 'a mut W , } impl < 'a > _CH5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6`" ] pub enum CH6W { # [ doc = "Write: Enable channel" ] SET } impl CH6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH6W < 'a > { w : & 'a mut W , } impl < 'a > _CH6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH6W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7`" ] pub enum CH7W { # [ doc = "Write: Enable channel" ] SET } impl CH7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH7W < 'a > { w : & 'a mut W , } impl < 'a > _CH7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH7W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH8`" ] pub enum CH8W { # [ doc = "Write: Enable channel" ] SET } impl CH8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH8W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH8W < 'a > { w : & 'a mut W , } impl < 'a > _CH8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH8W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH9`" ] pub enum CH9W { # [ doc = "Write: Enable channel" ] SET } impl CH9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH9W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH9W < 'a > { w : & 'a mut W , } impl < 'a > _CH9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH9W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH10`" ] pub enum CH10W { # [ doc = "Write: Enable channel" ] SET } impl CH10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH10W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH10W < 'a > { w : & 'a mut W , } impl < 'a > _CH10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH10W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH11`" ] pub enum CH11W { # [ doc = "Write: Enable channel" ] SET } impl CH11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH11W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH11W < 'a > { w : & 'a mut W , } impl < 'a > _CH11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH11W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH12`" ] pub enum CH12W { # [ doc = "Write: Enable channel" ] SET } impl CH12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH12W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH12W < 'a > { w : & 'a mut W , } impl < 'a > _CH12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH12W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH13`" ] pub enum CH13W { # [ doc = "Write: Enable channel" ] SET } impl CH13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH13W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH13W < 'a > { w : & 'a mut W , } impl < 'a > _CH13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH13W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH14`" ] pub enum CH14W { # [ doc = "Write: Enable channel" ] SET } impl CH14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH14W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH14W < 'a > { w : & 'a mut W , } impl < 'a > _CH14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH14W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH15`" ] pub enum CH15W { # [ doc = "Write: Enable channel" ] SET } impl CH15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH15W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH15W < 'a > { w : & 'a mut W , } impl < 'a > _CH15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH15W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH16`" ] pub enum CH16W { # [ doc = "Write: Enable channel" ] SET } impl CH16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH16W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH16W < 'a > { w : & 'a mut W , } impl < 'a > _CH16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH16W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH17`" ] pub enum CH17W { # [ doc = "Write: Enable channel" ] SET } impl CH17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH17W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH17W < 'a > { w : & 'a mut W , } impl < 'a > _CH17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH17W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH18`" ] pub enum CH18W { # [ doc = "Write: Enable channel" ] SET } impl CH18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH18W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH18W < 'a > { w : & 'a mut W , } impl < 'a > _CH18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH18W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH19`" ] pub enum CH19W { # [ doc = "Write: Enable channel" ] SET } impl CH19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH19W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH19W < 'a > { w : & 'a mut W , } impl < 'a > _CH19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH19W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH20`" ] pub enum CH20W { # [ doc = "Write: Enable channel" ] SET } impl CH20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH20W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH20W < 'a > { w : & 'a mut W , } impl < 'a > _CH20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH20W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH21`" ] pub enum CH21W { # [ doc = "Write: Enable channel" ] SET } impl CH21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH21W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH21W < 'a > { w : & 'a mut W , } impl < 'a > _CH21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH21W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH22`" ] pub enum CH22W { # [ doc = "Write: Enable channel" ] SET } impl CH22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH22W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH22W < 'a > { w : & 'a mut W , } impl < 'a > _CH22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH22W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH23`" ] pub enum CH23W { # [ doc = "Write: Enable channel" ] SET } impl CH23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH23W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH23W < 'a > { w : & 'a mut W , } impl < 'a > _CH23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH23W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH24`" ] pub enum CH24W { # [ doc = "Write: Enable channel" ] SET } impl CH24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH24W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH24W < 'a > { w : & 'a mut W , } impl < 'a > _CH24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH24W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH25`" ] pub enum CH25W { # [ doc = "Write: Enable channel" ] SET } impl CH25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH25W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH25W < 'a > { w : & 'a mut W , } impl < 'a > _CH25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH25W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH26`" ] pub enum CH26W { # [ doc = "Write: Enable channel" ] SET } impl CH26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH26W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH26W < 'a > { w : & 'a mut W , } impl < 'a > _CH26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH26W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH27`" ] pub enum CH27W { # [ doc = "Write: Enable channel" ] SET } impl CH27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH27W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH27W < 'a > { w : & 'a mut W , } impl < 'a > _CH27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH27W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH28`" ] pub enum CH28W { # [ doc = "Write: Enable channel" ] SET } impl CH28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH28W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH28W < 'a > { w : & 'a mut W , } impl < 'a > _CH28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH28W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH29`" ] pub enum CH29W { # [ doc = "Write: Enable channel" ] SET } impl CH29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH29W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH29W < 'a > { w : & 'a mut W , } impl < 'a > _CH29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH29W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH30`" ] pub enum CH30W { # [ doc = "Write: Enable channel" ] SET } impl CH30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH30W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH30W < 'a > { w : & 'a mut W , } impl < 'a > _CH30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH30W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH31`" ] pub enum CH31W { # [ doc = "Write: Enable channel" ] SET } impl CH31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH31W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _CH31W < 'a > { w : & 'a mut W , } impl < 'a > _CH31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: Enable channel" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( CH31W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch0 ( & self ) -> CH0R { CH0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch1 ( & self ) -> CH1R { CH1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch2 ( & self ) -> CH2R { CH2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch3 ( & self ) -> CH3R { CH3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch4 ( & self ) -> CH4R { CH4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch5 ( & self ) -> CH5R { CH5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch6 ( & self ) -> CH6R { CH6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch7 ( & self ) -> CH7R { CH7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch8 ( & self ) -> CH8R { CH8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch9 ( & self ) -> CH9R { CH9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch10 ( & self ) -> CH10R { CH10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch11 ( & self ) -> CH11R { CH11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch12 ( & self ) -> CH12R { CH12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch13 ( & self ) -> CH13R { CH13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch14 ( & self ) -> CH14R { CH14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch15 ( & self ) -> CH15R { CH15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch16 ( & self ) -> CH16R { CH16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch17 ( & self ) -> CH17R { CH17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch18 ( & self ) -> CH18R { CH18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch19 ( & self ) -> CH19R { CH19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch20 ( & self ) -> CH20R { CH20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch21 ( & self ) -> CH21R { CH21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch22 ( & self ) -> CH22R { CH22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch23 ( & self ) -> CH23R { CH23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch24 ( & self ) -> CH24R { CH24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch25 ( & self ) -> CH25R { CH25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch26 ( & self ) -> CH26R { CH26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch27 ( & self ) -> CH27R { CH27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch28 ( & self ) -> CH28R { CH28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch29 ( & self ) -> CH29R { CH29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch30 ( & self ) -> CH30R { CH30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch31 ( & self ) -> CH31R { CH31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch0 ( & mut self ) -> _CH0W { _CH0W { w : self } } # [ doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch1 ( & mut self ) -> _CH1W { _CH1W { w : self } } # [ doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch2 ( & mut self ) -> _CH2W { _CH2W { w : self } } # [ doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch3 ( & mut self ) -> _CH3W { _CH3W { w : self } } # [ doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch4 ( & mut self ) -> _CH4W { _CH4W { w : self } } # [ doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch5 ( & mut self ) -> _CH5W { _CH5W { w : self } } # [ doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch6 ( & mut self ) -> _CH6W { _CH6W { w : self } } # [ doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch7 ( & mut self ) -> _CH7W { _CH7W { w : self } } # [ doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch8 ( & mut self ) -> _CH8W { _CH8W { w : self } } # [ doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch9 ( & mut self ) -> _CH9W { _CH9W { w : self } } # [ doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch10 ( & mut self ) -> _CH10W { _CH10W { w : self } } # [ doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch11 ( & mut self ) -> _CH11W { _CH11W { w : self } } # [ doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch12 ( & mut self ) -> _CH12W { _CH12W { w : self } } # [ doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch13 ( & mut self ) -> _CH13W { _CH13W { w : self } } # [ doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch14 ( & mut self ) -> _CH14W { _CH14W { w : self } } # [ doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch15 ( & mut self ) -> _CH15W { _CH15W { w : self } } # [ doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch16 ( & mut self ) -> _CH16W { _CH16W { w : self } } # [ doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch17 ( & mut self ) -> _CH17W { _CH17W { w : self } } # [ doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch18 ( & mut self ) -> _CH18W { _CH18W { w : self } } # [ doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch19 ( & mut self ) -> _CH19W { _CH19W { w : self } } # [ doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch20 ( & mut self ) -> _CH20W { _CH20W { w : self } } # [ doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch21 ( & mut self ) -> _CH21W { _CH21W { w : self } } # [ doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch22 ( & mut self ) -> _CH22W { _CH22W { w : self } } # [ doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch23 ( & mut self ) -> _CH23W { _CH23W { w : self } } # [ doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch24 ( & mut self ) -> _CH24W { _CH24W { w : self } } # [ doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch25 ( & mut self ) -> _CH25W { _CH25W { w : self } } # [ doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch26 ( & mut self ) -> _CH26W { _CH26W { w : self } } # [ doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch27 ( & mut self ) -> _CH27W { _CH27W { w : self } } # [ doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch28 ( & mut self ) -> _CH28W { _CH28W { w : self } } # [ doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch29 ( & mut self ) -> _CH29W { _CH29W { w : self } } # [ doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch30 ( & mut self ) -> _CH30W { _CH30W { w : self } } # [ doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect" ] # [ inline ] pub fn ch31 ( & mut self ) -> _CH31W { _CH31W { w : self } } } } # [ doc = "Channel enable clear register" ] pub struct CHENCLR { register : VolatileCell < u32 > } # [ doc = "Channel enable clear register" ] pub mod chenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CHENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CH0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0R :: DISABLED => false , CH0R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0R { match value { false => CH0R :: DISABLED , true => CH0R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH0R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH0R :: ENABLED } } # [ doc = "Possible values of the field `CH1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1R :: DISABLED => false , CH1R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1R { match value { false => CH1R :: DISABLED , true => CH1R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH1R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH1R :: ENABLED } } # [ doc = "Possible values of the field `CH2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2R :: DISABLED => false , CH2R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2R { match value { false => CH2R :: DISABLED , true => CH2R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH2R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH2R :: ENABLED } } # [ doc = "Possible values of the field `CH3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3R :: DISABLED => false , CH3R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3R { match value { false => CH3R :: DISABLED , true => CH3R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH3R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH3R :: ENABLED } } # [ doc = "Possible values of the field `CH4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4R :: DISABLED => false , CH4R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4R { match value { false => CH4R :: DISABLED , true => CH4R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH4R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH4R :: ENABLED } } # [ doc = "Possible values of the field `CH5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5R :: DISABLED => false , CH5R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5R { match value { false => CH5R :: DISABLED , true => CH5R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH5R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH5R :: ENABLED } } # [ doc = "Possible values of the field `CH6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6R :: DISABLED => false , CH6R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6R { match value { false => CH6R :: DISABLED , true => CH6R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH6R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH6R :: ENABLED } } # [ doc = "Possible values of the field `CH7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7R :: DISABLED => false , CH7R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7R { match value { false => CH7R :: DISABLED , true => CH7R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH7R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH7R :: ENABLED } } # [ doc = "Possible values of the field `CH8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH8R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH8R :: DISABLED => false , CH8R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH8R { match value { false => CH8R :: DISABLED , true => CH8R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH8R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH8R :: ENABLED } } # [ doc = "Possible values of the field `CH9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH9R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH9R :: DISABLED => false , CH9R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH9R { match value { false => CH9R :: DISABLED , true => CH9R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH9R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH9R :: ENABLED } } # [ doc = "Possible values of the field `CH10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH10R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH10R :: DISABLED => false , CH10R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH10R { match value { false => CH10R :: DISABLED , true => CH10R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH10R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH10R :: ENABLED } } # [ doc = "Possible values of the field `CH11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH11R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH11R :: DISABLED => false , CH11R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH11R { match value { false => CH11R :: DISABLED , true => CH11R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH11R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH11R :: ENABLED } } # [ doc = "Possible values of the field `CH12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH12R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH12R :: DISABLED => false , CH12R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH12R { match value { false => CH12R :: DISABLED , true => CH12R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH12R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH12R :: ENABLED } } # [ doc = "Possible values of the field `CH13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH13R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH13R :: DISABLED => false , CH13R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH13R { match value { false => CH13R :: DISABLED , true => CH13R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH13R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH13R :: ENABLED } } # [ doc = "Possible values of the field `CH14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH14R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH14R :: DISABLED => false , CH14R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH14R { match value { false => CH14R :: DISABLED , true => CH14R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH14R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH14R :: ENABLED } } # [ doc = "Possible values of the field `CH15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH15R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH15R :: DISABLED => false , CH15R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH15R { match value { false => CH15R :: DISABLED , true => CH15R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH15R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH15R :: ENABLED } } # [ doc = "Possible values of the field `CH16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH16R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH16R :: DISABLED => false , CH16R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH16R { match value { false => CH16R :: DISABLED , true => CH16R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH16R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH16R :: ENABLED } } # [ doc = "Possible values of the field `CH17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH17R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH17R :: DISABLED => false , CH17R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH17R { match value { false => CH17R :: DISABLED , true => CH17R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH17R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH17R :: ENABLED } } # [ doc = "Possible values of the field `CH18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH18R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH18R :: DISABLED => false , CH18R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH18R { match value { false => CH18R :: DISABLED , true => CH18R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH18R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH18R :: ENABLED } } # [ doc = "Possible values of the field `CH19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH19R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH19R :: DISABLED => false , CH19R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH19R { match value { false => CH19R :: DISABLED , true => CH19R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH19R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH19R :: ENABLED } } # [ doc = "Possible values of the field `CH20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH20R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH20R :: DISABLED => false , CH20R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH20R { match value { false => CH20R :: DISABLED , true => CH20R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH20R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH20R :: ENABLED } } # [ doc = "Possible values of the field `CH21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH21R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH21R :: DISABLED => false , CH21R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH21R { match value { false => CH21R :: DISABLED , true => CH21R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH21R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH21R :: ENABLED } } # [ doc = "Possible values of the field `CH22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH22R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH22R :: DISABLED => false , CH22R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH22R { match value { false => CH22R :: DISABLED , true => CH22R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH22R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH22R :: ENABLED } } # [ doc = "Possible values of the field `CH23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH23R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH23R :: DISABLED => false , CH23R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH23R { match value { false => CH23R :: DISABLED , true => CH23R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH23R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH23R :: ENABLED } } # [ doc = "Possible values of the field `CH24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH24R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH24R :: DISABLED => false , CH24R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH24R { match value { false => CH24R :: DISABLED , true => CH24R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH24R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH24R :: ENABLED } } # [ doc = "Possible values of the field `CH25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH25R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH25R :: DISABLED => false , CH25R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH25R { match value { false => CH25R :: DISABLED , true => CH25R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH25R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH25R :: ENABLED } } # [ doc = "Possible values of the field `CH26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH26R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH26R :: DISABLED => false , CH26R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH26R { match value { false => CH26R :: DISABLED , true => CH26R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH26R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH26R :: ENABLED } } # [ doc = "Possible values of the field `CH27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH27R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH27R :: DISABLED => false , CH27R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH27R { match value { false => CH27R :: DISABLED , true => CH27R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH27R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH27R :: ENABLED } } # [ doc = "Possible values of the field `CH28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH28R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH28R :: DISABLED => false , CH28R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH28R { match value { false => CH28R :: DISABLED , true => CH28R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH28R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH28R :: ENABLED } } # [ doc = "Possible values of the field `CH29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH29R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH29R :: DISABLED => false , CH29R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH29R { match value { false => CH29R :: DISABLED , true => CH29R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH29R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH29R :: ENABLED } } # [ doc = "Possible values of the field `CH30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH30R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH30R :: DISABLED => false , CH30R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH30R { match value { false => CH30R :: DISABLED , true => CH30R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH30R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH30R :: ENABLED } } # [ doc = "Possible values of the field `CH31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH31R { # [ doc = "Read: channel disabled" ] DISABLED , # [ doc = "Read: channel enabled" ] ENABLED } impl CH31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH31R :: DISABLED => false , CH31R :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH31R { match value { false => CH31R :: DISABLED , true => CH31R :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == CH31R :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == CH31R :: ENABLED } } # [ doc = "Values that can be written to the field `CH0`" ] pub enum CH0W { # [ doc = "Write: disable channel" ] CLEAR } impl CH0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH0W < 'a > { w : & 'a mut W , } impl < 'a > _CH0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1`" ] pub enum CH1W { # [ doc = "Write: disable channel" ] CLEAR } impl CH1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH1W < 'a > { w : & 'a mut W , } impl < 'a > _CH1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2`" ] pub enum CH2W { # [ doc = "Write: disable channel" ] CLEAR } impl CH2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH2W < 'a > { w : & 'a mut W , } impl < 'a > _CH2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3`" ] pub enum CH3W { # [ doc = "Write: disable channel" ] CLEAR } impl CH3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH3W < 'a > { w : & 'a mut W , } impl < 'a > _CH3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4`" ] pub enum CH4W { # [ doc = "Write: disable channel" ] CLEAR } impl CH4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH4W < 'a > { w : & 'a mut W , } impl < 'a > _CH4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5`" ] pub enum CH5W { # [ doc = "Write: disable channel" ] CLEAR } impl CH5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH5W < 'a > { w : & 'a mut W , } impl < 'a > _CH5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6`" ] pub enum CH6W { # [ doc = "Write: disable channel" ] CLEAR } impl CH6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH6W < 'a > { w : & 'a mut W , } impl < 'a > _CH6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH6W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7`" ] pub enum CH7W { # [ doc = "Write: disable channel" ] CLEAR } impl CH7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH7W < 'a > { w : & 'a mut W , } impl < 'a > _CH7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH7W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH8`" ] pub enum CH8W { # [ doc = "Write: disable channel" ] CLEAR } impl CH8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH8W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH8W < 'a > { w : & 'a mut W , } impl < 'a > _CH8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH8W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH9`" ] pub enum CH9W { # [ doc = "Write: disable channel" ] CLEAR } impl CH9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH9W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH9W < 'a > { w : & 'a mut W , } impl < 'a > _CH9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH9W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH10`" ] pub enum CH10W { # [ doc = "Write: disable channel" ] CLEAR } impl CH10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH10W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH10W < 'a > { w : & 'a mut W , } impl < 'a > _CH10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH10W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH11`" ] pub enum CH11W { # [ doc = "Write: disable channel" ] CLEAR } impl CH11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH11W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH11W < 'a > { w : & 'a mut W , } impl < 'a > _CH11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH11W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH12`" ] pub enum CH12W { # [ doc = "Write: disable channel" ] CLEAR } impl CH12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH12W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH12W < 'a > { w : & 'a mut W , } impl < 'a > _CH12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH12W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH13`" ] pub enum CH13W { # [ doc = "Write: disable channel" ] CLEAR } impl CH13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH13W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH13W < 'a > { w : & 'a mut W , } impl < 'a > _CH13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH13W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH14`" ] pub enum CH14W { # [ doc = "Write: disable channel" ] CLEAR } impl CH14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH14W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH14W < 'a > { w : & 'a mut W , } impl < 'a > _CH14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH14W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH15`" ] pub enum CH15W { # [ doc = "Write: disable channel" ] CLEAR } impl CH15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH15W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH15W < 'a > { w : & 'a mut W , } impl < 'a > _CH15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH15W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH16`" ] pub enum CH16W { # [ doc = "Write: disable channel" ] CLEAR } impl CH16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH16W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH16W < 'a > { w : & 'a mut W , } impl < 'a > _CH16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH16W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH17`" ] pub enum CH17W { # [ doc = "Write: disable channel" ] CLEAR } impl CH17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH17W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH17W < 'a > { w : & 'a mut W , } impl < 'a > _CH17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH17W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH18`" ] pub enum CH18W { # [ doc = "Write: disable channel" ] CLEAR } impl CH18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH18W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH18W < 'a > { w : & 'a mut W , } impl < 'a > _CH18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH18W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH19`" ] pub enum CH19W { # [ doc = "Write: disable channel" ] CLEAR } impl CH19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH19W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH19W < 'a > { w : & 'a mut W , } impl < 'a > _CH19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH19W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH20`" ] pub enum CH20W { # [ doc = "Write: disable channel" ] CLEAR } impl CH20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH20W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH20W < 'a > { w : & 'a mut W , } impl < 'a > _CH20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH20W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH21`" ] pub enum CH21W { # [ doc = "Write: disable channel" ] CLEAR } impl CH21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH21W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH21W < 'a > { w : & 'a mut W , } impl < 'a > _CH21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH21W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH22`" ] pub enum CH22W { # [ doc = "Write: disable channel" ] CLEAR } impl CH22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH22W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH22W < 'a > { w : & 'a mut W , } impl < 'a > _CH22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH22W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH23`" ] pub enum CH23W { # [ doc = "Write: disable channel" ] CLEAR } impl CH23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH23W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH23W < 'a > { w : & 'a mut W , } impl < 'a > _CH23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH23W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH24`" ] pub enum CH24W { # [ doc = "Write: disable channel" ] CLEAR } impl CH24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH24W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH24W < 'a > { w : & 'a mut W , } impl < 'a > _CH24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH24W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH25`" ] pub enum CH25W { # [ doc = "Write: disable channel" ] CLEAR } impl CH25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH25W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH25W < 'a > { w : & 'a mut W , } impl < 'a > _CH25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH25W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH26`" ] pub enum CH26W { # [ doc = "Write: disable channel" ] CLEAR } impl CH26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH26W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH26W < 'a > { w : & 'a mut W , } impl < 'a > _CH26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH26W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH27`" ] pub enum CH27W { # [ doc = "Write: disable channel" ] CLEAR } impl CH27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH27W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH27W < 'a > { w : & 'a mut W , } impl < 'a > _CH27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH27W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH28`" ] pub enum CH28W { # [ doc = "Write: disable channel" ] CLEAR } impl CH28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH28W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH28W < 'a > { w : & 'a mut W , } impl < 'a > _CH28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH28W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH29`" ] pub enum CH29W { # [ doc = "Write: disable channel" ] CLEAR } impl CH29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH29W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH29W < 'a > { w : & 'a mut W , } impl < 'a > _CH29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH29W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH30`" ] pub enum CH30W { # [ doc = "Write: disable channel" ] CLEAR } impl CH30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH30W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH30W < 'a > { w : & 'a mut W , } impl < 'a > _CH30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH30W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH31`" ] pub enum CH31W { # [ doc = "Write: disable channel" ] CLEAR } impl CH31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH31W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _CH31W < 'a > { w : & 'a mut W , } impl < 'a > _CH31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: disable channel" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( CH31W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch0 ( & self ) -> CH0R { CH0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch1 ( & self ) -> CH1R { CH1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch2 ( & self ) -> CH2R { CH2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch3 ( & self ) -> CH3R { CH3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch4 ( & self ) -> CH4R { CH4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch5 ( & self ) -> CH5R { CH5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch6 ( & self ) -> CH6R { CH6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch7 ( & self ) -> CH7R { CH7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch8 ( & self ) -> CH8R { CH8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch9 ( & self ) -> CH9R { CH9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch10 ( & self ) -> CH10R { CH10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch11 ( & self ) -> CH11R { CH11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch12 ( & self ) -> CH12R { CH12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch13 ( & self ) -> CH13R { CH13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch14 ( & self ) -> CH14R { CH14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch15 ( & self ) -> CH15R { CH15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch16 ( & self ) -> CH16R { CH16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch17 ( & self ) -> CH17R { CH17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch18 ( & self ) -> CH18R { CH18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch19 ( & self ) -> CH19R { CH19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch20 ( & self ) -> CH20R { CH20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch21 ( & self ) -> CH21R { CH21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch22 ( & self ) -> CH22R { CH22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch23 ( & self ) -> CH23R { CH23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch24 ( & self ) -> CH24R { CH24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch25 ( & self ) -> CH25R { CH25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch26 ( & self ) -> CH26R { CH26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch27 ( & self ) -> CH27R { CH27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch28 ( & self ) -> CH28R { CH28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch29 ( & self ) -> CH29R { CH29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch30 ( & self ) -> CH30R { CH30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch31 ( & self ) -> CH31R { CH31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch0 ( & mut self ) -> _CH0W { _CH0W { w : self } } # [ doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch1 ( & mut self ) -> _CH1W { _CH1W { w : self } } # [ doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch2 ( & mut self ) -> _CH2W { _CH2W { w : self } } # [ doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch3 ( & mut self ) -> _CH3W { _CH3W { w : self } } # [ doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch4 ( & mut self ) -> _CH4W { _CH4W { w : self } } # [ doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch5 ( & mut self ) -> _CH5W { _CH5W { w : self } } # [ doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch6 ( & mut self ) -> _CH6W { _CH6W { w : self } } # [ doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch7 ( & mut self ) -> _CH7W { _CH7W { w : self } } # [ doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch8 ( & mut self ) -> _CH8W { _CH8W { w : self } } # [ doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch9 ( & mut self ) -> _CH9W { _CH9W { w : self } } # [ doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch10 ( & mut self ) -> _CH10W { _CH10W { w : self } } # [ doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch11 ( & mut self ) -> _CH11W { _CH11W { w : self } } # [ doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch12 ( & mut self ) -> _CH12W { _CH12W { w : self } } # [ doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch13 ( & mut self ) -> _CH13W { _CH13W { w : self } } # [ doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch14 ( & mut self ) -> _CH14W { _CH14W { w : self } } # [ doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch15 ( & mut self ) -> _CH15W { _CH15W { w : self } } # [ doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch16 ( & mut self ) -> _CH16W { _CH16W { w : self } } # [ doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch17 ( & mut self ) -> _CH17W { _CH17W { w : self } } # [ doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch18 ( & mut self ) -> _CH18W { _CH18W { w : self } } # [ doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch19 ( & mut self ) -> _CH19W { _CH19W { w : self } } # [ doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch20 ( & mut self ) -> _CH20W { _CH20W { w : self } } # [ doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch21 ( & mut self ) -> _CH21W { _CH21W { w : self } } # [ doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch22 ( & mut self ) -> _CH22W { _CH22W { w : self } } # [ doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch23 ( & mut self ) -> _CH23W { _CH23W { w : self } } # [ doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch24 ( & mut self ) -> _CH24W { _CH24W { w : self } } # [ doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch25 ( & mut self ) -> _CH25W { _CH25W { w : self } } # [ doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch26 ( & mut self ) -> _CH26W { _CH26W { w : self } } # [ doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch27 ( & mut self ) -> _CH27W { _CH27W { w : self } } # [ doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch28 ( & mut self ) -> _CH28W { _CH28W { w : self } } # [ doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch29 ( & mut self ) -> _CH29W { _CH29W { w : self } } # [ doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch30 ( & mut self ) -> _CH30W { _CH30W { w : self } } # [ doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect" ] # [ inline ] pub fn ch31 ( & mut self ) -> _CH31W { _CH31W { w : self } } } } # [ doc = "Description collection[0]: Channel group 0" ] pub struct CHG { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Channel group 0" ] pub mod chg { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: CHG { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `CH0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH0R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH0R :: EXCLUDED => false , CH0R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH0R { match value { false => CH0R :: EXCLUDED , true => CH0R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH0R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH0R :: INCLUDED } } # [ doc = "Possible values of the field `CH1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH1R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH1R :: EXCLUDED => false , CH1R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH1R { match value { false => CH1R :: EXCLUDED , true => CH1R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH1R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH1R :: INCLUDED } } # [ doc = "Possible values of the field `CH2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH2R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH2R :: EXCLUDED => false , CH2R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH2R { match value { false => CH2R :: EXCLUDED , true => CH2R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH2R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH2R :: INCLUDED } } # [ doc = "Possible values of the field `CH3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH3R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH3R :: EXCLUDED => false , CH3R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH3R { match value { false => CH3R :: EXCLUDED , true => CH3R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH3R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH3R :: INCLUDED } } # [ doc = "Possible values of the field `CH4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH4R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH4R :: EXCLUDED => false , CH4R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH4R { match value { false => CH4R :: EXCLUDED , true => CH4R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH4R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH4R :: INCLUDED } } # [ doc = "Possible values of the field `CH5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH5R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH5R :: EXCLUDED => false , CH5R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH5R { match value { false => CH5R :: EXCLUDED , true => CH5R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH5R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH5R :: INCLUDED } } # [ doc = "Possible values of the field `CH6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH6R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH6R :: EXCLUDED => false , CH6R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH6R { match value { false => CH6R :: EXCLUDED , true => CH6R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH6R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH6R :: INCLUDED } } # [ doc = "Possible values of the field `CH7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH7R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH7R :: EXCLUDED => false , CH7R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH7R { match value { false => CH7R :: EXCLUDED , true => CH7R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH7R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH7R :: INCLUDED } } # [ doc = "Possible values of the field `CH8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH8R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH8R :: EXCLUDED => false , CH8R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH8R { match value { false => CH8R :: EXCLUDED , true => CH8R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH8R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH8R :: INCLUDED } } # [ doc = "Possible values of the field `CH9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH9R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH9R :: EXCLUDED => false , CH9R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH9R { match value { false => CH9R :: EXCLUDED , true => CH9R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH9R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH9R :: INCLUDED } } # [ doc = "Possible values of the field `CH10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH10R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH10R :: EXCLUDED => false , CH10R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH10R { match value { false => CH10R :: EXCLUDED , true => CH10R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH10R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH10R :: INCLUDED } } # [ doc = "Possible values of the field `CH11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH11R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH11R :: EXCLUDED => false , CH11R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH11R { match value { false => CH11R :: EXCLUDED , true => CH11R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH11R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH11R :: INCLUDED } } # [ doc = "Possible values of the field `CH12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH12R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH12R :: EXCLUDED => false , CH12R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH12R { match value { false => CH12R :: EXCLUDED , true => CH12R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH12R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH12R :: INCLUDED } } # [ doc = "Possible values of the field `CH13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH13R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH13R :: EXCLUDED => false , CH13R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH13R { match value { false => CH13R :: EXCLUDED , true => CH13R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH13R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH13R :: INCLUDED } } # [ doc = "Possible values of the field `CH14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH14R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH14R :: EXCLUDED => false , CH14R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH14R { match value { false => CH14R :: EXCLUDED , true => CH14R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH14R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH14R :: INCLUDED } } # [ doc = "Possible values of the field `CH15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH15R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH15R :: EXCLUDED => false , CH15R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH15R { match value { false => CH15R :: EXCLUDED , true => CH15R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH15R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH15R :: INCLUDED } } # [ doc = "Possible values of the field `CH16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH16R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH16R :: EXCLUDED => false , CH16R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH16R { match value { false => CH16R :: EXCLUDED , true => CH16R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH16R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH16R :: INCLUDED } } # [ doc = "Possible values of the field `CH17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH17R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH17R :: EXCLUDED => false , CH17R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH17R { match value { false => CH17R :: EXCLUDED , true => CH17R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH17R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH17R :: INCLUDED } } # [ doc = "Possible values of the field `CH18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH18R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH18R :: EXCLUDED => false , CH18R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH18R { match value { false => CH18R :: EXCLUDED , true => CH18R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH18R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH18R :: INCLUDED } } # [ doc = "Possible values of the field `CH19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH19R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH19R :: EXCLUDED => false , CH19R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH19R { match value { false => CH19R :: EXCLUDED , true => CH19R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH19R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH19R :: INCLUDED } } # [ doc = "Possible values of the field `CH20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH20R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH20R :: EXCLUDED => false , CH20R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH20R { match value { false => CH20R :: EXCLUDED , true => CH20R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH20R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH20R :: INCLUDED } } # [ doc = "Possible values of the field `CH21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH21R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH21R :: EXCLUDED => false , CH21R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH21R { match value { false => CH21R :: EXCLUDED , true => CH21R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH21R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH21R :: INCLUDED } } # [ doc = "Possible values of the field `CH22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH22R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH22R :: EXCLUDED => false , CH22R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH22R { match value { false => CH22R :: EXCLUDED , true => CH22R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH22R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH22R :: INCLUDED } } # [ doc = "Possible values of the field `CH23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH23R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH23R :: EXCLUDED => false , CH23R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH23R { match value { false => CH23R :: EXCLUDED , true => CH23R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH23R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH23R :: INCLUDED } } # [ doc = "Possible values of the field `CH24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH24R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH24R :: EXCLUDED => false , CH24R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH24R { match value { false => CH24R :: EXCLUDED , true => CH24R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH24R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH24R :: INCLUDED } } # [ doc = "Possible values of the field `CH25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH25R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH25R :: EXCLUDED => false , CH25R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH25R { match value { false => CH25R :: EXCLUDED , true => CH25R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH25R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH25R :: INCLUDED } } # [ doc = "Possible values of the field `CH26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH26R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH26R :: EXCLUDED => false , CH26R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH26R { match value { false => CH26R :: EXCLUDED , true => CH26R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH26R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH26R :: INCLUDED } } # [ doc = "Possible values of the field `CH27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH27R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH27R :: EXCLUDED => false , CH27R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH27R { match value { false => CH27R :: EXCLUDED , true => CH27R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH27R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH27R :: INCLUDED } } # [ doc = "Possible values of the field `CH28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH28R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH28R :: EXCLUDED => false , CH28R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH28R { match value { false => CH28R :: EXCLUDED , true => CH28R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH28R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH28R :: INCLUDED } } # [ doc = "Possible values of the field `CH29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH29R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH29R :: EXCLUDED => false , CH29R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH29R { match value { false => CH29R :: EXCLUDED , true => CH29R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH29R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH29R :: INCLUDED } } # [ doc = "Possible values of the field `CH30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH30R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH30R :: EXCLUDED => false , CH30R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH30R { match value { false => CH30R :: EXCLUDED , true => CH30R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH30R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH30R :: INCLUDED } } # [ doc = "Possible values of the field `CH31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum CH31R { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { CH31R :: EXCLUDED => false , CH31R :: INCLUDED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> CH31R { match value { false => CH31R :: EXCLUDED , true => CH31R :: INCLUDED , } } # [ doc = "Checks if the value of the field is `EXCLUDED`" ] # [ inline ] pub fn is_excluded ( & self ) -> bool { * self == CH31R :: EXCLUDED } # [ doc = "Checks if the value of the field is `INCLUDED`" ] # [ inline ] pub fn is_included ( & self ) -> bool { * self == CH31R :: INCLUDED } } # [ doc = "Values that can be written to the field `CH0`" ] pub enum CH0W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH0W :: EXCLUDED => false , CH0W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH0W < 'a > { w : & 'a mut W , } impl < 'a > _CH0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH0W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH0W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH1`" ] pub enum CH1W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH1W :: EXCLUDED => false , CH1W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH1W < 'a > { w : & 'a mut W , } impl < 'a > _CH1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH1W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH1W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH2`" ] pub enum CH2W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH2W :: EXCLUDED => false , CH2W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH2W < 'a > { w : & 'a mut W , } impl < 'a > _CH2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH2W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH2W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH3`" ] pub enum CH3W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH3W :: EXCLUDED => false , CH3W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH3W < 'a > { w : & 'a mut W , } impl < 'a > _CH3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH3W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH3W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH4`" ] pub enum CH4W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH4W :: EXCLUDED => false , CH4W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH4W < 'a > { w : & 'a mut W , } impl < 'a > _CH4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH4W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH4W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH5`" ] pub enum CH5W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH5W :: EXCLUDED => false , CH5W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH5W < 'a > { w : & 'a mut W , } impl < 'a > _CH5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH5W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH5W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH6`" ] pub enum CH6W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH6W :: EXCLUDED => false , CH6W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH6W < 'a > { w : & 'a mut W , } impl < 'a > _CH6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH6W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH6W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH7`" ] pub enum CH7W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH7W :: EXCLUDED => false , CH7W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH7W < 'a > { w : & 'a mut W , } impl < 'a > _CH7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH7W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH7W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH8`" ] pub enum CH8W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH8W :: EXCLUDED => false , CH8W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH8W < 'a > { w : & 'a mut W , } impl < 'a > _CH8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH8W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH8W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH9`" ] pub enum CH9W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH9W :: EXCLUDED => false , CH9W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH9W < 'a > { w : & 'a mut W , } impl < 'a > _CH9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH9W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH9W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH10`" ] pub enum CH10W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH10W :: EXCLUDED => false , CH10W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH10W < 'a > { w : & 'a mut W , } impl < 'a > _CH10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH10W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH10W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH11`" ] pub enum CH11W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH11W :: EXCLUDED => false , CH11W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH11W < 'a > { w : & 'a mut W , } impl < 'a > _CH11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH11W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH11W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH12`" ] pub enum CH12W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH12W :: EXCLUDED => false , CH12W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH12W < 'a > { w : & 'a mut W , } impl < 'a > _CH12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH12W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH12W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH13`" ] pub enum CH13W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH13W :: EXCLUDED => false , CH13W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH13W < 'a > { w : & 'a mut W , } impl < 'a > _CH13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH13W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH13W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH14`" ] pub enum CH14W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH14W :: EXCLUDED => false , CH14W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH14W < 'a > { w : & 'a mut W , } impl < 'a > _CH14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH14W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH14W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH15`" ] pub enum CH15W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH15W :: EXCLUDED => false , CH15W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH15W < 'a > { w : & 'a mut W , } impl < 'a > _CH15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH15W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH15W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH16`" ] pub enum CH16W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH16W :: EXCLUDED => false , CH16W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH16W < 'a > { w : & 'a mut W , } impl < 'a > _CH16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH16W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH16W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH17`" ] pub enum CH17W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH17W :: EXCLUDED => false , CH17W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH17W < 'a > { w : & 'a mut W , } impl < 'a > _CH17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH17W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH17W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH18`" ] pub enum CH18W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH18W :: EXCLUDED => false , CH18W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH18W < 'a > { w : & 'a mut W , } impl < 'a > _CH18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH18W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH18W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH19`" ] pub enum CH19W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH19W :: EXCLUDED => false , CH19W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH19W < 'a > { w : & 'a mut W , } impl < 'a > _CH19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH19W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH19W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH20`" ] pub enum CH20W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH20W :: EXCLUDED => false , CH20W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH20W < 'a > { w : & 'a mut W , } impl < 'a > _CH20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH20W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH20W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH21`" ] pub enum CH21W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH21W :: EXCLUDED => false , CH21W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH21W < 'a > { w : & 'a mut W , } impl < 'a > _CH21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH21W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH21W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH22`" ] pub enum CH22W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH22W :: EXCLUDED => false , CH22W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH22W < 'a > { w : & 'a mut W , } impl < 'a > _CH22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH22W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH22W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH23`" ] pub enum CH23W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH23W :: EXCLUDED => false , CH23W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH23W < 'a > { w : & 'a mut W , } impl < 'a > _CH23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH23W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH23W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH24`" ] pub enum CH24W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH24W :: EXCLUDED => false , CH24W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH24W < 'a > { w : & 'a mut W , } impl < 'a > _CH24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH24W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH24W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH25`" ] pub enum CH25W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH25W :: EXCLUDED => false , CH25W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH25W < 'a > { w : & 'a mut W , } impl < 'a > _CH25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH25W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH25W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH26`" ] pub enum CH26W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH26W :: EXCLUDED => false , CH26W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH26W < 'a > { w : & 'a mut W , } impl < 'a > _CH26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH26W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH26W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH27`" ] pub enum CH27W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH27W :: EXCLUDED => false , CH27W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH27W < 'a > { w : & 'a mut W , } impl < 'a > _CH27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH27W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH27W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH28`" ] pub enum CH28W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH28W :: EXCLUDED => false , CH28W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH28W < 'a > { w : & 'a mut W , } impl < 'a > _CH28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH28W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH28W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH29`" ] pub enum CH29W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH29W :: EXCLUDED => false , CH29W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH29W < 'a > { w : & 'a mut W , } impl < 'a > _CH29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH29W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH29W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH30`" ] pub enum CH30W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH30W :: EXCLUDED => false , CH30W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH30W < 'a > { w : & 'a mut W , } impl < 'a > _CH30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH30W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH30W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `CH31`" ] pub enum CH31W { # [ doc = "Exclude" ] EXCLUDED , # [ doc = "Include" ] INCLUDED } impl CH31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { CH31W :: EXCLUDED => false , CH31W :: INCLUDED => true } } } # [ doc = r" Proxy" ] pub struct _CH31W < 'a > { w : & 'a mut W , } impl < 'a > _CH31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : CH31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Exclude" ] # [ inline ] pub fn excluded ( self ) -> & 'a mut W { self . variant ( CH31W :: EXCLUDED ) } # [ doc = "Include" ] # [ inline ] pub fn included ( self ) -> & 'a mut W { self . variant ( CH31W :: INCLUDED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Include or exclude channel 0" ] # [ inline ] pub fn ch0 ( & self ) -> CH0R { CH0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Include or exclude channel 1" ] # [ inline ] pub fn ch1 ( & self ) -> CH1R { CH1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Include or exclude channel 2" ] # [ inline ] pub fn ch2 ( & self ) -> CH2R { CH2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Include or exclude channel 3" ] # [ inline ] pub fn ch3 ( & self ) -> CH3R { CH3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Include or exclude channel 4" ] # [ inline ] pub fn ch4 ( & self ) -> CH4R { CH4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Include or exclude channel 5" ] # [ inline ] pub fn ch5 ( & self ) -> CH5R { CH5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Include or exclude channel 6" ] # [ inline ] pub fn ch6 ( & self ) -> CH6R { CH6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Include or exclude channel 7" ] # [ inline ] pub fn ch7 ( & self ) -> CH7R { CH7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Include or exclude channel 8" ] # [ inline ] pub fn ch8 ( & self ) -> CH8R { CH8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Include or exclude channel 9" ] # [ inline ] pub fn ch9 ( & self ) -> CH9R { CH9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Include or exclude channel 10" ] # [ inline ] pub fn ch10 ( & self ) -> CH10R { CH10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Include or exclude channel 11" ] # [ inline ] pub fn ch11 ( & self ) -> CH11R { CH11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Include or exclude channel 12" ] # [ inline ] pub fn ch12 ( & self ) -> CH12R { CH12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Include or exclude channel 13" ] # [ inline ] pub fn ch13 ( & self ) -> CH13R { CH13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Include or exclude channel 14" ] # [ inline ] pub fn ch14 ( & self ) -> CH14R { CH14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Include or exclude channel 15" ] # [ inline ] pub fn ch15 ( & self ) -> CH15R { CH15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Include or exclude channel 16" ] # [ inline ] pub fn ch16 ( & self ) -> CH16R { CH16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Include or exclude channel 17" ] # [ inline ] pub fn ch17 ( & self ) -> CH17R { CH17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Include or exclude channel 18" ] # [ inline ] pub fn ch18 ( & self ) -> CH18R { CH18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Include or exclude channel 19" ] # [ inline ] pub fn ch19 ( & self ) -> CH19R { CH19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Include or exclude channel 20" ] # [ inline ] pub fn ch20 ( & self ) -> CH20R { CH20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Include or exclude channel 21" ] # [ inline ] pub fn ch21 ( & self ) -> CH21R { CH21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Include or exclude channel 22" ] # [ inline ] pub fn ch22 ( & self ) -> CH22R { CH22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Include or exclude channel 23" ] # [ inline ] pub fn ch23 ( & self ) -> CH23R { CH23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Include or exclude channel 24" ] # [ inline ] pub fn ch24 ( & self ) -> CH24R { CH24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Include or exclude channel 25" ] # [ inline ] pub fn ch25 ( & self ) -> CH25R { CH25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Include or exclude channel 26" ] # [ inline ] pub fn ch26 ( & self ) -> CH26R { CH26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Include or exclude channel 27" ] # [ inline ] pub fn ch27 ( & self ) -> CH27R { CH27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Include or exclude channel 28" ] # [ inline ] pub fn ch28 ( & self ) -> CH28R { CH28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Include or exclude channel 29" ] # [ inline ] pub fn ch29 ( & self ) -> CH29R { CH29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Include or exclude channel 30" ] # [ inline ] pub fn ch30 ( & self ) -> CH30R { CH30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Include or exclude channel 31" ] # [ inline ] pub fn ch31 ( & self ) -> CH31R { CH31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Include or exclude channel 0" ] # [ inline ] pub fn ch0 ( & mut self ) -> _CH0W { _CH0W { w : self } } # [ doc = "Bit 1 - Include or exclude channel 1" ] # [ inline ] pub fn ch1 ( & mut self ) -> _CH1W { _CH1W { w : self } } # [ doc = "Bit 2 - Include or exclude channel 2" ] # [ inline ] pub fn ch2 ( & mut self ) -> _CH2W { _CH2W { w : self } } # [ doc = "Bit 3 - Include or exclude channel 3" ] # [ inline ] pub fn ch3 ( & mut self ) -> _CH3W { _CH3W { w : self } } # [ doc = "Bit 4 - Include or exclude channel 4" ] # [ inline ] pub fn ch4 ( & mut self ) -> _CH4W { _CH4W { w : self } } # [ doc = "Bit 5 - Include or exclude channel 5" ] # [ inline ] pub fn ch5 ( & mut self ) -> _CH5W { _CH5W { w : self } } # [ doc = "Bit 6 - Include or exclude channel 6" ] # [ inline ] pub fn ch6 ( & mut self ) -> _CH6W { _CH6W { w : self } } # [ doc = "Bit 7 - Include or exclude channel 7" ] # [ inline ] pub fn ch7 ( & mut self ) -> _CH7W { _CH7W { w : self } } # [ doc = "Bit 8 - Include or exclude channel 8" ] # [ inline ] pub fn ch8 ( & mut self ) -> _CH8W { _CH8W { w : self } } # [ doc = "Bit 9 - Include or exclude channel 9" ] # [ inline ] pub fn ch9 ( & mut self ) -> _CH9W { _CH9W { w : self } } # [ doc = "Bit 10 - Include or exclude channel 10" ] # [ inline ] pub fn ch10 ( & mut self ) -> _CH10W { _CH10W { w : self } } # [ doc = "Bit 11 - Include or exclude channel 11" ] # [ inline ] pub fn ch11 ( & mut self ) -> _CH11W { _CH11W { w : self } } # [ doc = "Bit 12 - Include or exclude channel 12" ] # [ inline ] pub fn ch12 ( & mut self ) -> _CH12W { _CH12W { w : self } } # [ doc = "Bit 13 - Include or exclude channel 13" ] # [ inline ] pub fn ch13 ( & mut self ) -> _CH13W { _CH13W { w : self } } # [ doc = "Bit 14 - Include or exclude channel 14" ] # [ inline ] pub fn ch14 ( & mut self ) -> _CH14W { _CH14W { w : self } } # [ doc = "Bit 15 - Include or exclude channel 15" ] # [ inline ] pub fn ch15 ( & mut self ) -> _CH15W { _CH15W { w : self } } # [ doc = "Bit 16 - Include or exclude channel 16" ] # [ inline ] pub fn ch16 ( & mut self ) -> _CH16W { _CH16W { w : self } } # [ doc = "Bit 17 - Include or exclude channel 17" ] # [ inline ] pub fn ch17 ( & mut self ) -> _CH17W { _CH17W { w : self } } # [ doc = "Bit 18 - Include or exclude channel 18" ] # [ inline ] pub fn ch18 ( & mut self ) -> _CH18W { _CH18W { w : self } } # [ doc = "Bit 19 - Include or exclude channel 19" ] # [ inline ] pub fn ch19 ( & mut self ) -> _CH19W { _CH19W { w : self } } # [ doc = "Bit 20 - Include or exclude channel 20" ] # [ inline ] pub fn ch20 ( & mut self ) -> _CH20W { _CH20W { w : self } } # [ doc = "Bit 21 - Include or exclude channel 21" ] # [ inline ] pub fn ch21 ( & mut self ) -> _CH21W { _CH21W { w : self } } # [ doc = "Bit 22 - Include or exclude channel 22" ] # [ inline ] pub fn ch22 ( & mut self ) -> _CH22W { _CH22W { w : self } } # [ doc = "Bit 23 - Include or exclude channel 23" ] # [ inline ] pub fn ch23 ( & mut self ) -> _CH23W { _CH23W { w : self } } # [ doc = "Bit 24 - Include or exclude channel 24" ] # [ inline ] pub fn ch24 ( & mut self ) -> _CH24W { _CH24W { w : self } } # [ doc = "Bit 25 - Include or exclude channel 25" ] # [ inline ] pub fn ch25 ( & mut self ) -> _CH25W { _CH25W { w : self } } # [ doc = "Bit 26 - Include or exclude channel 26" ] # [ inline ] pub fn ch26 ( & mut self ) -> _CH26W { _CH26W { w : self } } # [ doc = "Bit 27 - Include or exclude channel 27" ] # [ inline ] pub fn ch27 ( & mut self ) -> _CH27W { _CH27W { w : self } } # [ doc = "Bit 28 - Include or exclude channel 28" ] # [ inline ] pub fn ch28 ( & mut self ) -> _CH28W { _CH28W { w : self } } # [ doc = "Bit 29 - Include or exclude channel 29" ] # [ inline ] pub fn ch29 ( & mut self ) -> _CH29W { _CH29W { w : self } } # [ doc = "Bit 30 - Include or exclude channel 30" ] # [ inline ] pub fn ch30 ( & mut self ) -> _CH30W { _CH30W { w : self } } # [ doc = "Bit 31 - Include or exclude channel 31" ] # [ inline ] pub fn ch31 ( & mut self ) -> _CH31W { _CH31W { w : self } } } } } # [ doc = "Memory Watch Unit" ] pub struct MWU { _marker : PhantomData < * const ( ) > } unsafe impl Send for MWU { } impl MWU { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const mwu :: RegisterBlock { 0x4002_0000 as * const _ } } impl Deref for MWU { type Target = mwu :: RegisterBlock ; fn deref ( & self ) -> & mwu :: RegisterBlock { unsafe { & * MWU :: ptr ( ) } } } # [ doc = "Memory Watch Unit" ] pub mod mwu { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 768usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved1 : [ u8 ; 20usize ] , # [ doc = "0x320 - Enable or disable non-maskable interrupt" ] pub nmien : NMIEN , # [ doc = "0x324 - Enable non-maskable interrupt" ] pub nmienset : NMIENSET , # [ doc = "0x328 - Disable non-maskable interrupt" ] pub nmienclr : NMIENCLR , _reserved2 : [ u8 ; 484usize ] , # [ doc = "0x510 - Enable/disable regions watch" ] pub regionen : REGIONEN , # [ doc = "0x514 - Enable regions watch" ] pub regionenset : REGIONENSET , # [ doc = "0x518 - Disable regions watch" ] pub regionenclr : REGIONENCLR , } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: DISABLED => false , REGION0WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: DISABLED => false , REGION0RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: DISABLED => false , REGION1WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: DISABLED => false , REGION1RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: DISABLED => false , REGION2WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: DISABLED => false , REGION2RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: DISABLED => false , REGION3WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: DISABLED => false , REGION3RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: DISABLED => false , PREGION0WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: DISABLED => false , PREGION0RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: DISABLED => false , PREGION1WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: DISABLED => false , PREGION1RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable or disable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable or disable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable or disable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable or disable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Enable or disable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Enable or disable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Enable or disable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Enable or disable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Enable or disable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Enable or disable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Enable or disable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Enable or disable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Enable or disable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Enable" ] SET } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Enable" ] SET } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Enable" ] SET } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Enable" ] SET } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Enable" ] SET } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Enable" ] SET } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Enable" ] SET } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Enable" ] SET } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Enable" ] SET } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Enable" ] SET } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Enable" ] SET } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Enable" ] SET } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Enable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Enable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Enable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Write '1' to Enable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Write '1' to Enable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Write '1' to Enable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Write '1' to Enable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Write '1' to Enable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Disable" ] CLEAR } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Disable" ] CLEAR } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Disable" ] CLEAR } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Disable" ] CLEAR } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Disable" ] CLEAR } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Disable" ] CLEAR } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Disable" ] CLEAR } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Disable" ] CLEAR } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Disable" ] CLEAR } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Disable" ] CLEAR } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Disable" ] CLEAR } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Disable" ] CLEAR } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Disable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Disable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Disable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Write '1' to Disable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Write '1' to Disable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Write '1' to Disable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Write '1' to Disable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Write '1' to Disable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Enable or disable non-maskable interrupt" ] pub struct NMIEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable non-maskable interrupt" ] pub mod nmien { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NMIEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: DISABLED => false , REGION0WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: DISABLED => false , REGION0RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: DISABLED => false , REGION1WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: DISABLED => false , REGION1RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: DISABLED => false , REGION2WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: DISABLED => false , REGION2RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: DISABLED => false , REGION3WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: DISABLED => false , REGION3RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: DISABLED => false , PREGION0WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: DISABLED => false , PREGION0RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: DISABLED => false , PREGION1WAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: DISABLED => false , PREGION1RAW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable or disable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable or disable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable or disable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable or disable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable or disable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable or disable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable or disable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable or disable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable or disable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable or disable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable or disable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Enable or disable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Enable or disable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Enable or disable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Enable or disable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Enable or disable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Enable or disable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Enable or disable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Enable or disable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Enable or disable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Enable or disable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Enable or disable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Enable non-maskable interrupt" ] pub struct NMIENSET { register : VolatileCell < u32 > } # [ doc = "Enable non-maskable interrupt" ] pub mod nmienset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NMIENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Enable" ] SET } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Enable" ] SET } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Enable" ] SET } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Enable" ] SET } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Enable" ] SET } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Enable" ] SET } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Enable" ] SET } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Enable" ] SET } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Enable" ] SET } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Enable" ] SET } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Enable" ] SET } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Enable" ] SET } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Enable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Enable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Enable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Enable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Enable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Enable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Enable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Enable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Enable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Write '1' to Enable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Enable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Write '1' to Enable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Write '1' to Enable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Write '1' to Enable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Write '1' to Enable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Write '1' to Enable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Write '1' to Enable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Write '1' to Enable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Write '1' to Enable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Write '1' to Enable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Disable non-maskable interrupt" ] pub struct NMIENCLR { register : VolatileCell < u32 > } # [ doc = "Disable non-maskable interrupt" ] pub mod nmienclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: NMIENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `REGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0WAR :: DISABLED => false , REGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0WAR { match value { false => REGION0WAR :: DISABLED , true => REGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION0RAR :: DISABLED => false , REGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION0RAR { match value { false => REGION0RAR :: DISABLED , true => REGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1WAR :: DISABLED => false , REGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1WAR { match value { false => REGION1WAR :: DISABLED , true => REGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION1RAR :: DISABLED => false , REGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION1RAR { match value { false => REGION1RAR :: DISABLED , true => REGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION1RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2WAR :: DISABLED => false , REGION2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2WAR { match value { false => REGION2WAR :: DISABLED , true => REGION2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION2RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION2RAR :: DISABLED => false , REGION2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION2RAR { match value { false => REGION2RAR :: DISABLED , true => REGION2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION2RAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3WAR :: DISABLED => false , REGION3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3WAR { match value { false => REGION3WAR :: DISABLED , true => REGION3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3WAR :: ENABLED } } # [ doc = "Possible values of the field `REGION3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum REGION3RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl REGION3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { REGION3RAR :: DISABLED => false , REGION3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> REGION3RAR { match value { false => REGION3RAR :: DISABLED , true => REGION3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == REGION3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == REGION3RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0WAR :: DISABLED => false , PREGION0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0WAR { match value { false => PREGION0WAR :: DISABLED , true => PREGION0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION0RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION0RAR :: DISABLED => false , PREGION0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION0RAR { match value { false => PREGION0RAR :: DISABLED , true => PREGION0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION0RAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1WAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1WAR :: DISABLED => false , PREGION1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1WAR { match value { false => PREGION1WAR :: DISABLED , true => PREGION1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1WAR :: ENABLED } } # [ doc = "Possible values of the field `PREGION1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PREGION1RAR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl PREGION1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PREGION1RAR :: DISABLED => false , PREGION1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PREGION1RAR { match value { false => PREGION1RAR :: DISABLED , true => PREGION1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PREGION1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PREGION1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `REGION0WA`" ] pub enum REGION0WAW { # [ doc = "Disable" ] CLEAR } impl REGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION0RA`" ] pub enum REGION0RAW { # [ doc = "Disable" ] CLEAR } impl REGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1WA`" ] pub enum REGION1WAW { # [ doc = "Disable" ] CLEAR } impl REGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION1RA`" ] pub enum REGION1RAW { # [ doc = "Disable" ] CLEAR } impl REGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2WA`" ] pub enum REGION2WAW { # [ doc = "Disable" ] CLEAR } impl REGION2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION2WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION2WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION2RA`" ] pub enum REGION2RAW { # [ doc = "Disable" ] CLEAR } impl REGION2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION2RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION2RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION2RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3WA`" ] pub enum REGION3WAW { # [ doc = "Disable" ] CLEAR } impl REGION3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION3WAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION3WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `REGION3RA`" ] pub enum REGION3RAW { # [ doc = "Disable" ] CLEAR } impl REGION3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { REGION3RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _REGION3RAW < 'a > { w : & 'a mut W , } impl < 'a > _REGION3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : REGION3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( REGION3RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0WA`" ] pub enum PREGION0WAW { # [ doc = "Disable" ] CLEAR } impl PREGION0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION0RA`" ] pub enum PREGION0RAW { # [ doc = "Disable" ] CLEAR } impl PREGION0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1WA`" ] pub enum PREGION1WAW { # [ doc = "Disable" ] CLEAR } impl PREGION1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PREGION1RA`" ] pub enum PREGION1RAW { # [ doc = "Disable" ] CLEAR } impl PREGION1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PREGION1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PREGION1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PREGION1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PREGION1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PREGION1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Write '1' to Disable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & self ) -> REGION0WAR { REGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Write '1' to Disable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & self ) -> REGION0RAR { REGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & self ) -> REGION1WAR { REGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Write '1' to Disable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & self ) -> REGION1RAR { REGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Write '1' to Disable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & self ) -> REGION2WAR { REGION2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & self ) -> REGION2RAR { REGION2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Write '1' to Disable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & self ) -> REGION3WAR { REGION3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Write '1' to Disable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & self ) -> REGION3RAR { REGION3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Write '1' to Disable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & self ) -> PREGION0WAR { PREGION0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Write '1' to Disable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & self ) -> PREGION0RAR { PREGION0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Write '1' to Disable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & self ) -> PREGION1WAR { PREGION1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Write '1' to Disable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & self ) -> PREGION1RAR { PREGION1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Write '1' to Disable non-maskable interrupt for REGION[0].WA event" ] # [ inline ] pub fn region0wa ( & mut self ) -> _REGION0WAW { _REGION0WAW { w : self } } # [ doc = "Bit 1 - Write '1' to Disable non-maskable interrupt for REGION[0].RA event" ] # [ inline ] pub fn region0ra ( & mut self ) -> _REGION0RAW { _REGION0RAW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable non-maskable interrupt for REGION[1].WA event" ] # [ inline ] pub fn region1wa ( & mut self ) -> _REGION1WAW { _REGION1WAW { w : self } } # [ doc = "Bit 3 - Write '1' to Disable non-maskable interrupt for REGION[1].RA event" ] # [ inline ] pub fn region1ra ( & mut self ) -> _REGION1RAW { _REGION1RAW { w : self } } # [ doc = "Bit 4 - Write '1' to Disable non-maskable interrupt for REGION[2].WA event" ] # [ inline ] pub fn region2wa ( & mut self ) -> _REGION2WAW { _REGION2WAW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable non-maskable interrupt for REGION[2].RA event" ] # [ inline ] pub fn region2ra ( & mut self ) -> _REGION2RAW { _REGION2RAW { w : self } } # [ doc = "Bit 6 - Write '1' to Disable non-maskable interrupt for REGION[3].WA event" ] # [ inline ] pub fn region3wa ( & mut self ) -> _REGION3WAW { _REGION3WAW { w : self } } # [ doc = "Bit 7 - Write '1' to Disable non-maskable interrupt for REGION[3].RA event" ] # [ inline ] pub fn region3ra ( & mut self ) -> _REGION3RAW { _REGION3RAW { w : self } } # [ doc = "Bit 24 - Write '1' to Disable non-maskable interrupt for PREGION[0].WA event" ] # [ inline ] pub fn pregion0wa ( & mut self ) -> _PREGION0WAW { _PREGION0WAW { w : self } } # [ doc = "Bit 25 - Write '1' to Disable non-maskable interrupt for PREGION[0].RA event" ] # [ inline ] pub fn pregion0ra ( & mut self ) -> _PREGION0RAW { _PREGION0RAW { w : self } } # [ doc = "Bit 26 - Write '1' to Disable non-maskable interrupt for PREGION[1].WA event" ] # [ inline ] pub fn pregion1wa ( & mut self ) -> _PREGION1WAW { _PREGION1WAW { w : self } } # [ doc = "Bit 27 - Write '1' to Disable non-maskable interrupt for PREGION[1].RA event" ] # [ inline ] pub fn pregion1ra ( & mut self ) -> _PREGION1RAW { _PREGION1RAW { w : self } } } } # [ doc = "Enable/disable regions watch" ] pub struct REGIONEN { register : VolatileCell < u32 > } # [ doc = "Enable/disable regions watch" ] pub mod regionen { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REGIONEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0WAR { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0WAR :: DISABLE => false , RGN0WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0WAR { match value { false => RGN0WAR :: DISABLE , true => RGN0WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN0WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN0WAR :: ENABLE } } # [ doc = "Possible values of the field `RGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0RAR { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0RAR :: DISABLE => false , RGN0RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0RAR { match value { false => RGN0RAR :: DISABLE , true => RGN0RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN0RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN0RAR :: ENABLE } } # [ doc = "Possible values of the field `RGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1WAR { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1WAR :: DISABLE => false , RGN1WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1WAR { match value { false => RGN1WAR :: DISABLE , true => RGN1WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN1WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN1WAR :: ENABLE } } # [ doc = "Possible values of the field `RGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1RAR { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1RAR :: DISABLE => false , RGN1RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1RAR { match value { false => RGN1RAR :: DISABLE , true => RGN1RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN1RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN1RAR :: ENABLE } } # [ doc = "Possible values of the field `RGN2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2WAR { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2WAR :: DISABLE => false , RGN2WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2WAR { match value { false => RGN2WAR :: DISABLE , true => RGN2WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN2WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN2WAR :: ENABLE } } # [ doc = "Possible values of the field `RGN2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2RAR { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2RAR :: DISABLE => false , RGN2RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2RAR { match value { false => RGN2RAR :: DISABLE , true => RGN2RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN2RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN2RAR :: ENABLE } } # [ doc = "Possible values of the field `RGN3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3WAR { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3WAR :: DISABLE => false , RGN3WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3WAR { match value { false => RGN3WAR :: DISABLE , true => RGN3WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN3WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN3WAR :: ENABLE } } # [ doc = "Possible values of the field `RGN3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3RAR { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3RAR :: DISABLE => false , RGN3RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3RAR { match value { false => RGN3RAR :: DISABLE , true => RGN3RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == RGN3RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == RGN3RAR :: ENABLE } } # [ doc = "Possible values of the field `PRGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0WAR { # [ doc = "Disable write access watch in this PREGION" ] DISABLE , # [ doc = "Enable write access watch in this PREGION" ] ENABLE } impl PRGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0WAR :: DISABLE => false , PRGN0WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0WAR { match value { false => PRGN0WAR :: DISABLE , true => PRGN0WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == PRGN0WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == PRGN0WAR :: ENABLE } } # [ doc = "Possible values of the field `PRGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0RAR { # [ doc = "Disable read access watch in this PREGION" ] DISABLE , # [ doc = "Enable read access watch in this PREGION" ] ENABLE } impl PRGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0RAR :: DISABLE => false , PRGN0RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0RAR { match value { false => PRGN0RAR :: DISABLE , true => PRGN0RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == PRGN0RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == PRGN0RAR :: ENABLE } } # [ doc = "Possible values of the field `PRGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1WAR { # [ doc = "Disable write access watch in this PREGION" ] DISABLE , # [ doc = "Enable write access watch in this PREGION" ] ENABLE } impl PRGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1WAR :: DISABLE => false , PRGN1WAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1WAR { match value { false => PRGN1WAR :: DISABLE , true => PRGN1WAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == PRGN1WAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == PRGN1WAR :: ENABLE } } # [ doc = "Possible values of the field `PRGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1RAR { # [ doc = "Disable read access watch in this PREGION" ] DISABLE , # [ doc = "Enable read access watch in this PREGION" ] ENABLE } impl PRGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1RAR :: DISABLE => false , PRGN1RAR :: ENABLE => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1RAR { match value { false => PRGN1RAR :: DISABLE , true => PRGN1RAR :: ENABLE , } } # [ doc = "Checks if the value of the field is `DISABLE`" ] # [ inline ] pub fn is_disable ( & self ) -> bool { * self == PRGN1RAR :: DISABLE } # [ doc = "Checks if the value of the field is `ENABLE`" ] # [ inline ] pub fn is_enable ( & self ) -> bool { * self == PRGN1RAR :: ENABLE } } # [ doc = "Values that can be written to the field `RGN0WA`" ] pub enum RGN0WAW { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0WAW :: DISABLE => false , RGN0WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN0WAW :: DISABLE ) } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN0WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN0RA`" ] pub enum RGN0RAW { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0RAW :: DISABLE => false , RGN0RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN0RAW :: DISABLE ) } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN0RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1WA`" ] pub enum RGN1WAW { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1WAW :: DISABLE => false , RGN1WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN1WAW :: DISABLE ) } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN1WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1RA`" ] pub enum RGN1RAW { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1RAW :: DISABLE => false , RGN1RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN1RAW :: DISABLE ) } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN1RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2WA`" ] pub enum RGN2WAW { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2WAW :: DISABLE => false , RGN2WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN2WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN2WAW :: DISABLE ) } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN2WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2RA`" ] pub enum RGN2RAW { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2RAW :: DISABLE => false , RGN2RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN2RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN2RAW :: DISABLE ) } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN2RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3WA`" ] pub enum RGN3WAW { # [ doc = "Disable write access watch in this region" ] DISABLE , # [ doc = "Enable write access watch in this region" ] ENABLE } impl RGN3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3WAW :: DISABLE => false , RGN3WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN3WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN3WAW :: DISABLE ) } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN3WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3RA`" ] pub enum RGN3RAW { # [ doc = "Disable read access watch in this region" ] DISABLE , # [ doc = "Enable read access watch in this region" ] ENABLE } impl RGN3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3RAW :: DISABLE => false , RGN3RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _RGN3RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( RGN3RAW :: DISABLE ) } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( RGN3RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0WA`" ] pub enum PRGN0WAW { # [ doc = "Disable write access watch in this PREGION" ] DISABLE , # [ doc = "Enable write access watch in this PREGION" ] ENABLE } impl PRGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0WAW :: DISABLE => false , PRGN0WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this PREGION" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( PRGN0WAW :: DISABLE ) } # [ doc = "Enable write access watch in this PREGION" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( PRGN0WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0RA`" ] pub enum PRGN0RAW { # [ doc = "Disable read access watch in this PREGION" ] DISABLE , # [ doc = "Enable read access watch in this PREGION" ] ENABLE } impl PRGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0RAW :: DISABLE => false , PRGN0RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this PREGION" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( PRGN0RAW :: DISABLE ) } # [ doc = "Enable read access watch in this PREGION" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( PRGN0RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1WA`" ] pub enum PRGN1WAW { # [ doc = "Disable write access watch in this PREGION" ] DISABLE , # [ doc = "Enable write access watch in this PREGION" ] ENABLE } impl PRGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1WAW :: DISABLE => false , PRGN1WAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this PREGION" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( PRGN1WAW :: DISABLE ) } # [ doc = "Enable write access watch in this PREGION" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( PRGN1WAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1RA`" ] pub enum PRGN1RAW { # [ doc = "Disable read access watch in this PREGION" ] DISABLE , # [ doc = "Enable read access watch in this PREGION" ] ENABLE } impl PRGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1RAW :: DISABLE => false , PRGN1RAW :: ENABLE => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this PREGION" ] # [ inline ] pub fn disable ( self ) -> & 'a mut W { self . variant ( PRGN1RAW :: DISABLE ) } # [ doc = "Enable read access watch in this PREGION" ] # [ inline ] pub fn enable ( self ) -> & 'a mut W { self . variant ( PRGN1RAW :: ENABLE ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable/disable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & self ) -> RGN0WAR { RGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable/disable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & self ) -> RGN0RAR { RGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable/disable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & self ) -> RGN1WAR { RGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable/disable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & self ) -> RGN1RAR { RGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable/disable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & self ) -> RGN2WAR { RGN2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable/disable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & self ) -> RGN2RAR { RGN2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable/disable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & self ) -> RGN3WAR { RGN3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable/disable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & self ) -> RGN3RAR { RGN3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable/disable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & self ) -> PRGN0WAR { PRGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable/disable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & self ) -> PRGN0RAR { PRGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable/disable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & self ) -> PRGN1WAR { PRGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable/disable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & self ) -> PRGN1RAR { PRGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable/disable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & mut self ) -> _RGN0WAW { _RGN0WAW { w : self } } # [ doc = "Bit 1 - Enable/disable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & mut self ) -> _RGN0RAW { _RGN0RAW { w : self } } # [ doc = "Bit 2 - Enable/disable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & mut self ) -> _RGN1WAW { _RGN1WAW { w : self } } # [ doc = "Bit 3 - Enable/disable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & mut self ) -> _RGN1RAW { _RGN1RAW { w : self } } # [ doc = "Bit 4 - Enable/disable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & mut self ) -> _RGN2WAW { _RGN2WAW { w : self } } # [ doc = "Bit 5 - Enable/disable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & mut self ) -> _RGN2RAW { _RGN2RAW { w : self } } # [ doc = "Bit 6 - Enable/disable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & mut self ) -> _RGN3WAW { _RGN3WAW { w : self } } # [ doc = "Bit 7 - Enable/disable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & mut self ) -> _RGN3RAW { _RGN3RAW { w : self } } # [ doc = "Bit 24 - Enable/disable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & mut self ) -> _PRGN0WAW { _PRGN0WAW { w : self } } # [ doc = "Bit 25 - Enable/disable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & mut self ) -> _PRGN0RAW { _PRGN0RAW { w : self } } # [ doc = "Bit 26 - Enable/disable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & mut self ) -> _PRGN1WAW { _PRGN1WAW { w : self } } # [ doc = "Bit 27 - Enable/disable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & mut self ) -> _PRGN1RAW { _PRGN1RAW { w : self } } } } # [ doc = "Enable regions watch" ] pub struct REGIONENSET { register : VolatileCell < u32 > } # [ doc = "Enable regions watch" ] pub mod regionenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REGIONENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0WAR :: DISABLED => false , RGN0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0WAR { match value { false => RGN0WAR :: DISABLED , true => RGN0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN0WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0RAR :: DISABLED => false , RGN0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0RAR { match value { false => RGN0RAR :: DISABLED , true => RGN0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN0RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1WAR :: DISABLED => false , RGN1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1WAR { match value { false => RGN1WAR :: DISABLED , true => RGN1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN1WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1RAR :: DISABLED => false , RGN1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1RAR { match value { false => RGN1RAR :: DISABLED , true => RGN1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN1RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2WAR :: DISABLED => false , RGN2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2WAR { match value { false => RGN2WAR :: DISABLED , true => RGN2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN2WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2RAR :: DISABLED => false , RGN2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2RAR { match value { false => RGN2RAR :: DISABLED , true => RGN2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN2RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3WAR :: DISABLED => false , RGN3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3WAR { match value { false => RGN3WAR :: DISABLED , true => RGN3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN3WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3RAR :: DISABLED => false , RGN3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3RAR { match value { false => RGN3RAR :: DISABLED , true => RGN3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN3RAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0WAR { # [ doc = "Write access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Write access watch in this PREGION is enabled" ] ENABLED } impl PRGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0WAR :: DISABLED => false , PRGN0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0WAR { match value { false => PRGN0WAR :: DISABLED , true => PRGN0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN0WAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0RAR { # [ doc = "Read access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Read access watch in this PREGION is enabled" ] ENABLED } impl PRGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0RAR :: DISABLED => false , PRGN0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0RAR { match value { false => PRGN0RAR :: DISABLED , true => PRGN0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN0RAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1WAR { # [ doc = "Write access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Write access watch in this PREGION is enabled" ] ENABLED } impl PRGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1WAR :: DISABLED => false , PRGN1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1WAR { match value { false => PRGN1WAR :: DISABLED , true => PRGN1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN1WAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1RAR { # [ doc = "Read access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Read access watch in this PREGION is enabled" ] ENABLED } impl PRGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1RAR :: DISABLED => false , PRGN1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1RAR { match value { false => PRGN1RAR :: DISABLED , true => PRGN1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `RGN0WA`" ] pub enum RGN0WAW { # [ doc = "Enable write access watch in this region" ] SET } impl RGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN0RA`" ] pub enum RGN0RAW { # [ doc = "Enable read access watch in this region" ] SET } impl RGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1WA`" ] pub enum RGN1WAW { # [ doc = "Enable write access watch in this region" ] SET } impl RGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1RA`" ] pub enum RGN1RAW { # [ doc = "Enable read access watch in this region" ] SET } impl RGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2WA`" ] pub enum RGN2WAW { # [ doc = "Enable write access watch in this region" ] SET } impl RGN2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN2WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN2WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2RA`" ] pub enum RGN2RAW { # [ doc = "Enable read access watch in this region" ] SET } impl RGN2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN2RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN2RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3WA`" ] pub enum RGN3WAW { # [ doc = "Enable write access watch in this region" ] SET } impl RGN3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN3WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN3WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3RA`" ] pub enum RGN3RAW { # [ doc = "Enable read access watch in this region" ] SET } impl RGN3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RGN3RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this region" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RGN3RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0WA`" ] pub enum PRGN0WAW { # [ doc = "Enable write access watch in this PREGION" ] SET } impl PRGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this PREGION" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PRGN0WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0RA`" ] pub enum PRGN0RAW { # [ doc = "Enable read access watch in this PREGION" ] SET } impl PRGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this PREGION" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PRGN0RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1WA`" ] pub enum PRGN1WAW { # [ doc = "Enable write access watch in this PREGION" ] SET } impl PRGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1WAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable write access watch in this PREGION" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PRGN1WAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1RA`" ] pub enum PRGN1RAW { # [ doc = "Enable read access watch in this PREGION" ] SET } impl PRGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1RAW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable read access watch in this PREGION" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PRGN1RAW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & self ) -> RGN0WAR { RGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Enable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & self ) -> RGN0RAR { RGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & self ) -> RGN1WAR { RGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Enable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & self ) -> RGN1RAR { RGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Enable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & self ) -> RGN2WAR { RGN2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & self ) -> RGN2RAR { RGN2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Enable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & self ) -> RGN3WAR { RGN3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Enable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & self ) -> RGN3RAR { RGN3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Enable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & self ) -> PRGN0WAR { PRGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Enable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & self ) -> PRGN0RAR { PRGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Enable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & self ) -> PRGN1WAR { PRGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Enable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & self ) -> PRGN1RAR { PRGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & mut self ) -> _RGN0WAW { _RGN0WAW { w : self } } # [ doc = "Bit 1 - Enable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & mut self ) -> _RGN0RAW { _RGN0RAW { w : self } } # [ doc = "Bit 2 - Enable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & mut self ) -> _RGN1WAW { _RGN1WAW { w : self } } # [ doc = "Bit 3 - Enable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & mut self ) -> _RGN1RAW { _RGN1RAW { w : self } } # [ doc = "Bit 4 - Enable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & mut self ) -> _RGN2WAW { _RGN2WAW { w : self } } # [ doc = "Bit 5 - Enable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & mut self ) -> _RGN2RAW { _RGN2RAW { w : self } } # [ doc = "Bit 6 - Enable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & mut self ) -> _RGN3WAW { _RGN3WAW { w : self } } # [ doc = "Bit 7 - Enable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & mut self ) -> _RGN3RAW { _RGN3RAW { w : self } } # [ doc = "Bit 24 - Enable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & mut self ) -> _PRGN0WAW { _PRGN0WAW { w : self } } # [ doc = "Bit 25 - Enable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & mut self ) -> _PRGN0RAW { _PRGN0RAW { w : self } } # [ doc = "Bit 26 - Enable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & mut self ) -> _PRGN1WAW { _PRGN1WAW { w : self } } # [ doc = "Bit 27 - Enable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & mut self ) -> _PRGN1RAW { _PRGN1RAW { w : self } } } } # [ doc = "Disable regions watch" ] pub struct REGIONENCLR { register : VolatileCell < u32 > } # [ doc = "Disable regions watch" ] pub mod regionenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: REGIONENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0WAR :: DISABLED => false , RGN0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0WAR { match value { false => RGN0WAR :: DISABLED , true => RGN0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN0WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN0RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN0RAR :: DISABLED => false , RGN0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN0RAR { match value { false => RGN0RAR :: DISABLED , true => RGN0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN0RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1WAR :: DISABLED => false , RGN1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1WAR { match value { false => RGN1WAR :: DISABLED , true => RGN1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN1WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN1RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN1RAR :: DISABLED => false , RGN1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN1RAR { match value { false => RGN1RAR :: DISABLED , true => RGN1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN1RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN2WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN2WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2WAR :: DISABLED => false , RGN2WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2WAR { match value { false => RGN2WAR :: DISABLED , true => RGN2WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN2WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN2WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN2RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN2RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN2RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN2RAR :: DISABLED => false , RGN2RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN2RAR { match value { false => RGN2RAR :: DISABLED , true => RGN2RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN2RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN2RAR :: ENABLED } } # [ doc = "Possible values of the field `RGN3WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3WAR { # [ doc = "Write access watch in this region is disabled" ] DISABLED , # [ doc = "Write access watch in this region is enabled" ] ENABLED } impl RGN3WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3WAR :: DISABLED => false , RGN3WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3WAR { match value { false => RGN3WAR :: DISABLED , true => RGN3WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN3WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN3WAR :: ENABLED } } # [ doc = "Possible values of the field `RGN3RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RGN3RAR { # [ doc = "Read access watch in this region is disabled" ] DISABLED , # [ doc = "Read access watch in this region is enabled" ] ENABLED } impl RGN3RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RGN3RAR :: DISABLED => false , RGN3RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RGN3RAR { match value { false => RGN3RAR :: DISABLED , true => RGN3RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RGN3RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RGN3RAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN0WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0WAR { # [ doc = "Write access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Write access watch in this PREGION is enabled" ] ENABLED } impl PRGN0WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0WAR :: DISABLED => false , PRGN0WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0WAR { match value { false => PRGN0WAR :: DISABLED , true => PRGN0WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN0WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN0WAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN0RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN0RAR { # [ doc = "Read access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Read access watch in this PREGION is enabled" ] ENABLED } impl PRGN0RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN0RAR :: DISABLED => false , PRGN0RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN0RAR { match value { false => PRGN0RAR :: DISABLED , true => PRGN0RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN0RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN0RAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN1WA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1WAR { # [ doc = "Write access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Write access watch in this PREGION is enabled" ] ENABLED } impl PRGN1WAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1WAR :: DISABLED => false , PRGN1WAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1WAR { match value { false => PRGN1WAR :: DISABLED , true => PRGN1WAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN1WAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN1WAR :: ENABLED } } # [ doc = "Possible values of the field `PRGN1RA`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PRGN1RAR { # [ doc = "Read access watch in this PREGION is disabled" ] DISABLED , # [ doc = "Read access watch in this PREGION is enabled" ] ENABLED } impl PRGN1RAR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PRGN1RAR :: DISABLED => false , PRGN1RAR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PRGN1RAR { match value { false => PRGN1RAR :: DISABLED , true => PRGN1RAR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PRGN1RAR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == PRGN1RAR :: ENABLED } } # [ doc = "Values that can be written to the field `RGN0WA`" ] pub enum RGN0WAW { # [ doc = "Disable write access watch in this region" ] CLEAR } impl RGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN0RA`" ] pub enum RGN0RAW { # [ doc = "Disable read access watch in this region" ] CLEAR } impl RGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1WA`" ] pub enum RGN1WAW { # [ doc = "Disable write access watch in this region" ] CLEAR } impl RGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN1RA`" ] pub enum RGN1RAW { # [ doc = "Disable read access watch in this region" ] CLEAR } impl RGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2WA`" ] pub enum RGN2WAW { # [ doc = "Disable write access watch in this region" ] CLEAR } impl RGN2WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN2WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN2WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN2RA`" ] pub enum RGN2RAW { # [ doc = "Disable read access watch in this region" ] CLEAR } impl RGN2RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN2RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN2RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN2RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN2RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN2RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3WA`" ] pub enum RGN3WAW { # [ doc = "Disable write access watch in this region" ] CLEAR } impl RGN3WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN3WAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN3WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `RGN3RA`" ] pub enum RGN3RAW { # [ doc = "Disable read access watch in this region" ] CLEAR } impl RGN3RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RGN3RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RGN3RAW < 'a > { w : & 'a mut W , } impl < 'a > _RGN3RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RGN3RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this region" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RGN3RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0WA`" ] pub enum PRGN0WAW { # [ doc = "Disable write access watch in this PREGION" ] CLEAR } impl PRGN0WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this PREGION" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PRGN0WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN0RA`" ] pub enum PRGN0RAW { # [ doc = "Disable read access watch in this PREGION" ] CLEAR } impl PRGN0RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN0RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PRGN0RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN0RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN0RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this PREGION" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PRGN0RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1WA`" ] pub enum PRGN1WAW { # [ doc = "Disable write access watch in this PREGION" ] CLEAR } impl PRGN1WAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1WAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1WAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1WAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1WAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable write access watch in this PREGION" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PRGN1WAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PRGN1RA`" ] pub enum PRGN1RAW { # [ doc = "Disable read access watch in this PREGION" ] CLEAR } impl PRGN1RAW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PRGN1RAW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PRGN1RAW < 'a > { w : & 'a mut W , } impl < 'a > _PRGN1RAW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PRGN1RAW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable read access watch in this PREGION" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PRGN1RAW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Disable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & self ) -> RGN0WAR { RGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Disable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & self ) -> RGN0RAR { RGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Disable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & self ) -> RGN1WAR { RGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Disable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & self ) -> RGN1RAR { RGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Disable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & self ) -> RGN2WAR { RGN2WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Disable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & self ) -> RGN2RAR { RGN2RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Disable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & self ) -> RGN3WAR { RGN3WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Disable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & self ) -> RGN3RAR { RGN3RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Disable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & self ) -> PRGN0WAR { PRGN0WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Disable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & self ) -> PRGN0RAR { PRGN0RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Disable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & self ) -> PRGN1WAR { PRGN1WAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Disable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & self ) -> PRGN1RAR { PRGN1RAR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Disable write access watch in region[0]" ] # [ inline ] pub fn rgn0wa ( & mut self ) -> _RGN0WAW { _RGN0WAW { w : self } } # [ doc = "Bit 1 - Disable read access watch in region[0]" ] # [ inline ] pub fn rgn0ra ( & mut self ) -> _RGN0RAW { _RGN0RAW { w : self } } # [ doc = "Bit 2 - Disable write access watch in region[1]" ] # [ inline ] pub fn rgn1wa ( & mut self ) -> _RGN1WAW { _RGN1WAW { w : self } } # [ doc = "Bit 3 - Disable read access watch in region[1]" ] # [ inline ] pub fn rgn1ra ( & mut self ) -> _RGN1RAW { _RGN1RAW { w : self } } # [ doc = "Bit 4 - Disable write access watch in region[2]" ] # [ inline ] pub fn rgn2wa ( & mut self ) -> _RGN2WAW { _RGN2WAW { w : self } } # [ doc = "Bit 5 - Disable read access watch in region[2]" ] # [ inline ] pub fn rgn2ra ( & mut self ) -> _RGN2RAW { _RGN2RAW { w : self } } # [ doc = "Bit 6 - Disable write access watch in region[3]" ] # [ inline ] pub fn rgn3wa ( & mut self ) -> _RGN3WAW { _RGN3WAW { w : self } } # [ doc = "Bit 7 - Disable read access watch in region[3]" ] # [ inline ] pub fn rgn3ra ( & mut self ) -> _RGN3RAW { _RGN3RAW { w : self } } # [ doc = "Bit 24 - Disable write access watch in PREGION[0]" ] # [ inline ] pub fn prgn0wa ( & mut self ) -> _PRGN0WAW { _PRGN0WAW { w : self } } # [ doc = "Bit 25 - Disable read access watch in PREGION[0]" ] # [ inline ] pub fn prgn0ra ( & mut self ) -> _PRGN0RAW { _PRGN0RAW { w : self } } # [ doc = "Bit 26 - Disable write access watch in PREGION[1]" ] # [ inline ] pub fn prgn1wa ( & mut self ) -> _PRGN1WAW { _PRGN1WAW { w : self } } # [ doc = "Bit 27 - Disable read access watch in PREGION[1]" ] # [ inline ] pub fn prgn1ra ( & mut self ) -> _PRGN1RAW { _PRGN1RAW { w : self } } } } } # [ doc = "Pulse Width Modulation Unit 1" ] pub struct PWM1 { _marker : PhantomData < * const ( ) > } unsafe impl Send for PWM1 { } impl PWM1 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const pwm0 :: RegisterBlock { 0x4002_1000 as * const _ } } impl Deref for PWM1 { type Target = pwm0 :: RegisterBlock ; fn deref ( & self ) -> & pwm0 :: RegisterBlock { unsafe { & * PWM1 :: ptr ( ) } } } # [ doc = "Pulse Width Modulation Unit 2" ] pub struct PWM2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for PWM2 { } impl PWM2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const pwm0 :: RegisterBlock { 0x4002_2000 as * const _ } } impl Deref for PWM2 { type Target = pwm0 :: RegisterBlock ; fn deref ( & self ) -> & pwm0 :: RegisterBlock { unsafe { & * PWM2 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface Master with EasyDMA 2" ] pub struct SPIM2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIM2 { } impl SPIM2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spim0 :: RegisterBlock { 0x4002_3000 as * const _ } } impl Deref for SPIM2 { type Target = spim0 :: RegisterBlock ; fn deref ( & self ) -> & spim0 :: RegisterBlock { unsafe { & * SPIM2 :: ptr ( ) } } } # [ doc = "SPI Slave 2" ] pub struct SPIS2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPIS2 { } impl SPIS2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spis0 :: RegisterBlock { 0x4002_3000 as * const _ } } impl Deref for SPIS2 { type Target = spis0 :: RegisterBlock ; fn deref ( & self ) -> & spis0 :: RegisterBlock { unsafe { & * SPIS2 :: ptr ( ) } } } # [ doc = "Serial Peripheral Interface 2" ] pub struct SPI2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for SPI2 { } impl SPI2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const spi0 :: RegisterBlock { 0x4002_3000 as * const _ } } impl Deref for SPI2 { type Target = spi0 :: RegisterBlock ; fn deref ( & self ) -> & spi0 :: RegisterBlock { unsafe { & * SPI2 :: ptr ( ) } } } # [ doc = "Real time counter 2" ] pub struct RTC2 { _marker : PhantomData < * const ( ) > } unsafe impl Send for RTC2 { } impl RTC2 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const rtc0 :: RegisterBlock { 0x4002_4000 as * const _ } } impl Deref for RTC2 { type Target = rtc0 :: RegisterBlock ; fn deref ( & self ) -> & rtc0 :: RegisterBlock { unsafe { & * RTC2 :: ptr ( ) } } } # [ doc = "Inter-IC Sound" ] pub struct I2S { _marker : PhantomData < * const ( ) > } unsafe impl Send for I2S { } impl I2S { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const i2s :: RegisterBlock { 0x4002_5000 as * const _ } } impl Deref for I2S { type Target = i2s :: RegisterBlock ; fn deref ( & self ) -> & i2s :: RegisterBlock { unsafe { & * I2S :: ptr ( ) } } } # [ doc = "Inter-IC Sound" ] pub mod i2s { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { # [ doc = "0x00 - Starts continuous I2S transfer. Also starts MCK generator when this is enabled." ] pub tasks_start : TASKS_START , # [ doc = "0x04 - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated." ] pub tasks_stop : TASKS_STOP , _reserved0 : [ u8 ; 252usize ] , # [ doc = "0x104 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin." ] pub events_rxptrupd : EVENTS_RXPTRUPD , # [ doc = "0x108 - I2S transfer stopped." ] pub events_stopped : EVENTS_STOPPED , _reserved1 : [ u8 ; 8usize ] , # [ doc = "0x114 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin." ] pub events_txptrupd : EVENTS_TXPTRUPD , _reserved2 : [ u8 ; 488usize ] , # [ doc = "0x300 - Enable or disable interrupt" ] pub inten : INTEN , # [ doc = "0x304 - Enable interrupt" ] pub intenset : INTENSET , # [ doc = "0x308 - Disable interrupt" ] pub intenclr : INTENCLR , _reserved3 : [ u8 ; 500usize ] , # [ doc = "0x500 - Enable I2S module." ] pub enable : ENABLE , } # [ doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled." ] pub struct TASKS_START { register : VolatileCell < u32 > } # [ doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled." ] pub mod tasks_start { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_START { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated." ] pub struct TASKS_STOP { register : VolatileCell < u32 > } # [ doc = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated." ] pub mod tasks_stop { # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: TASKS_STOP { # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin." ] pub struct EVENTS_RXPTRUPD { register : VolatileCell < u32 > } # [ doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin." ] pub mod events_rxptrupd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_RXPTRUPD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "I2S transfer stopped." ] pub struct EVENTS_STOPPED { register : VolatileCell < u32 > } # [ doc = "I2S transfer stopped." ] pub mod events_stopped { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_STOPPED { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin." ] pub struct EVENTS_TXPTRUPD { register : VolatileCell < u32 > } # [ doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin." ] pub mod events_txptrupd { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: EVENTS_TXPTRUPD { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } } } # [ doc = "Enable or disable interrupt" ] pub struct INTEN { register : VolatileCell < u32 > } # [ doc = "Enable or disable interrupt" ] pub mod inten { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTEN { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPTRUPDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXPTRUPDR :: DISABLED => false , RXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXPTRUPDR { match value { false => RXPTRUPDR :: DISABLED , true => RXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXPTRUPDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `TXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPTRUPDR { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXPTRUPDR :: DISABLED => false , TXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXPTRUPDR { match value { false => TXPTRUPDR :: DISABLED , true => TXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXPTRUPDR :: ENABLED } } # [ doc = "Values that can be written to the field `RXPTRUPD`" ] pub enum RXPTRUPDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl RXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXPTRUPDW :: DISABLED => false , RXPTRUPDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _RXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _RXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( RXPTRUPDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( RXPTRUPDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: DISABLED => false , STOPPEDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXPTRUPD`" ] pub enum TXPTRUPDW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl TXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXPTRUPDW :: DISABLED => false , TXPTRUPDW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _TXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _TXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( TXPTRUPDW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( TXPTRUPDW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Enable or disable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & self ) -> RXPTRUPDR { RXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Enable or disable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & self ) -> TXPTRUPDR { TXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Enable or disable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & mut self ) -> _RXPTRUPDW { _RXPTRUPDW { w : self } } # [ doc = "Bit 2 - Enable or disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 5 - Enable or disable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & mut self ) -> _TXPTRUPDW { _TXPTRUPDW { w : self } } } } # [ doc = "Enable interrupt" ] pub struct INTENSET { register : VolatileCell < u32 > } # [ doc = "Enable interrupt" ] pub mod intenset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPTRUPDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXPTRUPDR :: DISABLED => false , RXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXPTRUPDR { match value { false => RXPTRUPDR :: DISABLED , true => RXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXPTRUPDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `TXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPTRUPDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXPTRUPDR :: DISABLED => false , TXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXPTRUPDR { match value { false => TXPTRUPDR :: DISABLED , true => TXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXPTRUPDR :: ENABLED } } # [ doc = "Values that can be written to the field `RXPTRUPD`" ] pub enum RXPTRUPDW { # [ doc = "Enable" ] SET } impl RXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXPTRUPDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _RXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _RXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( RXPTRUPDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Enable" ] SET } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXPTRUPD`" ] pub enum TXPTRUPDW { # [ doc = "Enable" ] SET } impl TXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXPTRUPDW :: SET => true } } } # [ doc = r" Proxy" ] pub struct _TXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _TXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Enable" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( TXPTRUPDW :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Enable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & self ) -> RXPTRUPDR { RXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Enable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & self ) -> TXPTRUPDR { TXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Enable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & mut self ) -> _RXPTRUPDW { _RXPTRUPDW { w : self } } # [ doc = "Bit 2 - Write '1' to Enable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 5 - Write '1' to Enable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & mut self ) -> _TXPTRUPDW { _TXPTRUPDW { w : self } } } } # [ doc = "Disable interrupt" ] pub struct INTENCLR { register : VolatileCell < u32 > } # [ doc = "Disable interrupt" ] pub mod intenclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: INTENCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `RXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum RXPTRUPDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl RXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { RXPTRUPDR :: DISABLED => false , RXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> RXPTRUPDR { match value { false => RXPTRUPDR :: DISABLED , true => RXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == RXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == RXPTRUPDR :: ENABLED } } # [ doc = "Possible values of the field `STOPPED`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum STOPPEDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl STOPPEDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { STOPPEDR :: DISABLED => false , STOPPEDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> STOPPEDR { match value { false => STOPPEDR :: DISABLED , true => STOPPEDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == STOPPEDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == STOPPEDR :: ENABLED } } # [ doc = "Possible values of the field `TXPTRUPD`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum TXPTRUPDR { # [ doc = "Read: Disabled" ] DISABLED , # [ doc = "Read: Enabled" ] ENABLED } impl TXPTRUPDR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { TXPTRUPDR :: DISABLED => false , TXPTRUPDR :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> TXPTRUPDR { match value { false => TXPTRUPDR :: DISABLED , true => TXPTRUPDR :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == TXPTRUPDR :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == TXPTRUPDR :: ENABLED } } # [ doc = "Values that can be written to the field `RXPTRUPD`" ] pub enum RXPTRUPDW { # [ doc = "Disable" ] CLEAR } impl RXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { RXPTRUPDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _RXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _RXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : RXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( RXPTRUPDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `STOPPED`" ] pub enum STOPPEDW { # [ doc = "Disable" ] CLEAR } impl STOPPEDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { STOPPEDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _STOPPEDW < 'a > { w : & 'a mut W , } impl < 'a > _STOPPEDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : STOPPEDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( STOPPEDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `TXPTRUPD`" ] pub enum TXPTRUPDW { # [ doc = "Disable" ] CLEAR } impl TXPTRUPDW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { TXPTRUPDW :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _TXPTRUPDW < 'a > { w : & 'a mut W , } impl < 'a > _TXPTRUPDW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : TXPTRUPDW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( TXPTRUPDW :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 1 - Write '1' to Disable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & self ) -> RXPTRUPDR { RXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & self ) -> STOPPEDR { STOPPEDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Write '1' to Disable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & self ) -> TXPTRUPDR { TXPTRUPDR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 1 - Write '1' to Disable interrupt for RXPTRUPD event" ] # [ inline ] pub fn rxptrupd ( & mut self ) -> _RXPTRUPDW { _RXPTRUPDW { w : self } } # [ doc = "Bit 2 - Write '1' to Disable interrupt for STOPPED event" ] # [ inline ] pub fn stopped ( & mut self ) -> _STOPPEDW { _STOPPEDW { w : self } } # [ doc = "Bit 5 - Write '1' to Disable interrupt for TXPTRUPD event" ] # [ inline ] pub fn txptrupd ( & mut self ) -> _TXPTRUPDW { _TXPTRUPDW { w : self } } } } # [ doc = "Enable I2S module." ] pub struct ENABLE { register : VolatileCell < u32 > } # [ doc = "Enable I2S module." ] pub mod enable { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: ENABLE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `ENABLE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum ENABLER { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { ENABLER :: DISABLED => false , ENABLER :: ENABLED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> ENABLER { match value { false => ENABLER :: DISABLED , true => ENABLER :: ENABLED , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == ENABLER :: DISABLED } # [ doc = "Checks if the value of the field is `ENABLED`" ] # [ inline ] pub fn is_enabled ( & self ) -> bool { * self == ENABLER :: ENABLED } } # [ doc = "Values that can be written to the field `ENABLE`" ] pub enum ENABLEW { # [ doc = "Disable" ] DISABLED , # [ doc = "Enable" ] ENABLED } impl ENABLEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { ENABLEW :: DISABLED => false , ENABLEW :: ENABLED => true } } } # [ doc = r" Proxy" ] pub struct _ENABLEW < 'a > { w : & 'a mut W , } impl < 'a > _ENABLEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : ENABLEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Disable" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: DISABLED ) } # [ doc = "Enable" ] # [ inline ] pub fn enabled ( self ) -> & 'a mut W { self . variant ( ENABLEW :: ENABLED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Enable I2S module." ] # [ inline ] pub fn enable ( & self ) -> ENABLER { ENABLER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Enable I2S module." ] # [ inline ] pub fn enable ( & mut self ) -> _ENABLEW { _ENABLEW { w : self } } } } } # [ doc = "GPIO Port 1" ] pub struct P0 { _marker : PhantomData < * const ( ) > } unsafe impl Send for P0 { } impl P0 { # [ doc = r" Returns a pointer to the register block" ] pub fn ptr ( ) -> * const p0 :: RegisterBlock { 0x5000_0000 as * const _ } } impl Deref for P0 { type Target = p0 :: RegisterBlock ; fn deref ( & self ) -> & p0 :: RegisterBlock { unsafe { & * P0 :: ptr ( ) } } } # [ doc = "GPIO Port 1" ] pub mod p0 { use vcell :: VolatileCell ; # [ doc = r" Register block" ] # [ repr ( C ) ] pub struct RegisterBlock { _reserved0 : [ u8 ; 1284usize ] , # [ doc = "0x504 - Write GPIO port" ] pub out : OUT , # [ doc = "0x508 - Set individual bits in GPIO port" ] pub outset : OUTSET , # [ doc = "0x50c - Clear individual bits in GPIO port" ] pub outclr : OUTCLR , # [ doc = "0x510 - Read GPIO port" ] pub in_ : IN , # [ doc = "0x514 - Direction of GPIO pins" ] pub dir : DIR , # [ doc = "0x518 - DIR set register" ] pub dirset : DIRSET , # [ doc = "0x51c - DIR clear register" ] pub dirclr : DIRCLR , # [ doc = "0x520 - Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers" ] pub latch : LATCH , # [ doc = "0x524 - Select between default DETECT signal behaviour and LDETECT mode" ] pub detectmode : DETECTMODE , _reserved1 : [ u8 ; 472usize ] , # [ doc = "0x700 - Description collection[0]: Configuration of GPIO pins" ] pub pin_cnf : [ PIN_CNF ; 32 ] , } # [ doc = "Write GPIO port" ] pub struct OUT { register : VolatileCell < u32 > } # [ doc = "Write GPIO port" ] pub mod out { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: OUT { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: LOW => false , PIN0R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: LOW , true => PIN0R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN0R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN0R :: HIGH } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: LOW => false , PIN1R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: LOW , true => PIN1R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN1R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN1R :: HIGH } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: LOW => false , PIN2R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: LOW , true => PIN2R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN2R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN2R :: HIGH } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: LOW => false , PIN3R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: LOW , true => PIN3R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN3R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN3R :: HIGH } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: LOW => false , PIN4R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: LOW , true => PIN4R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN4R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN4R :: HIGH } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: LOW => false , PIN5R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: LOW , true => PIN5R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN5R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN5R :: HIGH } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: LOW => false , PIN6R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: LOW , true => PIN6R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN6R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN6R :: HIGH } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: LOW => false , PIN7R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: LOW , true => PIN7R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN7R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN7R :: HIGH } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: LOW => false , PIN8R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: LOW , true => PIN8R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN8R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN8R :: HIGH } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: LOW => false , PIN9R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: LOW , true => PIN9R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN9R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN9R :: HIGH } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: LOW => false , PIN10R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: LOW , true => PIN10R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN10R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN10R :: HIGH } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: LOW => false , PIN11R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: LOW , true => PIN11R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN11R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN11R :: HIGH } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: LOW => false , PIN12R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: LOW , true => PIN12R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN12R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN12R :: HIGH } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: LOW => false , PIN13R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: LOW , true => PIN13R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN13R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN13R :: HIGH } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: LOW => false , PIN14R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: LOW , true => PIN14R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN14R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN14R :: HIGH } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: LOW => false , PIN15R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: LOW , true => PIN15R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN15R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN15R :: HIGH } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: LOW => false , PIN16R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: LOW , true => PIN16R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN16R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN16R :: HIGH } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: LOW => false , PIN17R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: LOW , true => PIN17R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN17R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN17R :: HIGH } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: LOW => false , PIN18R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: LOW , true => PIN18R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN18R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN18R :: HIGH } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: LOW => false , PIN19R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: LOW , true => PIN19R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN19R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN19R :: HIGH } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: LOW => false , PIN20R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: LOW , true => PIN20R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN20R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN20R :: HIGH } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: LOW => false , PIN21R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: LOW , true => PIN21R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN21R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN21R :: HIGH } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: LOW => false , PIN22R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: LOW , true => PIN22R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN22R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN22R :: HIGH } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: LOW => false , PIN23R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: LOW , true => PIN23R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN23R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN23R :: HIGH } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: LOW => false , PIN24R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: LOW , true => PIN24R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN24R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN24R :: HIGH } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: LOW => false , PIN25R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: LOW , true => PIN25R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN25R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN25R :: HIGH } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: LOW => false , PIN26R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: LOW , true => PIN26R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN26R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN26R :: HIGH } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: LOW => false , PIN27R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: LOW , true => PIN27R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN27R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN27R :: HIGH } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: LOW => false , PIN28R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: LOW , true => PIN28R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN28R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN28R :: HIGH } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: LOW => false , PIN29R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: LOW , true => PIN29R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN29R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN29R :: HIGH } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: LOW => false , PIN30R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: LOW , true => PIN30R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN30R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN30R :: HIGH } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: LOW => false , PIN31R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: LOW , true => PIN31R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN31R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN31R :: HIGH } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: LOW => false , PIN0W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN0W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN0W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: LOW => false , PIN1W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN1W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN1W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: LOW => false , PIN2W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN2W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN2W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: LOW => false , PIN3W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN3W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN3W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: LOW => false , PIN4W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN4W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN4W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: LOW => false , PIN5W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN5W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN5W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: LOW => false , PIN6W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN6W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN6W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: LOW => false , PIN7W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN7W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN7W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: LOW => false , PIN8W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN8W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN8W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: LOW => false , PIN9W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN9W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN9W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: LOW => false , PIN10W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN10W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN10W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: LOW => false , PIN11W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN11W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN11W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: LOW => false , PIN12W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN12W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN12W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: LOW => false , PIN13W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN13W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN13W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: LOW => false , PIN14W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN14W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN14W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: LOW => false , PIN15W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN15W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN15W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: LOW => false , PIN16W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN16W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN16W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: LOW => false , PIN17W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN17W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN17W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: LOW => false , PIN18W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN18W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN18W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: LOW => false , PIN19W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN19W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN19W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: LOW => false , PIN20W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN20W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN20W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: LOW => false , PIN21W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN21W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN21W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: LOW => false , PIN22W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN22W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN22W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: LOW => false , PIN23W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN23W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN23W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: LOW => false , PIN24W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN24W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN24W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: LOW => false , PIN25W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN25W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN25W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: LOW => false , PIN26W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN26W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN26W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: LOW => false , PIN27W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN27W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN27W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: LOW => false , PIN28W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN28W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN28W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: LOW => false , PIN29W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN29W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN29W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: LOW => false , PIN30W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN30W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN30W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Pin driver is low" ] LOW , # [ doc = "Pin driver is high" ] HIGH } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: LOW => false , PIN31W :: HIGH => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin driver is low" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( PIN31W :: LOW ) } # [ doc = "Pin driver is high" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( PIN31W :: HIGH ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "Set individual bits in GPIO port" ] pub struct OUTSET { register : VolatileCell < u32 > } # [ doc = "Set individual bits in GPIO port" ] pub mod outset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: OUTSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: LOW => false , PIN0R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: LOW , true => PIN0R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN0R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN0R :: HIGH } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: LOW => false , PIN1R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: LOW , true => PIN1R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN1R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN1R :: HIGH } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: LOW => false , PIN2R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: LOW , true => PIN2R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN2R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN2R :: HIGH } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: LOW => false , PIN3R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: LOW , true => PIN3R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN3R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN3R :: HIGH } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: LOW => false , PIN4R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: LOW , true => PIN4R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN4R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN4R :: HIGH } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: LOW => false , PIN5R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: LOW , true => PIN5R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN5R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN5R :: HIGH } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: LOW => false , PIN6R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: LOW , true => PIN6R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN6R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN6R :: HIGH } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: LOW => false , PIN7R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: LOW , true => PIN7R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN7R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN7R :: HIGH } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: LOW => false , PIN8R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: LOW , true => PIN8R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN8R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN8R :: HIGH } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: LOW => false , PIN9R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: LOW , true => PIN9R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN9R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN9R :: HIGH } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: LOW => false , PIN10R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: LOW , true => PIN10R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN10R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN10R :: HIGH } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: LOW => false , PIN11R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: LOW , true => PIN11R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN11R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN11R :: HIGH } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: LOW => false , PIN12R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: LOW , true => PIN12R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN12R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN12R :: HIGH } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: LOW => false , PIN13R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: LOW , true => PIN13R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN13R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN13R :: HIGH } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: LOW => false , PIN14R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: LOW , true => PIN14R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN14R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN14R :: HIGH } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: LOW => false , PIN15R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: LOW , true => PIN15R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN15R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN15R :: HIGH } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: LOW => false , PIN16R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: LOW , true => PIN16R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN16R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN16R :: HIGH } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: LOW => false , PIN17R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: LOW , true => PIN17R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN17R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN17R :: HIGH } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: LOW => false , PIN18R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: LOW , true => PIN18R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN18R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN18R :: HIGH } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: LOW => false , PIN19R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: LOW , true => PIN19R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN19R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN19R :: HIGH } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: LOW => false , PIN20R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: LOW , true => PIN20R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN20R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN20R :: HIGH } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: LOW => false , PIN21R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: LOW , true => PIN21R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN21R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN21R :: HIGH } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: LOW => false , PIN22R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: LOW , true => PIN22R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN22R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN22R :: HIGH } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: LOW => false , PIN23R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: LOW , true => PIN23R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN23R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN23R :: HIGH } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: LOW => false , PIN24R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: LOW , true => PIN24R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN24R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN24R :: HIGH } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: LOW => false , PIN25R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: LOW , true => PIN25R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN25R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN25R :: HIGH } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: LOW => false , PIN26R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: LOW , true => PIN26R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN26R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN26R :: HIGH } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: LOW => false , PIN27R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: LOW , true => PIN27R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN27R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN27R :: HIGH } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: LOW => false , PIN28R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: LOW , true => PIN28R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN28R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN28R :: HIGH } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: LOW => false , PIN29R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: LOW , true => PIN29R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN29R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN29R :: HIGH } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: LOW => false , PIN30R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: LOW , true => PIN30R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN30R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN30R :: HIGH } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: LOW => false , PIN31R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: LOW , true => PIN31R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN31R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN31R :: HIGH } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN6W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN7W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN8W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN9W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN10W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN11W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN12W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN13W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN14W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN15W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN16W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN17W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN18W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN19W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN20W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN21W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN22W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN23W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN24W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN25W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN26W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN27W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN28W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN29W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN30W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] SET } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN31W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "Clear individual bits in GPIO port" ] pub struct OUTCLR { register : VolatileCell < u32 > } # [ doc = "Clear individual bits in GPIO port" ] pub mod outclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: OUTCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: LOW => false , PIN0R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: LOW , true => PIN0R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN0R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN0R :: HIGH } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: LOW => false , PIN1R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: LOW , true => PIN1R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN1R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN1R :: HIGH } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: LOW => false , PIN2R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: LOW , true => PIN2R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN2R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN2R :: HIGH } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: LOW => false , PIN3R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: LOW , true => PIN3R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN3R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN3R :: HIGH } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: LOW => false , PIN4R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: LOW , true => PIN4R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN4R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN4R :: HIGH } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: LOW => false , PIN5R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: LOW , true => PIN5R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN5R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN5R :: HIGH } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: LOW => false , PIN6R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: LOW , true => PIN6R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN6R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN6R :: HIGH } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: LOW => false , PIN7R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: LOW , true => PIN7R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN7R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN7R :: HIGH } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: LOW => false , PIN8R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: LOW , true => PIN8R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN8R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN8R :: HIGH } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: LOW => false , PIN9R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: LOW , true => PIN9R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN9R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN9R :: HIGH } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: LOW => false , PIN10R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: LOW , true => PIN10R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN10R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN10R :: HIGH } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: LOW => false , PIN11R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: LOW , true => PIN11R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN11R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN11R :: HIGH } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: LOW => false , PIN12R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: LOW , true => PIN12R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN12R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN12R :: HIGH } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: LOW => false , PIN13R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: LOW , true => PIN13R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN13R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN13R :: HIGH } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: LOW => false , PIN14R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: LOW , true => PIN14R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN14R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN14R :: HIGH } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: LOW => false , PIN15R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: LOW , true => PIN15R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN15R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN15R :: HIGH } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: LOW => false , PIN16R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: LOW , true => PIN16R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN16R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN16R :: HIGH } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: LOW => false , PIN17R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: LOW , true => PIN17R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN17R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN17R :: HIGH } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: LOW => false , PIN18R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: LOW , true => PIN18R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN18R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN18R :: HIGH } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: LOW => false , PIN19R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: LOW , true => PIN19R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN19R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN19R :: HIGH } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: LOW => false , PIN20R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: LOW , true => PIN20R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN20R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN20R :: HIGH } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: LOW => false , PIN21R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: LOW , true => PIN21R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN21R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN21R :: HIGH } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: LOW => false , PIN22R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: LOW , true => PIN22R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN22R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN22R :: HIGH } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: LOW => false , PIN23R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: LOW , true => PIN23R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN23R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN23R :: HIGH } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: LOW => false , PIN24R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: LOW , true => PIN24R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN24R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN24R :: HIGH } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: LOW => false , PIN25R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: LOW , true => PIN25R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN25R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN25R :: HIGH } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: LOW => false , PIN26R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: LOW , true => PIN26R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN26R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN26R :: HIGH } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: LOW => false , PIN27R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: LOW , true => PIN27R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN27R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN27R :: HIGH } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: LOW => false , PIN28R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: LOW , true => PIN28R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN28R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN28R :: HIGH } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: LOW => false , PIN29R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: LOW , true => PIN29R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN29R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN29R :: HIGH } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: LOW => false , PIN30R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: LOW , true => PIN30R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN30R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN30R :: HIGH } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Read: pin driver is low" ] LOW , # [ doc = "Read: pin driver is high" ] HIGH } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: LOW => false , PIN31R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: LOW , true => PIN31R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN31R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN31R :: HIGH } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN6W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN7W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN8W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN9W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN10W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN11W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN12W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN13W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN14W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN15W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN16W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN17W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN18W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN19W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN20W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN21W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN22W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN23W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN24W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN25W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN26W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN27W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN28W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN29W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN30W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] CLEAR } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN31W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "Read GPIO port" ] pub struct IN { register : VolatileCell < u32 > } # [ doc = "Read GPIO port" ] pub mod in_ { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } impl super :: IN { # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: LOW => false , PIN0R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: LOW , true => PIN0R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN0R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN0R :: HIGH } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: LOW => false , PIN1R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: LOW , true => PIN1R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN1R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN1R :: HIGH } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: LOW => false , PIN2R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: LOW , true => PIN2R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN2R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN2R :: HIGH } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: LOW => false , PIN3R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: LOW , true => PIN3R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN3R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN3R :: HIGH } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: LOW => false , PIN4R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: LOW , true => PIN4R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN4R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN4R :: HIGH } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: LOW => false , PIN5R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: LOW , true => PIN5R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN5R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN5R :: HIGH } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: LOW => false , PIN6R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: LOW , true => PIN6R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN6R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN6R :: HIGH } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: LOW => false , PIN7R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: LOW , true => PIN7R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN7R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN7R :: HIGH } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: LOW => false , PIN8R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: LOW , true => PIN8R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN8R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN8R :: HIGH } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: LOW => false , PIN9R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: LOW , true => PIN9R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN9R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN9R :: HIGH } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: LOW => false , PIN10R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: LOW , true => PIN10R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN10R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN10R :: HIGH } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: LOW => false , PIN11R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: LOW , true => PIN11R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN11R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN11R :: HIGH } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: LOW => false , PIN12R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: LOW , true => PIN12R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN12R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN12R :: HIGH } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: LOW => false , PIN13R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: LOW , true => PIN13R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN13R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN13R :: HIGH } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: LOW => false , PIN14R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: LOW , true => PIN14R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN14R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN14R :: HIGH } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: LOW => false , PIN15R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: LOW , true => PIN15R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN15R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN15R :: HIGH } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: LOW => false , PIN16R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: LOW , true => PIN16R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN16R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN16R :: HIGH } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: LOW => false , PIN17R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: LOW , true => PIN17R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN17R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN17R :: HIGH } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: LOW => false , PIN18R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: LOW , true => PIN18R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN18R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN18R :: HIGH } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: LOW => false , PIN19R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: LOW , true => PIN19R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN19R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN19R :: HIGH } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: LOW => false , PIN20R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: LOW , true => PIN20R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN20R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN20R :: HIGH } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: LOW => false , PIN21R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: LOW , true => PIN21R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN21R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN21R :: HIGH } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: LOW => false , PIN22R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: LOW , true => PIN22R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN22R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN22R :: HIGH } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: LOW => false , PIN23R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: LOW , true => PIN23R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN23R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN23R :: HIGH } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: LOW => false , PIN24R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: LOW , true => PIN24R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN24R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN24R :: HIGH } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: LOW => false , PIN25R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: LOW , true => PIN25R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN25R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN25R :: HIGH } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: LOW => false , PIN26R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: LOW , true => PIN26R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN26R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN26R :: HIGH } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: LOW => false , PIN27R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: LOW , true => PIN27R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN27R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN27R :: HIGH } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: LOW => false , PIN28R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: LOW , true => PIN28R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN28R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN28R :: HIGH } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: LOW => false , PIN29R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: LOW , true => PIN29R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN29R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN29R :: HIGH } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: LOW => false , PIN30R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: LOW , true => PIN30R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN30R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN30R :: HIGH } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Pin input is low" ] LOW , # [ doc = "Pin input is high" ] HIGH } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: LOW => false , PIN31R :: HIGH => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: LOW , true => PIN31R :: HIGH , } } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == PIN31R :: LOW } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == PIN31R :: HIGH } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } } # [ doc = "Direction of GPIO pins" ] pub struct DIR { register : VolatileCell < u32 > } # [ doc = "Direction of GPIO pins" ] pub mod dir { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DIR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: INPUT => false , PIN0R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: INPUT , true => PIN0R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN0R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN0R :: OUTPUT } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: INPUT => false , PIN1R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: INPUT , true => PIN1R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN1R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN1R :: OUTPUT } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: INPUT => false , PIN2R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: INPUT , true => PIN2R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN2R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN2R :: OUTPUT } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: INPUT => false , PIN3R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: INPUT , true => PIN3R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN3R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN3R :: OUTPUT } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: INPUT => false , PIN4R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: INPUT , true => PIN4R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN4R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN4R :: OUTPUT } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: INPUT => false , PIN5R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: INPUT , true => PIN5R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN5R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN5R :: OUTPUT } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: INPUT => false , PIN6R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: INPUT , true => PIN6R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN6R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN6R :: OUTPUT } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: INPUT => false , PIN7R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: INPUT , true => PIN7R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN7R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN7R :: OUTPUT } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: INPUT => false , PIN8R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: INPUT , true => PIN8R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN8R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN8R :: OUTPUT } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: INPUT => false , PIN9R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: INPUT , true => PIN9R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN9R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN9R :: OUTPUT } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: INPUT => false , PIN10R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: INPUT , true => PIN10R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN10R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN10R :: OUTPUT } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: INPUT => false , PIN11R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: INPUT , true => PIN11R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN11R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN11R :: OUTPUT } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: INPUT => false , PIN12R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: INPUT , true => PIN12R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN12R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN12R :: OUTPUT } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: INPUT => false , PIN13R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: INPUT , true => PIN13R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN13R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN13R :: OUTPUT } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: INPUT => false , PIN14R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: INPUT , true => PIN14R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN14R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN14R :: OUTPUT } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: INPUT => false , PIN15R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: INPUT , true => PIN15R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN15R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN15R :: OUTPUT } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: INPUT => false , PIN16R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: INPUT , true => PIN16R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN16R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN16R :: OUTPUT } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: INPUT => false , PIN17R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: INPUT , true => PIN17R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN17R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN17R :: OUTPUT } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: INPUT => false , PIN18R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: INPUT , true => PIN18R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN18R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN18R :: OUTPUT } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: INPUT => false , PIN19R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: INPUT , true => PIN19R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN19R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN19R :: OUTPUT } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: INPUT => false , PIN20R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: INPUT , true => PIN20R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN20R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN20R :: OUTPUT } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: INPUT => false , PIN21R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: INPUT , true => PIN21R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN21R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN21R :: OUTPUT } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: INPUT => false , PIN22R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: INPUT , true => PIN22R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN22R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN22R :: OUTPUT } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: INPUT => false , PIN23R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: INPUT , true => PIN23R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN23R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN23R :: OUTPUT } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: INPUT => false , PIN24R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: INPUT , true => PIN24R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN24R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN24R :: OUTPUT } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: INPUT => false , PIN25R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: INPUT , true => PIN25R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN25R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN25R :: OUTPUT } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: INPUT => false , PIN26R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: INPUT , true => PIN26R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN26R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN26R :: OUTPUT } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: INPUT => false , PIN27R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: INPUT , true => PIN27R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN27R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN27R :: OUTPUT } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: INPUT => false , PIN28R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: INPUT , true => PIN28R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN28R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN28R :: OUTPUT } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: INPUT => false , PIN29R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: INPUT , true => PIN29R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN29R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN29R :: OUTPUT } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: INPUT => false , PIN30R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: INPUT , true => PIN30R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN30R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN30R :: OUTPUT } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: INPUT => false , PIN31R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: INPUT , true => PIN31R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN31R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN31R :: OUTPUT } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: INPUT => false , PIN0W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN0W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN0W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: INPUT => false , PIN1W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN1W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN1W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: INPUT => false , PIN2W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN2W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN2W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: INPUT => false , PIN3W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN3W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN3W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: INPUT => false , PIN4W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN4W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN4W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: INPUT => false , PIN5W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN5W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN5W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: INPUT => false , PIN6W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN6W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN6W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: INPUT => false , PIN7W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN7W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN7W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: INPUT => false , PIN8W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN8W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN8W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: INPUT => false , PIN9W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN9W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN9W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: INPUT => false , PIN10W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN10W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN10W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: INPUT => false , PIN11W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN11W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN11W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: INPUT => false , PIN12W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN12W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN12W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: INPUT => false , PIN13W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN13W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN13W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: INPUT => false , PIN14W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN14W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN14W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: INPUT => false , PIN15W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN15W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN15W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: INPUT => false , PIN16W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN16W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN16W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: INPUT => false , PIN17W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN17W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN17W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: INPUT => false , PIN18W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN18W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN18W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: INPUT => false , PIN19W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN19W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN19W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: INPUT => false , PIN20W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN20W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN20W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: INPUT => false , PIN21W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN21W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN21W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: INPUT => false , PIN22W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN22W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN22W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: INPUT => false , PIN23W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN23W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN23W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: INPUT => false , PIN24W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN24W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN24W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: INPUT => false , PIN25W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN25W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN25W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: INPUT => false , PIN26W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN26W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN26W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: INPUT => false , PIN27W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN27W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN27W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: INPUT => false , PIN28W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN28W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN28W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: INPUT => false , PIN29W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN29W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN29W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: INPUT => false , PIN30W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN30W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN30W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Pin set as input" ] INPUT , # [ doc = "Pin set as output" ] OUTPUT } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: INPUT => false , PIN31W :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Pin set as input" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( PIN31W :: INPUT ) } # [ doc = "Pin set as output" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( PIN31W :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "DIR set register" ] pub struct DIRSET { register : VolatileCell < u32 > } # [ doc = "DIR set register" ] pub mod dirset { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DIRSET { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: INPUT => false , PIN0R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: INPUT , true => PIN0R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN0R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN0R :: OUTPUT } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: INPUT => false , PIN1R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: INPUT , true => PIN1R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN1R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN1R :: OUTPUT } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: INPUT => false , PIN2R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: INPUT , true => PIN2R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN2R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN2R :: OUTPUT } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: INPUT => false , PIN3R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: INPUT , true => PIN3R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN3R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN3R :: OUTPUT } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: INPUT => false , PIN4R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: INPUT , true => PIN4R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN4R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN4R :: OUTPUT } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: INPUT => false , PIN5R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: INPUT , true => PIN5R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN5R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN5R :: OUTPUT } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: INPUT => false , PIN6R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: INPUT , true => PIN6R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN6R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN6R :: OUTPUT } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: INPUT => false , PIN7R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: INPUT , true => PIN7R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN7R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN7R :: OUTPUT } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: INPUT => false , PIN8R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: INPUT , true => PIN8R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN8R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN8R :: OUTPUT } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: INPUT => false , PIN9R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: INPUT , true => PIN9R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN9R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN9R :: OUTPUT } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: INPUT => false , PIN10R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: INPUT , true => PIN10R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN10R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN10R :: OUTPUT } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: INPUT => false , PIN11R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: INPUT , true => PIN11R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN11R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN11R :: OUTPUT } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: INPUT => false , PIN12R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: INPUT , true => PIN12R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN12R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN12R :: OUTPUT } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: INPUT => false , PIN13R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: INPUT , true => PIN13R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN13R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN13R :: OUTPUT } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: INPUT => false , PIN14R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: INPUT , true => PIN14R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN14R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN14R :: OUTPUT } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: INPUT => false , PIN15R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: INPUT , true => PIN15R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN15R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN15R :: OUTPUT } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: INPUT => false , PIN16R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: INPUT , true => PIN16R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN16R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN16R :: OUTPUT } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: INPUT => false , PIN17R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: INPUT , true => PIN17R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN17R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN17R :: OUTPUT } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: INPUT => false , PIN18R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: INPUT , true => PIN18R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN18R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN18R :: OUTPUT } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: INPUT => false , PIN19R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: INPUT , true => PIN19R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN19R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN19R :: OUTPUT } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: INPUT => false , PIN20R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: INPUT , true => PIN20R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN20R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN20R :: OUTPUT } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: INPUT => false , PIN21R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: INPUT , true => PIN21R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN21R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN21R :: OUTPUT } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: INPUT => false , PIN22R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: INPUT , true => PIN22R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN22R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN22R :: OUTPUT } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: INPUT => false , PIN23R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: INPUT , true => PIN23R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN23R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN23R :: OUTPUT } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: INPUT => false , PIN24R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: INPUT , true => PIN24R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN24R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN24R :: OUTPUT } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: INPUT => false , PIN25R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: INPUT , true => PIN25R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN25R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN25R :: OUTPUT } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: INPUT => false , PIN26R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: INPUT , true => PIN26R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN26R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN26R :: OUTPUT } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: INPUT => false , PIN27R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: INPUT , true => PIN27R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN27R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN27R :: OUTPUT } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: INPUT => false , PIN28R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: INPUT , true => PIN28R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN28R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN28R :: OUTPUT } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: INPUT => false , PIN29R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: INPUT , true => PIN29R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN29R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN29R :: OUTPUT } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: INPUT => false , PIN30R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: INPUT , true => PIN30R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN30R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN30R :: OUTPUT } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: INPUT => false , PIN31R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: INPUT , true => PIN31R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN31R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN31R :: OUTPUT } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN0W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN1W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN2W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN3W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN4W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN5W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN6W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN7W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN8W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN9W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN10W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN11W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN12W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN13W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN14W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN15W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN16W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN17W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN18W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN19W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN20W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN21W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN22W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN23W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN24W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN25W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN26W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN27W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN28W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN29W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN30W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] SET } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: SET => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect" ] # [ inline ] pub fn set ( self ) -> & 'a mut W { self . variant ( PIN31W :: SET ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Set as output pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Set as output pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Set as output pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Set as output pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Set as output pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Set as output pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Set as output pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Set as output pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Set as output pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Set as output pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Set as output pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Set as output pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Set as output pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Set as output pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Set as output pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Set as output pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Set as output pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Set as output pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Set as output pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Set as output pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Set as output pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Set as output pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Set as output pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Set as output pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Set as output pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Set as output pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Set as output pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Set as output pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Set as output pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Set as output pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Set as output pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Set as output pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Set as output pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Set as output pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Set as output pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Set as output pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Set as output pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Set as output pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Set as output pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Set as output pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Set as output pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Set as output pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Set as output pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Set as output pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Set as output pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Set as output pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Set as output pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Set as output pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Set as output pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Set as output pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Set as output pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Set as output pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Set as output pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Set as output pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Set as output pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Set as output pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Set as output pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Set as output pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Set as output pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Set as output pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Set as output pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Set as output pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Set as output pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Set as output pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "DIR clear register" ] pub struct DIRCLR { register : VolatileCell < u32 > } # [ doc = "DIR clear register" ] pub mod dirclr { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DIRCLR { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: INPUT => false , PIN0R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: INPUT , true => PIN0R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN0R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN0R :: OUTPUT } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: INPUT => false , PIN1R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: INPUT , true => PIN1R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN1R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN1R :: OUTPUT } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: INPUT => false , PIN2R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: INPUT , true => PIN2R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN2R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN2R :: OUTPUT } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: INPUT => false , PIN3R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: INPUT , true => PIN3R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN3R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN3R :: OUTPUT } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: INPUT => false , PIN4R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: INPUT , true => PIN4R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN4R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN4R :: OUTPUT } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: INPUT => false , PIN5R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: INPUT , true => PIN5R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN5R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN5R :: OUTPUT } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: INPUT => false , PIN6R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: INPUT , true => PIN6R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN6R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN6R :: OUTPUT } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: INPUT => false , PIN7R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: INPUT , true => PIN7R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN7R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN7R :: OUTPUT } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: INPUT => false , PIN8R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: INPUT , true => PIN8R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN8R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN8R :: OUTPUT } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: INPUT => false , PIN9R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: INPUT , true => PIN9R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN9R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN9R :: OUTPUT } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: INPUT => false , PIN10R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: INPUT , true => PIN10R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN10R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN10R :: OUTPUT } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: INPUT => false , PIN11R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: INPUT , true => PIN11R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN11R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN11R :: OUTPUT } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: INPUT => false , PIN12R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: INPUT , true => PIN12R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN12R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN12R :: OUTPUT } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: INPUT => false , PIN13R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: INPUT , true => PIN13R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN13R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN13R :: OUTPUT } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: INPUT => false , PIN14R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: INPUT , true => PIN14R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN14R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN14R :: OUTPUT } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: INPUT => false , PIN15R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: INPUT , true => PIN15R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN15R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN15R :: OUTPUT } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: INPUT => false , PIN16R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: INPUT , true => PIN16R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN16R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN16R :: OUTPUT } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: INPUT => false , PIN17R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: INPUT , true => PIN17R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN17R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN17R :: OUTPUT } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: INPUT => false , PIN18R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: INPUT , true => PIN18R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN18R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN18R :: OUTPUT } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: INPUT => false , PIN19R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: INPUT , true => PIN19R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN19R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN19R :: OUTPUT } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: INPUT => false , PIN20R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: INPUT , true => PIN20R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN20R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN20R :: OUTPUT } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: INPUT => false , PIN21R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: INPUT , true => PIN21R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN21R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN21R :: OUTPUT } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: INPUT => false , PIN22R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: INPUT , true => PIN22R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN22R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN22R :: OUTPUT } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: INPUT => false , PIN23R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: INPUT , true => PIN23R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN23R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN23R :: OUTPUT } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: INPUT => false , PIN24R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: INPUT , true => PIN24R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN24R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN24R :: OUTPUT } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: INPUT => false , PIN25R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: INPUT , true => PIN25R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN25R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN25R :: OUTPUT } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: INPUT => false , PIN26R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: INPUT , true => PIN26R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN26R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN26R :: OUTPUT } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: INPUT => false , PIN27R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: INPUT , true => PIN27R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN27R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN27R :: OUTPUT } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: INPUT => false , PIN28R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: INPUT , true => PIN28R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN28R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN28R :: OUTPUT } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: INPUT => false , PIN29R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: INPUT , true => PIN29R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN29R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN29R :: OUTPUT } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: INPUT => false , PIN30R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: INPUT , true => PIN30R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN30R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN30R :: OUTPUT } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Read: pin set as input" ] INPUT , # [ doc = "Read: pin set as output" ] OUTPUT } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: INPUT => false , PIN31R :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: INPUT , true => PIN31R :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == PIN31R :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == PIN31R :: OUTPUT } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN0W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN1W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN2W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN3W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN4W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN5W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN6W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN7W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN8W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN9W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN10W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN11W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN12W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN13W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN14W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN15W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN16W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN17W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN18W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN19W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN20W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN21W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN22W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN23W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN24W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN25W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN26W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN27W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN28W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN29W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN30W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] CLEAR } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: CLEAR => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect" ] # [ inline ] pub fn clear ( self ) -> & 'a mut W { self . variant ( PIN31W :: CLEAR ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Set as input pin 0" ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Set as input pin 1" ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Set as input pin 2" ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Set as input pin 3" ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Set as input pin 4" ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Set as input pin 5" ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Set as input pin 6" ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Set as input pin 7" ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Set as input pin 8" ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Set as input pin 9" ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Set as input pin 10" ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Set as input pin 11" ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Set as input pin 12" ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Set as input pin 13" ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Set as input pin 14" ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Set as input pin 15" ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Set as input pin 16" ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Set as input pin 17" ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Set as input pin 18" ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Set as input pin 19" ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Set as input pin 20" ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Set as input pin 21" ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Set as input pin 22" ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Set as input pin 23" ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Set as input pin 24" ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Set as input pin 25" ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Set as input pin 26" ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Set as input pin 27" ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Set as input pin 28" ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Set as input pin 29" ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Set as input pin 30" ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Set as input pin 31" ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Set as input pin 0" ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Set as input pin 1" ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Set as input pin 2" ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Set as input pin 3" ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Set as input pin 4" ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Set as input pin 5" ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Set as input pin 6" ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Set as input pin 7" ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Set as input pin 8" ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Set as input pin 9" ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Set as input pin 10" ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Set as input pin 11" ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Set as input pin 12" ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Set as input pin 13" ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Set as input pin 14" ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Set as input pin 15" ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Set as input pin 16" ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Set as input pin 17" ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Set as input pin 18" ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Set as input pin 19" ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Set as input pin 20" ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Set as input pin 21" ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Set as input pin 22" ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Set as input pin 23" ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Set as input pin 24" ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Set as input pin 25" ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Set as input pin 26" ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Set as input pin 27" ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Set as input pin 28" ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Set as input pin 29" ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Set as input pin 30" ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Set as input pin 31" ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers" ] pub struct LATCH { register : VolatileCell < u32 > } # [ doc = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers" ] pub mod latch { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: LATCH { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `PIN0`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN0R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN0R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN0R :: NOTLATCHED => false , PIN0R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN0R { match value { false => PIN0R :: NOTLATCHED , true => PIN0R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN0R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN0R :: LATCHED } } # [ doc = "Possible values of the field `PIN1`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN1R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN1R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN1R :: NOTLATCHED => false , PIN1R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN1R { match value { false => PIN1R :: NOTLATCHED , true => PIN1R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN1R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN1R :: LATCHED } } # [ doc = "Possible values of the field `PIN2`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN2R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN2R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN2R :: NOTLATCHED => false , PIN2R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN2R { match value { false => PIN2R :: NOTLATCHED , true => PIN2R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN2R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN2R :: LATCHED } } # [ doc = "Possible values of the field `PIN3`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN3R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN3R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN3R :: NOTLATCHED => false , PIN3R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN3R { match value { false => PIN3R :: NOTLATCHED , true => PIN3R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN3R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN3R :: LATCHED } } # [ doc = "Possible values of the field `PIN4`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN4R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN4R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN4R :: NOTLATCHED => false , PIN4R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN4R { match value { false => PIN4R :: NOTLATCHED , true => PIN4R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN4R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN4R :: LATCHED } } # [ doc = "Possible values of the field `PIN5`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN5R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN5R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN5R :: NOTLATCHED => false , PIN5R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN5R { match value { false => PIN5R :: NOTLATCHED , true => PIN5R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN5R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN5R :: LATCHED } } # [ doc = "Possible values of the field `PIN6`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN6R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN6R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN6R :: NOTLATCHED => false , PIN6R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN6R { match value { false => PIN6R :: NOTLATCHED , true => PIN6R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN6R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN6R :: LATCHED } } # [ doc = "Possible values of the field `PIN7`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN7R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN7R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN7R :: NOTLATCHED => false , PIN7R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN7R { match value { false => PIN7R :: NOTLATCHED , true => PIN7R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN7R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN7R :: LATCHED } } # [ doc = "Possible values of the field `PIN8`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN8R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN8R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN8R :: NOTLATCHED => false , PIN8R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN8R { match value { false => PIN8R :: NOTLATCHED , true => PIN8R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN8R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN8R :: LATCHED } } # [ doc = "Possible values of the field `PIN9`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN9R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN9R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN9R :: NOTLATCHED => false , PIN9R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN9R { match value { false => PIN9R :: NOTLATCHED , true => PIN9R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN9R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN9R :: LATCHED } } # [ doc = "Possible values of the field `PIN10`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN10R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN10R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN10R :: NOTLATCHED => false , PIN10R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN10R { match value { false => PIN10R :: NOTLATCHED , true => PIN10R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN10R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN10R :: LATCHED } } # [ doc = "Possible values of the field `PIN11`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN11R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN11R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN11R :: NOTLATCHED => false , PIN11R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN11R { match value { false => PIN11R :: NOTLATCHED , true => PIN11R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN11R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN11R :: LATCHED } } # [ doc = "Possible values of the field `PIN12`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN12R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN12R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN12R :: NOTLATCHED => false , PIN12R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN12R { match value { false => PIN12R :: NOTLATCHED , true => PIN12R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN12R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN12R :: LATCHED } } # [ doc = "Possible values of the field `PIN13`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN13R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN13R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN13R :: NOTLATCHED => false , PIN13R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN13R { match value { false => PIN13R :: NOTLATCHED , true => PIN13R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN13R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN13R :: LATCHED } } # [ doc = "Possible values of the field `PIN14`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN14R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN14R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN14R :: NOTLATCHED => false , PIN14R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN14R { match value { false => PIN14R :: NOTLATCHED , true => PIN14R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN14R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN14R :: LATCHED } } # [ doc = "Possible values of the field `PIN15`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN15R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN15R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN15R :: NOTLATCHED => false , PIN15R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN15R { match value { false => PIN15R :: NOTLATCHED , true => PIN15R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN15R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN15R :: LATCHED } } # [ doc = "Possible values of the field `PIN16`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN16R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN16R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN16R :: NOTLATCHED => false , PIN16R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN16R { match value { false => PIN16R :: NOTLATCHED , true => PIN16R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN16R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN16R :: LATCHED } } # [ doc = "Possible values of the field `PIN17`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN17R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN17R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN17R :: NOTLATCHED => false , PIN17R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN17R { match value { false => PIN17R :: NOTLATCHED , true => PIN17R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN17R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN17R :: LATCHED } } # [ doc = "Possible values of the field `PIN18`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN18R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN18R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN18R :: NOTLATCHED => false , PIN18R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN18R { match value { false => PIN18R :: NOTLATCHED , true => PIN18R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN18R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN18R :: LATCHED } } # [ doc = "Possible values of the field `PIN19`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN19R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN19R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN19R :: NOTLATCHED => false , PIN19R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN19R { match value { false => PIN19R :: NOTLATCHED , true => PIN19R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN19R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN19R :: LATCHED } } # [ doc = "Possible values of the field `PIN20`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN20R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN20R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN20R :: NOTLATCHED => false , PIN20R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN20R { match value { false => PIN20R :: NOTLATCHED , true => PIN20R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN20R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN20R :: LATCHED } } # [ doc = "Possible values of the field `PIN21`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN21R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN21R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN21R :: NOTLATCHED => false , PIN21R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN21R { match value { false => PIN21R :: NOTLATCHED , true => PIN21R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN21R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN21R :: LATCHED } } # [ doc = "Possible values of the field `PIN22`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN22R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN22R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN22R :: NOTLATCHED => false , PIN22R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN22R { match value { false => PIN22R :: NOTLATCHED , true => PIN22R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN22R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN22R :: LATCHED } } # [ doc = "Possible values of the field `PIN23`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN23R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN23R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN23R :: NOTLATCHED => false , PIN23R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN23R { match value { false => PIN23R :: NOTLATCHED , true => PIN23R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN23R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN23R :: LATCHED } } # [ doc = "Possible values of the field `PIN24`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN24R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN24R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN24R :: NOTLATCHED => false , PIN24R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN24R { match value { false => PIN24R :: NOTLATCHED , true => PIN24R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN24R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN24R :: LATCHED } } # [ doc = "Possible values of the field `PIN25`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN25R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN25R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN25R :: NOTLATCHED => false , PIN25R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN25R { match value { false => PIN25R :: NOTLATCHED , true => PIN25R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN25R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN25R :: LATCHED } } # [ doc = "Possible values of the field `PIN26`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN26R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN26R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN26R :: NOTLATCHED => false , PIN26R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN26R { match value { false => PIN26R :: NOTLATCHED , true => PIN26R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN26R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN26R :: LATCHED } } # [ doc = "Possible values of the field `PIN27`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN27R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN27R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN27R :: NOTLATCHED => false , PIN27R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN27R { match value { false => PIN27R :: NOTLATCHED , true => PIN27R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN27R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN27R :: LATCHED } } # [ doc = "Possible values of the field `PIN28`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN28R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN28R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN28R :: NOTLATCHED => false , PIN28R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN28R { match value { false => PIN28R :: NOTLATCHED , true => PIN28R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN28R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN28R :: LATCHED } } # [ doc = "Possible values of the field `PIN29`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN29R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN29R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN29R :: NOTLATCHED => false , PIN29R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN29R { match value { false => PIN29R :: NOTLATCHED , true => PIN29R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN29R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN29R :: LATCHED } } # [ doc = "Possible values of the field `PIN30`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN30R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN30R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN30R :: NOTLATCHED => false , PIN30R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN30R { match value { false => PIN30R :: NOTLATCHED , true => PIN30R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN30R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN30R :: LATCHED } } # [ doc = "Possible values of the field `PIN31`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PIN31R { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN31R { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { PIN31R :: NOTLATCHED => false , PIN31R :: LATCHED => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> PIN31R { match value { false => PIN31R :: NOTLATCHED , true => PIN31R :: LATCHED , } } # [ doc = "Checks if the value of the field is `NOTLATCHED`" ] # [ inline ] pub fn is_not_latched ( & self ) -> bool { * self == PIN31R :: NOTLATCHED } # [ doc = "Checks if the value of the field is `LATCHED`" ] # [ inline ] pub fn is_latched ( & self ) -> bool { * self == PIN31R :: LATCHED } } # [ doc = "Values that can be written to the field `PIN0`" ] pub enum PIN0W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN0W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN0W :: NOTLATCHED => false , PIN0W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN0W < 'a > { w : & 'a mut W , } impl < 'a > _PIN0W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN0W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN0W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN0W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN1`" ] pub enum PIN1W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN1W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN1W :: NOTLATCHED => false , PIN1W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN1W < 'a > { w : & 'a mut W , } impl < 'a > _PIN1W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN1W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN1W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN1W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN2`" ] pub enum PIN2W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN2W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN2W :: NOTLATCHED => false , PIN2W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN2W < 'a > { w : & 'a mut W , } impl < 'a > _PIN2W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN2W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN2W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN2W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN3`" ] pub enum PIN3W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN3W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN3W :: NOTLATCHED => false , PIN3W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN3W < 'a > { w : & 'a mut W , } impl < 'a > _PIN3W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN3W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN3W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN3W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 3 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN4`" ] pub enum PIN4W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN4W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN4W :: NOTLATCHED => false , PIN4W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN4W < 'a > { w : & 'a mut W , } impl < 'a > _PIN4W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN4W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN4W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN4W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 4 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN5`" ] pub enum PIN5W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN5W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN5W :: NOTLATCHED => false , PIN5W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN5W < 'a > { w : & 'a mut W , } impl < 'a > _PIN5W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN5W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN5W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN5W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 5 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN6`" ] pub enum PIN6W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN6W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN6W :: NOTLATCHED => false , PIN6W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN6W < 'a > { w : & 'a mut W , } impl < 'a > _PIN6W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN6W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN6W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN6W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 6 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN7`" ] pub enum PIN7W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN7W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN7W :: NOTLATCHED => false , PIN7W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN7W < 'a > { w : & 'a mut W , } impl < 'a > _PIN7W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN7W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN7W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN7W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 7 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN8`" ] pub enum PIN8W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN8W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN8W :: NOTLATCHED => false , PIN8W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN8W < 'a > { w : & 'a mut W , } impl < 'a > _PIN8W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN8W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN8W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN8W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN9`" ] pub enum PIN9W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN9W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN9W :: NOTLATCHED => false , PIN9W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN9W < 'a > { w : & 'a mut W , } impl < 'a > _PIN9W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN9W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN9W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN9W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 9 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN10`" ] pub enum PIN10W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN10W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN10W :: NOTLATCHED => false , PIN10W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN10W < 'a > { w : & 'a mut W , } impl < 'a > _PIN10W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN10W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN10W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN10W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 10 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN11`" ] pub enum PIN11W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN11W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN11W :: NOTLATCHED => false , PIN11W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN11W < 'a > { w : & 'a mut W , } impl < 'a > _PIN11W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN11W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN11W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN11W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 11 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN12`" ] pub enum PIN12W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN12W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN12W :: NOTLATCHED => false , PIN12W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN12W < 'a > { w : & 'a mut W , } impl < 'a > _PIN12W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN12W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN12W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN12W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 12 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN13`" ] pub enum PIN13W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN13W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN13W :: NOTLATCHED => false , PIN13W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN13W < 'a > { w : & 'a mut W , } impl < 'a > _PIN13W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN13W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN13W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN13W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 13 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN14`" ] pub enum PIN14W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN14W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN14W :: NOTLATCHED => false , PIN14W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN14W < 'a > { w : & 'a mut W , } impl < 'a > _PIN14W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN14W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN14W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN14W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 14 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN15`" ] pub enum PIN15W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN15W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN15W :: NOTLATCHED => false , PIN15W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN15W < 'a > { w : & 'a mut W , } impl < 'a > _PIN15W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN15W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN15W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN15W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 15 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN16`" ] pub enum PIN16W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN16W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN16W :: NOTLATCHED => false , PIN16W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN16W < 'a > { w : & 'a mut W , } impl < 'a > _PIN16W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN16W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN16W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN16W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN17`" ] pub enum PIN17W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN17W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN17W :: NOTLATCHED => false , PIN17W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN17W < 'a > { w : & 'a mut W , } impl < 'a > _PIN17W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN17W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN17W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN17W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 17 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN18`" ] pub enum PIN18W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN18W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN18W :: NOTLATCHED => false , PIN18W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN18W < 'a > { w : & 'a mut W , } impl < 'a > _PIN18W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN18W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN18W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN18W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 18 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN19`" ] pub enum PIN19W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN19W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN19W :: NOTLATCHED => false , PIN19W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN19W < 'a > { w : & 'a mut W , } impl < 'a > _PIN19W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN19W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN19W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN19W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 19 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN20`" ] pub enum PIN20W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN20W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN20W :: NOTLATCHED => false , PIN20W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN20W < 'a > { w : & 'a mut W , } impl < 'a > _PIN20W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN20W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN20W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN20W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 20 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN21`" ] pub enum PIN21W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN21W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN21W :: NOTLATCHED => false , PIN21W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN21W < 'a > { w : & 'a mut W , } impl < 'a > _PIN21W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN21W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN21W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN21W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 21 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN22`" ] pub enum PIN22W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN22W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN22W :: NOTLATCHED => false , PIN22W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN22W < 'a > { w : & 'a mut W , } impl < 'a > _PIN22W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN22W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN22W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN22W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 22 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN23`" ] pub enum PIN23W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN23W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN23W :: NOTLATCHED => false , PIN23W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN23W < 'a > { w : & 'a mut W , } impl < 'a > _PIN23W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN23W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN23W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN23W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 23 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN24`" ] pub enum PIN24W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN24W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN24W :: NOTLATCHED => false , PIN24W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN24W < 'a > { w : & 'a mut W , } impl < 'a > _PIN24W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN24W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN24W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN24W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 24 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN25`" ] pub enum PIN25W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN25W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN25W :: NOTLATCHED => false , PIN25W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN25W < 'a > { w : & 'a mut W , } impl < 'a > _PIN25W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN25W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN25W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN25W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 25 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN26`" ] pub enum PIN26W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN26W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN26W :: NOTLATCHED => false , PIN26W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN26W < 'a > { w : & 'a mut W , } impl < 'a > _PIN26W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN26W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN26W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN26W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 26 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN27`" ] pub enum PIN27W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN27W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN27W :: NOTLATCHED => false , PIN27W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN27W < 'a > { w : & 'a mut W , } impl < 'a > _PIN27W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN27W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN27W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN27W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 27 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN28`" ] pub enum PIN28W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN28W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN28W :: NOTLATCHED => false , PIN28W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN28W < 'a > { w : & 'a mut W , } impl < 'a > _PIN28W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN28W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN28W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN28W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 28 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN29`" ] pub enum PIN29W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN29W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN29W :: NOTLATCHED => false , PIN29W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN29W < 'a > { w : & 'a mut W , } impl < 'a > _PIN29W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN29W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN29W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN29W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 29 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN30`" ] pub enum PIN30W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN30W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN30W :: NOTLATCHED => false , PIN30W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN30W < 'a > { w : & 'a mut W , } impl < 'a > _PIN30W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN30W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN30W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN30W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 30 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PIN31`" ] pub enum PIN31W { # [ doc = "Criteria has not been met" ] NOTLATCHED , # [ doc = "Criteria has been met" ] LATCHED } impl PIN31W { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { PIN31W :: NOTLATCHED => false , PIN31W :: LATCHED => true } } } # [ doc = r" Proxy" ] pub struct _PIN31W < 'a > { w : & 'a mut W , } impl < 'a > _PIN31W < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PIN31W ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Criteria has not been met" ] # [ inline ] pub fn not_latched ( self ) -> & 'a mut W { self . variant ( PIN31W :: NOTLATCHED ) } # [ doc = "Criteria has been met" ] # [ inline ] pub fn latched ( self ) -> & 'a mut W { self . variant ( PIN31W :: LATCHED ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 31 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin0 ( & self ) -> PIN0R { PIN0R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin1 ( & self ) -> PIN1R { PIN1R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin2 ( & self ) -> PIN2R { PIN2R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin3 ( & self ) -> PIN3R { PIN3R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 3 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin4 ( & self ) -> PIN4R { PIN4R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 4 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin5 ( & self ) -> PIN5R { PIN5R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 5 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin6 ( & self ) -> PIN6R { PIN6R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 6 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin7 ( & self ) -> PIN7R { PIN7R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 7 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin8 ( & self ) -> PIN8R { PIN8R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin9 ( & self ) -> PIN9R { PIN9R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 9 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin10 ( & self ) -> PIN10R { PIN10R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 10 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin11 ( & self ) -> PIN11R { PIN11R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 11 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin12 ( & self ) -> PIN12R { PIN12R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 12 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin13 ( & self ) -> PIN13R { PIN13R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 13 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin14 ( & self ) -> PIN14R { PIN14R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 14 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin15 ( & self ) -> PIN15R { PIN15R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 15 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin16 ( & self ) -> PIN16R { PIN16R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin17 ( & self ) -> PIN17R { PIN17R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 17 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin18 ( & self ) -> PIN18R { PIN18R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 18 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin19 ( & self ) -> PIN19R { PIN19R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 19 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin20 ( & self ) -> PIN20R { PIN20R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 20 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin21 ( & self ) -> PIN21R { PIN21R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 21 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin22 ( & self ) -> PIN22R { PIN22R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 22 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin23 ( & self ) -> PIN23R { PIN23R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 23 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin24 ( & self ) -> PIN24R { PIN24R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 24 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin25 ( & self ) -> PIN25R { PIN25R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 25 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin26 ( & self ) -> PIN26R { PIN26R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 26 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin27 ( & self ) -> PIN27R { PIN27R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 27 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin28 ( & self ) -> PIN28R { PIN28R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 28 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin29 ( & self ) -> PIN29R { PIN29R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 29 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin30 ( & self ) -> PIN30R { PIN30R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 30 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin31 ( & self ) -> PIN31R { PIN31R :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 31 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin0 ( & mut self ) -> _PIN0W { _PIN0W { w : self } } # [ doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin1 ( & mut self ) -> _PIN1W { _PIN1W { w : self } } # [ doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin2 ( & mut self ) -> _PIN2W { _PIN2W { w : self } } # [ doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin3 ( & mut self ) -> _PIN3W { _PIN3W { w : self } } # [ doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin4 ( & mut self ) -> _PIN4W { _PIN4W { w : self } } # [ doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin5 ( & mut self ) -> _PIN5W { _PIN5W { w : self } } # [ doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin6 ( & mut self ) -> _PIN6W { _PIN6W { w : self } } # [ doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin7 ( & mut self ) -> _PIN7W { _PIN7W { w : self } } # [ doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin8 ( & mut self ) -> _PIN8W { _PIN8W { w : self } } # [ doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin9 ( & mut self ) -> _PIN9W { _PIN9W { w : self } } # [ doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin10 ( & mut self ) -> _PIN10W { _PIN10W { w : self } } # [ doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin11 ( & mut self ) -> _PIN11W { _PIN11W { w : self } } # [ doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin12 ( & mut self ) -> _PIN12W { _PIN12W { w : self } } # [ doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin13 ( & mut self ) -> _PIN13W { _PIN13W { w : self } } # [ doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin14 ( & mut self ) -> _PIN14W { _PIN14W { w : self } } # [ doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin15 ( & mut self ) -> _PIN15W { _PIN15W { w : self } } # [ doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin16 ( & mut self ) -> _PIN16W { _PIN16W { w : self } } # [ doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin17 ( & mut self ) -> _PIN17W { _PIN17W { w : self } } # [ doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin18 ( & mut self ) -> _PIN18W { _PIN18W { w : self } } # [ doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin19 ( & mut self ) -> _PIN19W { _PIN19W { w : self } } # [ doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin20 ( & mut self ) -> _PIN20W { _PIN20W { w : self } } # [ doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin21 ( & mut self ) -> _PIN21W { _PIN21W { w : self } } # [ doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin22 ( & mut self ) -> _PIN22W { _PIN22W { w : self } } # [ doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin23 ( & mut self ) -> _PIN23W { _PIN23W { w : self } } # [ doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin24 ( & mut self ) -> _PIN24W { _PIN24W { w : self } } # [ doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin25 ( & mut self ) -> _PIN25W { _PIN25W { w : self } } # [ doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin26 ( & mut self ) -> _PIN26W { _PIN26W { w : self } } # [ doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin27 ( & mut self ) -> _PIN27W { _PIN27W { w : self } } # [ doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin28 ( & mut self ) -> _PIN28W { _PIN28W { w : self } } # [ doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin29 ( & mut self ) -> _PIN29W { _PIN29W { w : self } } # [ doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin30 ( & mut self ) -> _PIN30W { _PIN30W { w : self } } # [ doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear." ] # [ inline ] pub fn pin31 ( & mut self ) -> _PIN31W { _PIN31W { w : self } } } } # [ doc = "Select between default DETECT signal behaviour and LDETECT mode" ] pub struct DETECTMODE { register : VolatileCell < u32 > } # [ doc = "Select between default DETECT signal behaviour and LDETECT mode" ] pub mod detectmode { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: DETECTMODE { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DETECTMODE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DETECTMODER { # [ doc = "DETECT directly connected to PIN DETECT signals" ] DEFAULT , # [ doc = "Use the latched LDETECT behaviour" ] LDETECT } impl DETECTMODER { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DETECTMODER :: DEFAULT => false , DETECTMODER :: LDETECT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DETECTMODER { match value { false => DETECTMODER :: DEFAULT , true => DETECTMODER :: LDETECT , } } # [ doc = "Checks if the value of the field is `DEFAULT`" ] # [ inline ] pub fn is_default ( & self ) -> bool { * self == DETECTMODER :: DEFAULT } # [ doc = "Checks if the value of the field is `LDETECT`" ] # [ inline ] pub fn is_ldetect ( & self ) -> bool { * self == DETECTMODER :: LDETECT } } # [ doc = "Values that can be written to the field `DETECTMODE`" ] pub enum DETECTMODEW { # [ doc = "DETECT directly connected to PIN DETECT signals" ] DEFAULT , # [ doc = "Use the latched LDETECT behaviour" ] LDETECT } impl DETECTMODEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DETECTMODEW :: DEFAULT => false , DETECTMODEW :: LDETECT => true } } } # [ doc = r" Proxy" ] pub struct _DETECTMODEW < 'a > { w : & 'a mut W , } impl < 'a > _DETECTMODEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DETECTMODEW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "DETECT directly connected to PIN DETECT signals" ] # [ inline ] pub fn default ( self ) -> & 'a mut W { self . variant ( DETECTMODEW :: DEFAULT ) } # [ doc = "Use the latched LDETECT behaviour" ] # [ inline ] pub fn ldetect ( self ) -> & 'a mut W { self . variant ( DETECTMODEW :: LDETECT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode" ] # [ inline ] pub fn detectmode ( & self ) -> DETECTMODER { DETECTMODER :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode" ] # [ inline ] pub fn detectmode ( & mut self ) -> _DETECTMODEW { _DETECTMODEW { w : self } } } } # [ doc = "Description collection[0]: Configuration of GPIO pins" ] pub struct PIN_CNF { register : VolatileCell < u32 > } # [ doc = "Description collection[0]: Configuration of GPIO pins" ] pub mod pin_cnf { # [ doc = r" Value read from the register" ] pub struct R { bits : u32 , } # [ doc = r" Value to write to the register" ] pub struct W { bits : u32 , } impl super :: PIN_CNF { # [ doc = r" Modifies the contents of the register" ] # [ inline ] pub fn modify < F > ( & self , f : F ) where for < 'w > F : FnOnce ( & R , & 'w mut W ) -> & 'w mut W { let bits = self . register . get ( ) ; let r = R { bits : bits } ; let mut w = W { bits : bits } ; f ( & r , & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Reads the contents of the register" ] # [ inline ] pub fn read ( & self ) -> R { R { bits : self . register . get ( ) } } # [ doc = r" Writes to the register" ] # [ inline ] pub fn write < F > ( & self , f : F ) where F : FnOnce ( & mut W ) -> & mut W { let mut w = W :: reset_value ( ) ; f ( & mut w ) ; self . register . set ( w . bits ) ; } # [ doc = r" Writes the reset value to the register" ] # [ inline ] pub fn reset ( & self ) { self . write ( | w | w ) } } # [ doc = "Possible values of the field `DIR`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DIRR { # [ doc = "Configure pin as an input pin" ] INPUT , # [ doc = "Configure pin as an output pin" ] OUTPUT } impl DIRR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { DIRR :: INPUT => false , DIRR :: OUTPUT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> DIRR { match value { false => DIRR :: INPUT , true => DIRR :: OUTPUT , } } # [ doc = "Checks if the value of the field is `INPUT`" ] # [ inline ] pub fn is_input ( & self ) -> bool { * self == DIRR :: INPUT } # [ doc = "Checks if the value of the field is `OUTPUT`" ] # [ inline ] pub fn is_output ( & self ) -> bool { * self == DIRR :: OUTPUT } } # [ doc = "Possible values of the field `INPUT`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum INPUTR { # [ doc = "Connect input buffer" ] CONNECT , # [ doc = "Disconnect input buffer" ] DISCONNECT } impl INPUTR { # [ doc = r" Returns `true` if the bit is clear (0)" ] # [ inline ] pub fn bit_is_clear ( & self ) -> bool { ! self . bit ( ) } # [ doc = r" Returns `true` if the bit is set (1)" ] # [ inline ] pub fn bit_is_set ( & self ) -> bool { self . bit ( ) } # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bit ( & self ) -> bool { match * self { INPUTR :: CONNECT => false , INPUTR :: DISCONNECT => true } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : bool ) -> INPUTR { match value { false => INPUTR :: CONNECT , true => INPUTR :: DISCONNECT , } } # [ doc = "Checks if the value of the field is `CONNECT`" ] # [ inline ] pub fn is_connect ( & self ) -> bool { * self == INPUTR :: CONNECT } # [ doc = "Checks if the value of the field is `DISCONNECT`" ] # [ inline ] pub fn is_disconnect ( & self ) -> bool { * self == INPUTR :: DISCONNECT } } # [ doc = "Possible values of the field `PULL`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum PULLR { # [ doc = "No pull" ] DISABLED , # [ doc = "Pull down on pin" ] PULLDOWN , # [ doc = "Pull up on pin" ] PULLUP , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl PULLR { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { PULLR :: DISABLED => 0 , PULLR :: PULLDOWN => 0x01 , PULLR :: PULLUP => 0x03 , PULLR :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> PULLR { match value { 0 => PULLR :: DISABLED , 1 => PULLR :: PULLDOWN , 3 => PULLR :: PULLUP , i => PULLR :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == PULLR :: DISABLED } # [ doc = "Checks if the value of the field is `PULLDOWN`" ] # [ inline ] pub fn is_pulldown ( & self ) -> bool { * self == PULLR :: PULLDOWN } # [ doc = "Checks if the value of the field is `PULLUP`" ] # [ inline ] pub fn is_pullup ( & self ) -> bool { * self == PULLR :: PULLUP } } # [ doc = "Possible values of the field `DRIVE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum DRIVER { # [ doc = "Standard '0', standard '1'" ] S0S1 , # [ doc = "High drive '0', standard '1'" ] H0S1 , # [ doc = "Standard '0', high drive '1'" ] S0H1 , # [ doc = "High drive '0', high 'drive '1''" ] H0H1 , # [ doc = "Disconnect '0' standard '1' (normally used for wired-or connections)" ] D0S1 , # [ doc = "Disconnect '0', high drive '1' (normally used for wired-or connections)" ] D0H1 , # [ doc = "Standard '0'. disconnect '1' (normally used for wired-and connections)" ] S0D1 , # [ doc = "High drive '0', disconnect '1' (normally used for wired-and connections)" ] H0D1 } impl DRIVER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { DRIVER :: S0S1 => 0 , DRIVER :: H0S1 => 0x01 , DRIVER :: S0H1 => 0x02 , DRIVER :: H0H1 => 0x03 , DRIVER :: D0S1 => 0x04 , DRIVER :: D0H1 => 0x05 , DRIVER :: S0D1 => 0x06 , DRIVER :: H0D1 => 0x07 } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> DRIVER { match value { 0 => DRIVER :: S0S1 , 1 => DRIVER :: H0S1 , 2 => DRIVER :: S0H1 , 3 => DRIVER :: H0H1 , 4 => DRIVER :: D0S1 , 5 => DRIVER :: D0H1 , 6 => DRIVER :: S0D1 , 7 => DRIVER :: H0D1 , _ => unreachable ! ( ) , } } # [ doc = "Checks if the value of the field is `S0S1`" ] # [ inline ] pub fn is_s0s1 ( & self ) -> bool { * self == DRIVER :: S0S1 } # [ doc = "Checks if the value of the field is `H0S1`" ] # [ inline ] pub fn is_h0s1 ( & self ) -> bool { * self == DRIVER :: H0S1 } # [ doc = "Checks if the value of the field is `S0H1`" ] # [ inline ] pub fn is_s0h1 ( & self ) -> bool { * self == DRIVER :: S0H1 } # [ doc = "Checks if the value of the field is `H0H1`" ] # [ inline ] pub fn is_h0h1 ( & self ) -> bool { * self == DRIVER :: H0H1 } # [ doc = "Checks if the value of the field is `D0S1`" ] # [ inline ] pub fn is_d0s1 ( & self ) -> bool { * self == DRIVER :: D0S1 } # [ doc = "Checks if the value of the field is `D0H1`" ] # [ inline ] pub fn is_d0h1 ( & self ) -> bool { * self == DRIVER :: D0H1 } # [ doc = "Checks if the value of the field is `S0D1`" ] # [ inline ] pub fn is_s0d1 ( & self ) -> bool { * self == DRIVER :: S0D1 } # [ doc = "Checks if the value of the field is `H0D1`" ] # [ inline ] pub fn is_h0d1 ( & self ) -> bool { * self == DRIVER :: H0D1 } } # [ doc = "Possible values of the field `SENSE`" ] # [ derive ( Clone , Copy , Debug , PartialEq ) ] pub enum SENSER { # [ doc = "Disabled" ] DISABLED , # [ doc = "Sense for high level" ] HIGH , # [ doc = "Sense for low level" ] LOW , # [ doc = r" Reserved" ] _Reserved ( u8 ) } impl SENSER { # [ doc = r" Value of the field as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u8 { match * self { SENSER :: DISABLED => 0 , SENSER :: HIGH => 0x02 , SENSER :: LOW => 0x03 , SENSER :: _Reserved ( bits ) => bits } } # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _from ( value : u8 ) -> SENSER { match value { 0 => SENSER :: DISABLED , 2 => SENSER :: HIGH , 3 => SENSER :: LOW , i => SENSER :: _Reserved ( i ) , } } # [ doc = "Checks if the value of the field is `DISABLED`" ] # [ inline ] pub fn is_disabled ( & self ) -> bool { * self == SENSER :: DISABLED } # [ doc = "Checks if the value of the field is `HIGH`" ] # [ inline ] pub fn is_high ( & self ) -> bool { * self == SENSER :: HIGH } # [ doc = "Checks if the value of the field is `LOW`" ] # [ inline ] pub fn is_low ( & self ) -> bool { * self == SENSER :: LOW } } # [ doc = "Values that can be written to the field `DIR`" ] pub enum DIRW { # [ doc = "Configure pin as an input pin" ] INPUT , # [ doc = "Configure pin as an output pin" ] OUTPUT } impl DIRW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { DIRW :: INPUT => false , DIRW :: OUTPUT => true } } } # [ doc = r" Proxy" ] pub struct _DIRW < 'a > { w : & 'a mut W , } impl < 'a > _DIRW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DIRW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Configure pin as an input pin" ] # [ inline ] pub fn input ( self ) -> & 'a mut W { self . variant ( DIRW :: INPUT ) } # [ doc = "Configure pin as an output pin" ] # [ inline ] pub fn output ( self ) -> & 'a mut W { self . variant ( DIRW :: OUTPUT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 0 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `INPUT`" ] pub enum INPUTW { # [ doc = "Connect input buffer" ] CONNECT , # [ doc = "Disconnect input buffer" ] DISCONNECT } impl INPUTW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> bool { match * self { INPUTW :: CONNECT => false , INPUTW :: DISCONNECT => true } } } # [ doc = r" Proxy" ] pub struct _INPUTW < 'a > { w : & 'a mut W , } impl < 'a > _INPUTW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : INPUTW ) -> & 'a mut W { { self . bit ( variant . _bits ( ) ) } } # [ doc = "Connect input buffer" ] # [ inline ] pub fn connect ( self ) -> & 'a mut W { self . variant ( INPUTW :: CONNECT ) } # [ doc = "Disconnect input buffer" ] # [ inline ] pub fn disconnect ( self ) -> & 'a mut W { self . variant ( INPUTW :: DISCONNECT ) } # [ doc = r" Sets the field bit" ] pub fn set_bit ( self ) -> & 'a mut W { self . bit ( true ) } # [ doc = r" Clears the field bit" ] pub fn clear_bit ( self ) -> & 'a mut W { self . bit ( false ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bit ( self , value : bool ) -> & 'a mut W { const MASK : bool = true ; const OFFSET : u8 = 1 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `PULL`" ] pub enum PULLW { # [ doc = "No pull" ] DISABLED , # [ doc = "Pull down on pin" ] PULLDOWN , # [ doc = "Pull up on pin" ] PULLUP } impl PULLW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { PULLW :: DISABLED => 0 , PULLW :: PULLDOWN => 1 , PULLW :: PULLUP => 3 } } } # [ doc = r" Proxy" ] pub struct _PULLW < 'a > { w : & 'a mut W , } impl < 'a > _PULLW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : PULLW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "No pull" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( PULLW :: DISABLED ) } # [ doc = "Pull down on pin" ] # [ inline ] pub fn pulldown ( self ) -> & 'a mut W { self . variant ( PULLW :: PULLDOWN ) } # [ doc = "Pull up on pin" ] # [ inline ] pub fn pullup ( self ) -> & 'a mut W { self . variant ( PULLW :: PULLUP ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 2 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `DRIVE`" ] pub enum DRIVEW { # [ doc = "Standard '0', standard '1'" ] S0S1 , # [ doc = "High drive '0', standard '1'" ] H0S1 , # [ doc = "Standard '0', high drive '1'" ] S0H1 , # [ doc = "High drive '0', high 'drive '1''" ] H0H1 , # [ doc = "Disconnect '0' standard '1' (normally used for wired-or connections)" ] D0S1 , # [ doc = "Disconnect '0', high drive '1' (normally used for wired-or connections)" ] D0H1 , # [ doc = "Standard '0'. disconnect '1' (normally used for wired-and connections)" ] S0D1 , # [ doc = "High drive '0', disconnect '1' (normally used for wired-and connections)" ] H0D1 } impl DRIVEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { DRIVEW :: S0S1 => 0 , DRIVEW :: H0S1 => 1 , DRIVEW :: S0H1 => 2 , DRIVEW :: H0H1 => 3 , DRIVEW :: D0S1 => 4 , DRIVEW :: D0H1 => 5 , DRIVEW :: S0D1 => 6 , DRIVEW :: H0D1 => 7 } } } # [ doc = r" Proxy" ] pub struct _DRIVEW < 'a > { w : & 'a mut W , } impl < 'a > _DRIVEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : DRIVEW ) -> & 'a mut W { { self . bits ( variant . _bits ( ) ) } } # [ doc = "Standard '0', standard '1'" ] # [ inline ] pub fn s0s1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: S0S1 ) } # [ doc = "High drive '0', standard '1'" ] # [ inline ] pub fn h0s1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: H0S1 ) } # [ doc = "Standard '0', high drive '1'" ] # [ inline ] pub fn s0h1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: S0H1 ) } # [ doc = "High drive '0', high 'drive '1''" ] # [ inline ] pub fn h0h1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: H0H1 ) } # [ doc = "Disconnect '0' standard '1' (normally used for wired-or connections)" ] # [ inline ] pub fn d0s1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: D0S1 ) } # [ doc = "Disconnect '0', high drive '1' (normally used for wired-or connections)" ] # [ inline ] pub fn d0h1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: D0H1 ) } # [ doc = "Standard '0'. disconnect '1' (normally used for wired-and connections)" ] # [ inline ] pub fn s0d1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: S0D1 ) } # [ doc = "High drive '0', disconnect '1' (normally used for wired-and connections)" ] # [ inline ] pub fn h0d1 ( self ) -> & 'a mut W { self . variant ( DRIVEW :: H0D1 ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x07 ; const OFFSET : u8 = 8 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } # [ doc = "Values that can be written to the field `SENSE`" ] pub enum SENSEW { # [ doc = "Disabled" ] DISABLED , # [ doc = "Sense for high level" ] HIGH , # [ doc = "Sense for low level" ] LOW } impl SENSEW { # [ allow ( missing_docs ) ] # [ doc ( hidden ) ] # [ inline ] pub fn _bits ( & self ) -> u8 { match * self { SENSEW :: DISABLED => 0 , SENSEW :: HIGH => 2 , SENSEW :: LOW => 3 } } } # [ doc = r" Proxy" ] pub struct _SENSEW < 'a > { w : & 'a mut W , } impl < 'a > _SENSEW < 'a > { # [ doc = r" Writes `variant` to the field" ] # [ inline ] pub fn variant ( self , variant : SENSEW ) -> & 'a mut W { unsafe { self . bits ( variant . _bits ( ) ) } } # [ doc = "Disabled" ] # [ inline ] pub fn disabled ( self ) -> & 'a mut W { self . variant ( SENSEW :: DISABLED ) } # [ doc = "Sense for high level" ] # [ inline ] pub fn high ( self ) -> & 'a mut W { self . variant ( SENSEW :: HIGH ) } # [ doc = "Sense for low level" ] # [ inline ] pub fn low ( self ) -> & 'a mut W { self . variant ( SENSEW :: LOW ) } # [ doc = r" Writes raw bits to the field" ] # [ inline ] pub unsafe fn bits ( self , value : u8 ) -> & 'a mut W { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; self . w . bits &= ! ( ( MASK as u32 ) << OFFSET ) ; self . w . bits |= ( ( value & MASK ) as u32 ) << OFFSET ; self . w } } impl R { # [ doc = r" Value of the register as raw bits" ] # [ inline ] pub fn bits ( & self ) -> u32 { self . bits } # [ doc = "Bit 0 - Pin direction. Same physical register as DIR register" ] # [ inline ] pub fn dir ( & self ) -> DIRR { DIRR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 0 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bit 1 - Connect or disconnect input buffer" ] # [ inline ] pub fn input ( & self ) -> INPUTR { INPUTR :: _from ( { const MASK : bool = true ; const OFFSET : u8 = 1 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) != 0 } ) } # [ doc = "Bits 2:3 - Pull configuration" ] # [ inline ] pub fn pull ( & self ) -> PULLR { PULLR :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 2 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bits 8:10 - Drive configuration" ] # [ inline ] pub fn drive ( & self ) -> DRIVER { DRIVER :: _from ( { const MASK : u8 = 0x07 ; const OFFSET : u8 = 8 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } # [ doc = "Bits 16:17 - Pin sensing mechanism" ] # [ inline ] pub fn sense ( & self ) -> SENSER { SENSER :: _from ( { const MASK : u8 = 0x03 ; const OFFSET : u8 = 16 ; ( ( self . bits >> OFFSET ) & MASK as u32 ) as u8 } ) } } impl W { # [ doc = r" Reset value of the register" ] # [ inline ] pub fn reset_value ( ) -> W { W { bits : 0x02 } } # [ doc = r" Writes raw bits to the register" ] # [ inline ] pub unsafe fn bits ( & mut self , bits : u32 ) -> & mut Self { self . bits = bits ; self } # [ doc = "Bit 0 - Pin direction. Same physical register as DIR register" ] # [ inline ] pub fn dir ( & mut self ) -> _DIRW { _DIRW { w : self } } # [ doc = "Bit 1 - Connect or disconnect input buffer" ] # [ inline ] pub fn input ( & mut self ) -> _INPUTW { _INPUTW { w : self } } # [ doc = "Bits 2:3 - Pull configuration" ] # [ inline ] pub fn pull ( & mut self ) -> _PULLW { _PULLW { w : self } } # [ doc = "Bits 8:10 - Drive configuration" ] # [ inline ] pub fn drive ( & mut self ) -> _DRIVEW { _DRIVEW { w : self } } # [ doc = "Bits 16:17 - Pin sensing mechanism" ] # [ inline ] pub fn sense ( & mut self ) -> _SENSEW { _SENSEW { w : self } } } } } # [ no_mangle ] static mut DEVICE_PERIPHERALS : bool = false ; # [ doc = r" All the peripherals" ] # [ allow ( non_snake_case ) ] pub struct Peripherals { # [ doc = "FICR" ] pub FICR : FICR , # [ doc = "UICR" ] pub UICR : UICR , # [ doc = "BPROT" ] pub BPROT : BPROT , # [ doc = "POWER" ] pub POWER : POWER , # [ doc = "CLOCK" ] pub CLOCK : CLOCK , # [ doc = "RADIO" ] pub RADIO : RADIO , # [ doc = "UARTE0" ] pub UARTE0 : UARTE0 , # [ doc = "UART0" ] pub UART0 : UART0 , # [ doc = "SPIM0" ] pub SPIM0 : SPIM0 , # [ doc = "SPIS0" ] pub SPIS0 : SPIS0 , # [ doc = "TWIM0" ] pub TWIM0 : TWIM0 , # [ doc = "TWIS0" ] pub TWIS0 : TWIS0 , # [ doc = "SPI0" ] pub SPI0 : SPI0 , # [ doc = "TWI0" ] pub TWI0 : TWI0 , # [ doc = "SPIM1" ] pub SPIM1 : SPIM1 , # [ doc = "SPIS1" ] pub SPIS1 : SPIS1 , # [ doc = "TWIM1" ] pub TWIM1 : TWIM1 , # [ doc = "TWIS1" ] pub TWIS1 : TWIS1 , # [ doc = "SPI1" ] pub SPI1 : SPI1 , # [ doc = "TWI1" ] pub TWI1 : TWI1 , # [ doc = "NFCT" ] pub NFCT : NFCT , # [ doc = "GPIOTE" ] pub GPIOTE : GPIOTE , # [ doc = "SAADC" ] pub SAADC : SAADC , # [ doc = "TIMER0" ] pub TIMER0 : TIMER0 , # [ doc = "TIMER1" ] pub TIMER1 : TIMER1 , # [ doc = "TIMER2" ] pub TIMER2 : TIMER2 , # [ doc = "RTC0" ] pub RTC0 : RTC0 , # [ doc = "TEMP" ] pub TEMP : TEMP , # [ doc = "RNG" ] pub RNG : RNG , # [ doc = "ECB" ] pub ECB : ECB , # [ doc = "CCM" ] pub CCM : CCM , # [ doc = "AAR" ] pub AAR : AAR , # [ doc = "WDT" ] pub WDT : WDT , # [ doc = "RTC1" ] pub RTC1 : RTC1 , # [ doc = "QDEC" ] pub QDEC : QDEC , # [ doc = "COMP" ] pub COMP : COMP , # [ doc = "LPCOMP" ] pub LPCOMP : LPCOMP , # [ doc = "SWI0" ] pub SWI0 : SWI0 , # [ doc = "EGU0" ] pub EGU0 : EGU0 , # [ doc = "SWI1" ] pub SWI1 : SWI1 , # [ doc = "EGU1" ] pub EGU1 : EGU1 , # [ doc = "SWI2" ] pub SWI2 : SWI2 , # [ doc = "EGU2" ] pub EGU2 : EGU2 , # [ doc = "SWI3" ] pub SWI3 : SWI3 , # [ doc = "EGU3" ] pub EGU3 : EGU3 , # [ doc = "SWI4" ] pub SWI4 : SWI4 , # [ doc = "EGU4" ] pub EGU4 : EGU4 , # [ doc = "SWI5" ] pub SWI5 : SWI5 , # [ doc = "EGU5" ] pub EGU5 : EGU5 , # [ doc = "TIMER3" ] pub TIMER3 : TIMER3 , # [ doc = "TIMER4" ] pub TIMER4 : TIMER4 , # [ doc = "PWM0" ] pub PWM0 : PWM0 , # [ doc = "PDM" ] pub PDM : PDM , # [ doc = "NVMC" ] pub NVMC : NVMC , # [ doc = "PPI" ] pub PPI : PPI , # [ doc = "MWU" ] pub MWU : MWU , # [ doc = "PWM1" ] pub PWM1 : PWM1 , # [ doc = "PWM2" ] pub PWM2 : PWM2 , # [ doc = "SPIM2" ] pub SPIM2 : SPIM2 , # [ doc = "SPIS2" ] pub SPIS2 : SPIS2 , # [ doc = "SPI2" ] pub SPI2 : SPI2 , # [ doc = "RTC2" ] pub RTC2 : RTC2 , # [ doc = "I2S" ] pub I2S : I2S , # [ doc = "P0" ] pub P0 : P0 , } 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 { debug_assert ! ( ! DEVICE_PERIPHERALS ) ; DEVICE_PERIPHERALS = true ; Peripherals { FICR : FICR { _marker : PhantomData } , UICR : UICR { _marker : PhantomData } , BPROT : BPROT { _marker : PhantomData } , POWER : POWER { _marker : PhantomData } , CLOCK : CLOCK { _marker : PhantomData } , RADIO : RADIO { _marker : PhantomData } , UARTE0 : UARTE0 { _marker : PhantomData } , UART0 : UART0 { _marker : PhantomData } , SPIM0 : SPIM0 { _marker : PhantomData } , SPIS0 : SPIS0 { _marker : PhantomData } , TWIM0 : TWIM0 { _marker : PhantomData } , TWIS0 : TWIS0 { _marker : PhantomData } , SPI0 : SPI0 { _marker : PhantomData } , TWI0 : TWI0 { _marker : PhantomData } , SPIM1 : SPIM1 { _marker : PhantomData } , SPIS1 : SPIS1 { _marker : PhantomData } , TWIM1 : TWIM1 { _marker : PhantomData } , TWIS1 : TWIS1 { _marker : PhantomData } , SPI1 : SPI1 { _marker : PhantomData } , TWI1 : TWI1 { _marker : PhantomData } , NFCT : NFCT { _marker : PhantomData } , GPIOTE : GPIOTE { _marker : PhantomData } , SAADC : SAADC { _marker : PhantomData } , TIMER0 : TIMER0 { _marker : PhantomData } , TIMER1 : TIMER1 { _marker : PhantomData } , TIMER2 : TIMER2 { _marker : PhantomData } , RTC0 : RTC0 { _marker : PhantomData } , TEMP : TEMP { _marker : PhantomData } , RNG : RNG { _marker : PhantomData } , ECB : ECB { _marker : PhantomData } , CCM : CCM { _marker : PhantomData } , AAR : AAR { _marker : PhantomData } , WDT : WDT { _marker : PhantomData } , RTC1 : RTC1 { _marker : PhantomData } , QDEC : QDEC { _marker : PhantomData } , COMP : COMP { _marker : PhantomData } , LPCOMP : LPCOMP { _marker : PhantomData } , SWI0 : SWI0 { _marker : PhantomData } , EGU0 : EGU0 { _marker : PhantomData } , SWI1 : SWI1 { _marker : PhantomData } , EGU1 : EGU1 { _marker : PhantomData } , SWI2 : SWI2 { _marker : PhantomData } , EGU2 : EGU2 { _marker : PhantomData } , SWI3 : SWI3 { _marker : PhantomData } , EGU3 : EGU3 { _marker : PhantomData } , SWI4 : SWI4 { _marker : PhantomData } , EGU4 : EGU4 { _marker : PhantomData } , SWI5 : SWI5 { _marker : PhantomData } , EGU5 : EGU5 { _marker : PhantomData } , TIMER3 : TIMER3 { _marker : PhantomData } , TIMER4 : TIMER4 { _marker : PhantomData } , PWM0 : PWM0 { _marker : PhantomData } , PDM : PDM { _marker : PhantomData } , NVMC : NVMC { _marker : PhantomData } , PPI : PPI { _marker : PhantomData } , MWU : MWU { _marker : PhantomData } , PWM1 : PWM1 { _marker : PhantomData } , PWM2 : PWM2 { _marker : PhantomData } , SPIM2 : SPIM2 { _marker : PhantomData } , SPIS2 : SPIS2 { _marker : PhantomData } , SPI2 : SPI2 { _marker : PhantomData } , RTC2 : RTC2 { _marker : PhantomData } , I2S : I2S { _marker : PhantomData } , P0 : P0 { _marker : PhantomData } , } } }