pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type CKPSC_R = crate::FieldReader;
pub type CKPSC_W<'a, REG> = crate::FieldWriter<'a, REG, 3, u8, crate::Safe>;
pub use crate::stm32h753::hrtim_master::cr::CONT;
pub use crate::stm32h753::hrtim_master::cr::CONT_R;
pub use crate::stm32h753::hrtim_master::cr::CONT_W;
pub use crate::stm32h753::hrtim_master::cr::HALF;
pub use crate::stm32h753::hrtim_master::cr::HALF_R;
pub use crate::stm32h753::hrtim_master::cr::HALF_W;
pub use crate::stm32h753::hrtim_master::cr::RETRIG;
pub use crate::stm32h753::hrtim_master::cr::RETRIG_R;
pub use crate::stm32h753::hrtim_master::cr::RETRIG_W;
pub use crate::stm32h753::hrtim_master::cr::SYNCRST;
pub use crate::stm32h753::hrtim_master::cr::SYNCRST_R;
pub use crate::stm32h753::hrtim_master::cr::SYNCRST_W;
pub use crate::stm32h753::hrtim_master::cr::SYNCSTRT;
pub use crate::stm32h753::hrtim_master::cr::SYNCSTRT_R;
pub use crate::stm32h753::hrtim_master::cr::SYNCSTRT_W;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP2;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP2_R;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP2_W;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP4;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP4_R;
pub use crate::stm32h753::hrtim_tima::cr::DELCMP4_W;
pub use crate::stm32h753::hrtim_tima::cr::PSHPLL;
pub use crate::stm32h753::hrtim_tima::cr::PSHPLL_R;
pub use crate::stm32h753::hrtim_tima::cr::PSHPLL_W;
pub use crate::stm32h753::hrtim_tima::cr::TREPU;
pub use crate::stm32h753::hrtim_tima::cr::TREPU_R;
pub use crate::stm32h753::hrtim_tima::cr::TREPU_W;
pub use crate::stm32h753::hrtim_tima::cr::TRSTU;
pub use crate::stm32h753::hrtim_tima::cr::TRSTU_R;
pub use crate::stm32h753::hrtim_tima::cr::TRSTU_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TBU {
Disabled = 0,
Enabled = 1,
}
impl From<TBU> for bool {
#[inline(always)]
fn from(variant: TBU) -> Self {
variant as u8 != 0
}
}
pub type TBU_R = crate::BitReader<TBU>;
impl TBU_R {
#[inline(always)]
pub const fn variant(&self) -> TBU {
match self.bits {
false => TBU::Disabled,
true => TBU::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TBU::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TBU::Enabled
}
}
pub type TBU_W<'a, REG> = crate::BitWriter<'a, REG, TBU>;
impl<'a, REG> TBU_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TBU::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TBU::Enabled)
}
}
pub use crate::stm32h753::hrtim_master::cr::DACSYNC;
pub use crate::stm32h753::hrtim_master::cr::DACSYNC_R;
pub use crate::stm32h753::hrtim_master::cr::DACSYNC_W;
pub use crate::stm32h753::hrtim_master::cr::PREEN;
pub use crate::stm32h753::hrtim_master::cr::PREEN_R;
pub use crate::stm32h753::hrtim_master::cr::PREEN_W;
pub use crate::stm32h753::hrtim_tima::cr::MSTU;
pub use crate::stm32h753::hrtim_tima::cr::MSTU_R;
pub use crate::stm32h753::hrtim_tima::cr::MSTU_W;
pub use crate::stm32h753::hrtim_tima::cr::UPDGAT;
pub use crate::stm32h753::hrtim_tima::cr::UPDGAT_R;
pub use crate::stm32h753::hrtim_tima::cr::UPDGAT_W;
pub use TBU_R as TCU_R;
pub use TBU_R as TDU_R;
pub use TBU_R as TEU_R;
pub use TBU_W as TCU_W;
pub use TBU_W as TDU_W;
pub use TBU_W as TEU_W;
impl R {
#[inline(always)]
pub fn ckpsc(&self) -> CKPSC_R {
CKPSC_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn cont(&self) -> CONT_R {
CONT_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn retrig(&self) -> RETRIG_R {
RETRIG_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn half(&self) -> HALF_R {
HALF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn pshpll(&self) -> PSHPLL_R {
PSHPLL_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn syncrst(&self) -> SYNCRST_R {
SYNCRST_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn syncstrt(&self) -> SYNCSTRT_R {
SYNCSTRT_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn delcmp2(&self) -> DELCMP2_R {
DELCMP2_R::new(((self.bits >> 12) & 3) as u8)
}
#[inline(always)]
pub fn delcmp4(&self) -> DELCMP4_R {
DELCMP4_R::new(((self.bits >> 14) & 3) as u8)
}
#[inline(always)]
pub fn trepu(&self) -> TREPU_R {
TREPU_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn trstu(&self) -> TRSTU_R {
TRSTU_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn tbu(&self) -> TBU_R {
TBU_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn tcu(&self) -> TCU_R {
TCU_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn tdu(&self) -> TDU_R {
TDU_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn teu(&self) -> TEU_R {
TEU_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn mstu(&self) -> MSTU_R {
MSTU_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn dacsync(&self) -> DACSYNC_R {
DACSYNC_R::new(((self.bits >> 25) & 3) as u8)
}
#[inline(always)]
pub fn preen(&self) -> PREEN_R {
PREEN_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn updgat(&self) -> UPDGAT_R {
UPDGAT_R::new(((self.bits >> 28) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("updgat", &self.updgat())
.field("preen", &self.preen())
.field("dacsync", &self.dacsync())
.field("mstu", &self.mstu())
.field("tbu", &self.tbu())
.field("teu", &self.teu())
.field("tdu", &self.tdu())
.field("tcu", &self.tcu())
.field("trstu", &self.trstu())
.field("trepu", &self.trepu())
.field("delcmp4", &self.delcmp4())
.field("delcmp2", &self.delcmp2())
.field("syncstrt", &self.syncstrt())
.field("syncrst", &self.syncrst())
.field("pshpll", &self.pshpll())
.field("half", &self.half())
.field("retrig", &self.retrig())
.field("cont", &self.cont())
.field("ckpsc", &self.ckpsc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ckpsc(&mut self) -> CKPSC_W<CRrs> {
CKPSC_W::new(self, 0)
}
#[inline(always)]
pub fn cont(&mut self) -> CONT_W<CRrs> {
CONT_W::new(self, 3)
}
#[inline(always)]
pub fn retrig(&mut self) -> RETRIG_W<CRrs> {
RETRIG_W::new(self, 4)
}
#[inline(always)]
pub fn half(&mut self) -> HALF_W<CRrs> {
HALF_W::new(self, 5)
}
#[inline(always)]
pub fn pshpll(&mut self) -> PSHPLL_W<CRrs> {
PSHPLL_W::new(self, 6)
}
#[inline(always)]
pub fn syncrst(&mut self) -> SYNCRST_W<CRrs> {
SYNCRST_W::new(self, 10)
}
#[inline(always)]
pub fn syncstrt(&mut self) -> SYNCSTRT_W<CRrs> {
SYNCSTRT_W::new(self, 11)
}
#[inline(always)]
pub fn delcmp2(&mut self) -> DELCMP2_W<CRrs> {
DELCMP2_W::new(self, 12)
}
#[inline(always)]
pub fn delcmp4(&mut self) -> DELCMP4_W<CRrs> {
DELCMP4_W::new(self, 14)
}
#[inline(always)]
pub fn trepu(&mut self) -> TREPU_W<CRrs> {
TREPU_W::new(self, 17)
}
#[inline(always)]
pub fn trstu(&mut self) -> TRSTU_W<CRrs> {
TRSTU_W::new(self, 18)
}
#[inline(always)]
pub fn tbu(&mut self) -> TBU_W<CRrs> {
TBU_W::new(self, 20)
}
#[inline(always)]
pub fn tcu(&mut self) -> TCU_W<CRrs> {
TCU_W::new(self, 21)
}
#[inline(always)]
pub fn tdu(&mut self) -> TDU_W<CRrs> {
TDU_W::new(self, 22)
}
#[inline(always)]
pub fn teu(&mut self) -> TEU_W<CRrs> {
TEU_W::new(self, 23)
}
#[inline(always)]
pub fn mstu(&mut self) -> MSTU_W<CRrs> {
MSTU_W::new(self, 24)
}
#[inline(always)]
pub fn dacsync(&mut self) -> DACSYNC_W<CRrs> {
DACSYNC_W::new(self, 25)
}
#[inline(always)]
pub fn preen(&mut self) -> PREEN_W<CRrs> {
PREEN_W::new(self, 27)
}
#[inline(always)]
pub fn updgat(&mut self) -> UPDGAT_W<CRrs> {
UPDGAT_W::new(self, 28)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}