1#[doc = "Register `DT1` reader"]
2pub type R = crate::R<Dt1Spec>;
3#[doc = "Register `DT1` writer"]
4pub type W = crate::W<Dt1Spec>;
5#[doc = "Field `DTH` reader - Dead-Time Value for PWMHx Output"]
6pub type DthR = crate::FieldReader<u16>;
7#[doc = "Field `DTH` writer - Dead-Time Value for PWMHx Output"]
8pub type DthW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `DTL` reader - Dead-Time Value for PWMLx Output"]
10pub type DtlR = crate::FieldReader<u16>;
11#[doc = "Field `DTL` writer - Dead-Time Value for PWMLx Output"]
12pub type DtlW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13impl R {
14 #[doc = "Bits 0:15 - Dead-Time Value for PWMHx Output"]
15 #[inline(always)]
16 pub fn dth(&self) -> DthR {
17 DthR::new((self.bits & 0xffff) as u16)
18 }
19 #[doc = "Bits 16:31 - Dead-Time Value for PWMLx Output"]
20 #[inline(always)]
21 pub fn dtl(&self) -> DtlR {
22 DtlR::new(((self.bits >> 16) & 0xffff) as u16)
23 }
24}
25impl W {
26 #[doc = "Bits 0:15 - Dead-Time Value for PWMHx Output"]
27 #[inline(always)]
28 #[must_use]
29 pub fn dth(&mut self) -> DthW<Dt1Spec> {
30 DthW::new(self, 0)
31 }
32 #[doc = "Bits 16:31 - Dead-Time Value for PWMLx Output"]
33 #[inline(always)]
34 #[must_use]
35 pub fn dtl(&mut self) -> DtlW<Dt1Spec> {
36 DtlW::new(self, 16)
37 }
38}
39#[doc = "PWM Channel Dead Time Register (ch_num = 1)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dt1::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`dt1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct Dt1Spec;
41impl crate::RegisterSpec for Dt1Spec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`dt1::R`](R) reader structure"]
45impl crate::Readable for Dt1Spec {}
46#[doc = "`write(|w| ..)` method takes [`dt1::W`](W) writer structure"]
47impl crate::Writable for Dt1Spec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets DT1 to value 0"]
53impl crate::Resettable for Dt1Spec {
54 const RESET_VALUE: u32 = 0;
55}