#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register 1"] pub cr1: crate::Reg, #[doc = "0x04 - control register 2"] pub cr2: crate::Reg, #[doc = "0x08 - slave mode control register"] pub smcr: crate::Reg, #[doc = "0x0c - DMA/Interrupt enable register"] pub dier: crate::Reg, #[doc = "0x10 - status register"] pub sr: crate::Reg, #[doc = "0x14 - event generation register"] pub egr: crate::Reg, _reserved_6_ccmr1: [u8; 0x04], _reserved_7_ccmr2: [u8; 0x04], #[doc = "0x20 - capture/compare enable register"] pub ccer: crate::Reg, #[doc = "0x24 - counter"] pub cnt: crate::Reg, #[doc = "0x28 - prescaler"] pub psc: crate::Reg, #[doc = "0x2c - auto-reload register"] pub arr: crate::Reg, _reserved12: [u8; 0x04], #[doc = "0x34 - capture/compare register 1"] pub ccr1: crate::Reg, #[doc = "0x38 - capture/compare register 2"] pub ccr2: crate::Reg, #[doc = "0x3c - capture/compare register 3"] pub ccr3: crate::Reg, #[doc = "0x40 - capture/compare register 4"] pub ccr4: crate::Reg, _reserved16: [u8; 0x04], #[doc = "0x48 - DMA control register"] pub dcr: crate::Reg, #[doc = "0x4c - DMA address for full transfer"] pub dmar: crate::Reg, #[doc = "0x50 - TIM2 option register"] pub or1: crate::Reg, _reserved19: [u8; 0x0c], #[doc = "0x60 - TIM3 option register 2"] pub or2: crate::Reg, } impl RegisterBlock { #[doc = "0x18 - capture/compare mode register 1 (input mode)"] #[inline(always)] pub fn ccmr1_input(&self) -> &crate::Reg { unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const crate::Reg) } } #[doc = "0x18 - capture/compare mode register 1 (output mode)"] #[inline(always)] pub fn ccmr1_output(&self) -> &crate::Reg { unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const crate::Reg) } } #[doc = "0x1c - capture/compare mode register 2 (input mode)"] #[inline(always)] pub fn ccmr2_input(&self) -> &crate::Reg { unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const crate::Reg) } } #[doc = "0x1c - capture/compare mode register 2 (output mode)"] #[inline(always)] pub fn ccmr2_output(&self) -> &crate::Reg { unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const crate::Reg) } } } #[doc = "CR1 register accessor: an alias for `Reg`"] pub type CR1 = crate::Reg; #[doc = "control register 1"] pub mod cr1; #[doc = "CR2 register accessor: an alias for `Reg`"] pub type CR2 = crate::Reg; #[doc = "control register 2"] pub mod cr2; #[doc = "SMCR register accessor: an alias for `Reg`"] pub type SMCR = crate::Reg; #[doc = "slave mode control register"] pub mod smcr; #[doc = "DIER register accessor: an alias for `Reg`"] pub type DIER = crate::Reg; #[doc = "DMA/Interrupt enable register"] pub mod dier; #[doc = "SR register accessor: an alias for `Reg`"] pub type SR = crate::Reg; #[doc = "status register"] pub mod sr; #[doc = "EGR register accessor: an alias for `Reg`"] pub type EGR = crate::Reg; #[doc = "event generation register"] pub mod egr; #[doc = "CCMR1_Output register accessor: an alias for `Reg`"] pub type CCMR1_OUTPUT = crate::Reg; #[doc = "capture/compare mode register 1 (output mode)"] pub mod ccmr1_output; #[doc = "CCMR1_Input register accessor: an alias for `Reg`"] pub type CCMR1_INPUT = crate::Reg; #[doc = "capture/compare mode register 1 (input mode)"] pub mod ccmr1_input; #[doc = "CCMR2_Output register accessor: an alias for `Reg`"] pub type CCMR2_OUTPUT = crate::Reg; #[doc = "capture/compare mode register 2 (output mode)"] pub mod ccmr2_output; #[doc = "CCMR2_Input register accessor: an alias for `Reg`"] pub type CCMR2_INPUT = crate::Reg; #[doc = "capture/compare mode register 2 (input mode)"] pub mod ccmr2_input; #[doc = "CCER register accessor: an alias for `Reg`"] pub type CCER = crate::Reg; #[doc = "capture/compare enable register"] pub mod ccer; #[doc = "CNT register accessor: an alias for `Reg`"] pub type CNT = crate::Reg; #[doc = "counter"] pub mod cnt; #[doc = "PSC register accessor: an alias for `Reg`"] pub type PSC = crate::Reg; #[doc = "prescaler"] pub mod psc; #[doc = "ARR register accessor: an alias for `Reg`"] pub type ARR = crate::Reg; #[doc = "auto-reload register"] pub mod arr; #[doc = "CCR1 register accessor: an alias for `Reg`"] pub type CCR1 = crate::Reg; #[doc = "capture/compare register 1"] pub mod ccr1; #[doc = "CCR2 register accessor: an alias for `Reg`"] pub type CCR2 = crate::Reg; #[doc = "capture/compare register 2"] pub mod ccr2; #[doc = "CCR3 register accessor: an alias for `Reg`"] pub type CCR3 = crate::Reg; #[doc = "capture/compare register 3"] pub mod ccr3; #[doc = "CCR4 register accessor: an alias for `Reg`"] pub type CCR4 = crate::Reg; #[doc = "capture/compare register 4"] pub mod ccr4; #[doc = "DCR register accessor: an alias for `Reg`"] pub type DCR = crate::Reg; #[doc = "DMA control register"] pub mod dcr; #[doc = "DMAR register accessor: an alias for `Reg`"] pub type DMAR = crate::Reg; #[doc = "DMA address for full transfer"] pub mod dmar; #[doc = "OR1 register accessor: an alias for `Reg`"] pub type OR1 = crate::Reg; #[doc = "TIM2 option register"] pub mod or1; #[doc = "OR2 register accessor: an alias for `Reg`"] pub type OR2 = crate::Reg; #[doc = "TIM3 option register 2"] pub mod or2;