#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - control register 1"]
pub cr1: CR1,
#[doc = "0x04 - control register 2"]
pub cr2: CR2,
#[doc = "0x08 - slave mode control register 1"]
pub smcr: SMCR,
#[doc = "0x0c - DMA/Interrupt enable register"]
pub dier: DIER,
#[doc = "0x10 - status register"]
pub sr: SR,
#[doc = "0x14 - event generation register"]
pub egr: EGR,
_reserved_6_ccmr1: [u8; 0x04],
_reserved_7_ccmr2: [u8; 0x04],
#[doc = "0x20 - capture/compare enable register"]
pub ccer: CCER,
#[doc = "0x24 - counter"]
pub cnt: CNT,
#[doc = "0x28 - prescaler"]
pub psc: PSC,
#[doc = "0x2c - auto-reload register"]
pub arr: ARR,
#[doc = "0x30 - repetition counter register"]
pub rcr: RCR,
#[doc = "0x34 - capture/compare register 1"]
pub ccr1: CCR1,
#[doc = "0x38 - capture/compare register 2"]
pub ccr2: CCR2,
#[doc = "0x3c - capture/compare register 3"]
pub ccr3: CCR3,
#[doc = "0x40 - capture/compare register 4"]
pub ccr4: CCR4,
#[doc = "0x44 - break and dead-time register"]
pub bdtr: BDTR,
#[doc = "0x48 - DMA control register"]
pub dcr: DCR,
#[doc = "0x4c - DMA address for full transfer"]
pub dmar: DMAR,
_reserved20: [u8; 0x04],
#[doc = "0x54 - capture/compare mode register 3 (output mode)"]
pub ccmr3_output: CCMR3_OUTPUT,
#[doc = "0x58 - capture/compare register 5"]
pub ccr5: CCR5,
#[doc = "0x5c - PWM/DMA repeat enable register"]
pub pder: PDER,
#[doc = "0x60 - pwm shift count CCR1 register"]
pub ccr1fall: CCR1FALL,
#[doc = "0x64 - pwm shift count CCR2 register"]
pub ccr2fall: CCR2FALL,
#[doc = "0x68 - pwm shift count CCR3 register"]
pub ccr3fall: CCR3FALL,
#[doc = "0x6c - pwm shift count CCR4 register"]
pub ccr4fall: CCR4FALL,
#[doc = "0x70 - pwm shift count CCR5 register"]
pub ccr5fall: CCR5FALL,
}
impl RegisterBlock {
#[doc = "0x18 - capture/compare mode register 1 (input mode)"]
#[inline(always)]
pub const fn ccmr1_input(&self) -> &CCMR1_INPUT {
unsafe { &*(self as *const Self).cast::<u8>().add(24usize).cast() }
}
#[doc = "0x18 - capture/compare mode register 1 (output mode)"]
#[inline(always)]
pub const fn ccmr1_output(&self) -> &CCMR1_OUTPUT {
unsafe { &*(self as *const Self).cast::<u8>().add(24usize).cast() }
}
#[doc = "0x1c - capture/compare mode register 2 (input mode)"]
#[inline(always)]
pub const fn ccmr2_input(&self) -> &CCMR2_INPUT {
unsafe { &*(self as *const Self).cast::<u8>().add(28usize).cast() }
}
#[doc = "0x1c - capture/compare mode register 2(output mode)"]
#[inline(always)]
pub const fn ccmr2_output(&self) -> &CCMR2_OUTPUT {
unsafe { &*(self as *const Self).cast::<u8>().add(28usize).cast() }
}
}
#[doc = "CR1 (rw) register accessor: an alias for `Reg<CR1_SPEC>`"]
pub type CR1 = crate::Reg<cr1::CR1_SPEC>;
#[doc = "control register 1"]
pub mod cr1;
#[doc = "CR2 (rw) register accessor: an alias for `Reg<CR2_SPEC>`"]
pub type CR2 = crate::Reg<cr2::CR2_SPEC>;
#[doc = "control register 2"]
pub mod cr2;
#[doc = "SMCR (rw) register accessor: an alias for `Reg<SMCR_SPEC>`"]
pub type SMCR = crate::Reg<smcr::SMCR_SPEC>;
#[doc = "slave mode control register 1"]
pub mod smcr;
#[doc = "DIER (rw) register accessor: an alias for `Reg<DIER_SPEC>`"]
pub type DIER = crate::Reg<dier::DIER_SPEC>;
#[doc = "DMA/Interrupt enable register"]
pub mod dier;
#[doc = "SR (rw) register accessor: an alias for `Reg<SR_SPEC>`"]
pub type SR = crate::Reg<sr::SR_SPEC>;
#[doc = "status register"]
pub mod sr;
#[doc = "EGR (w) register accessor: an alias for `Reg<EGR_SPEC>`"]
pub type EGR = crate::Reg<egr::EGR_SPEC>;
#[doc = "event generation register"]
pub mod egr;
#[doc = "CCMR1_Output (rw) register accessor: an alias for `Reg<CCMR1_OUTPUT_SPEC>`"]
pub type CCMR1_OUTPUT = crate::Reg<ccmr1_output::CCMR1_OUTPUT_SPEC>;
#[doc = "capture/compare mode register 1 (output mode)"]
pub mod ccmr1_output;
#[doc = "CCMR1_Input (rw) register accessor: an alias for `Reg<CCMR1_INPUT_SPEC>`"]
pub type CCMR1_INPUT = crate::Reg<ccmr1_input::CCMR1_INPUT_SPEC>;
#[doc = "capture/compare mode register 1 (input mode)"]
pub mod ccmr1_input;
#[doc = "CCMR2_Output (rw) register accessor: an alias for `Reg<CCMR2_OUTPUT_SPEC>`"]
pub type CCMR2_OUTPUT = crate::Reg<ccmr2_output::CCMR2_OUTPUT_SPEC>;
#[doc = "capture/compare mode register 2(output mode)"]
pub mod ccmr2_output;
#[doc = "CCMR2_Input (rw) register accessor: an alias for `Reg<CCMR2_INPUT_SPEC>`"]
pub type CCMR2_INPUT = crate::Reg<ccmr2_input::CCMR2_INPUT_SPEC>;
#[doc = "capture/compare mode register 2 (input mode)"]
pub mod ccmr2_input;
#[doc = "CCER (rw) register accessor: an alias for `Reg<CCER_SPEC>`"]
pub type CCER = crate::Reg<ccer::CCER_SPEC>;
#[doc = "capture/compare enable register"]
pub mod ccer;
#[doc = "CNT (rw) register accessor: an alias for `Reg<CNT_SPEC>`"]
pub type CNT = crate::Reg<cnt::CNT_SPEC>;
#[doc = "counter"]
pub mod cnt;
#[doc = "PSC (rw) register accessor: an alias for `Reg<PSC_SPEC>`"]
pub type PSC = crate::Reg<psc::PSC_SPEC>;
#[doc = "prescaler"]
pub mod psc;
#[doc = "ARR (rw) register accessor: an alias for `Reg<ARR_SPEC>`"]
pub type ARR = crate::Reg<arr::ARR_SPEC>;
#[doc = "auto-reload register"]
pub mod arr;
#[doc = "RCR (rw) register accessor: an alias for `Reg<RCR_SPEC>`"]
pub type RCR = crate::Reg<rcr::RCR_SPEC>;
#[doc = "repetition counter register"]
pub mod rcr;
#[doc = "CCR1 (rw) register accessor: an alias for `Reg<CCR1_SPEC>`"]
pub type CCR1 = crate::Reg<ccr1::CCR1_SPEC>;
#[doc = "capture/compare register 1"]
pub mod ccr1;
#[doc = "CCR2 (rw) register accessor: an alias for `Reg<CCR2_SPEC>`"]
pub type CCR2 = crate::Reg<ccr2::CCR2_SPEC>;
#[doc = "capture/compare register 2"]
pub mod ccr2;
#[doc = "CCR3 (rw) register accessor: an alias for `Reg<CCR3_SPEC>`"]
pub type CCR3 = crate::Reg<ccr3::CCR3_SPEC>;
#[doc = "capture/compare register 3"]
pub mod ccr3;
#[doc = "CCR4 (rw) register accessor: an alias for `Reg<CCR4_SPEC>`"]
pub type CCR4 = crate::Reg<ccr4::CCR4_SPEC>;
#[doc = "capture/compare register 4"]
pub mod ccr4;
#[doc = "BDTR (rw) register accessor: an alias for `Reg<BDTR_SPEC>`"]
pub type BDTR = crate::Reg<bdtr::BDTR_SPEC>;
#[doc = "break and dead-time register"]
pub mod bdtr;
#[doc = "DCR (w) register accessor: an alias for `Reg<DCR_SPEC>`"]
pub type DCR = crate::Reg<dcr::DCR_SPEC>;
#[doc = "DMA control register"]
pub mod dcr;
#[doc = "DMAR (w) register accessor: an alias for `Reg<DMAR_SPEC>`"]
pub type DMAR = crate::Reg<dmar::DMAR_SPEC>;
#[doc = "DMA address for full transfer"]
pub mod dmar;
#[doc = "CCMR3_Output (rw) register accessor: an alias for `Reg<CCMR3_OUTPUT_SPEC>`"]
pub type CCMR3_OUTPUT = crate::Reg<ccmr3_output::CCMR3_OUTPUT_SPEC>;
#[doc = "capture/compare mode register 3 (output mode)"]
pub mod ccmr3_output;
#[doc = "CCR5 (rw) register accessor: an alias for `Reg<CCR5_SPEC>`"]
pub type CCR5 = crate::Reg<ccr5::CCR5_SPEC>;
#[doc = "capture/compare register 5"]
pub mod ccr5;
#[doc = "PDER (rw) register accessor: an alias for `Reg<PDER_SPEC>`"]
pub type PDER = crate::Reg<pder::PDER_SPEC>;
#[doc = "PWM/DMA repeat enable register"]
pub mod pder;
#[doc = "CCR1FALL (rw) register accessor: an alias for `Reg<CCR1FALL_SPEC>`"]
pub type CCR1FALL = crate::Reg<ccr1fall::CCR1FALL_SPEC>;
#[doc = "pwm shift count CCR1 register"]
pub mod ccr1fall;
#[doc = "CCR2FALL (rw) register accessor: an alias for `Reg<CCR2FALL_SPEC>`"]
pub type CCR2FALL = crate::Reg<ccr2fall::CCR2FALL_SPEC>;
#[doc = "pwm shift count CCR2 register"]
pub mod ccr2fall;
#[doc = "CCR3FALL (rw) register accessor: an alias for `Reg<CCR3FALL_SPEC>`"]
pub type CCR3FALL = crate::Reg<ccr3fall::CCR3FALL_SPEC>;
#[doc = "pwm shift count CCR3 register"]
pub mod ccr3fall;
#[doc = "CCR4FALL (rw) register accessor: an alias for `Reg<CCR4FALL_SPEC>`"]
pub type CCR4FALL = crate::Reg<ccr4fall::CCR4FALL_SPEC>;
#[doc = "pwm shift count CCR4 register"]
pub mod ccr4fall;
#[doc = "CCR5FALL (rw) register accessor: an alias for `Reg<CCR5FALL_SPEC>`"]
pub type CCR5FALL = crate::Reg<ccr5fall::CCR5FALL_SPEC>;
#[doc = "pwm shift count CCR5 register"]
pub mod ccr5fall;