iwrl64xx_pac/tpcc_b/
ccnt.rs

1#[doc = "Register `CCNT` reader"]
2pub type R = crate::R<CcntSpec>;
3#[doc = "Register `CCNT` writer"]
4pub type W = crate::W<CcntSpec>;
5#[doc = "Field `CCNT` reader - 15:0\\]
6CCNT : Count for 3rd Dimension: CCNT is a 16-bit unsigned value that specifies the number of frames in a block. Valid values for CCNT can be anywhere between 1 and 65535. Therefore the maximum number of frames in a block is 65535 (64K-1 frames). CCNT of '1' means '1' frame in the block and CCNT of '0' means '0' frames in the block. A CCNT value of '0' is considered as either a null or dummy transfer. A Dummy or Null transfer will generate a Completion code depending on the settings of the completion bit fields of the OPT field. WIMODE has no affect on CCNT operation."]
7pub type CcntR = crate::FieldReader<u16>;
8#[doc = "Field `CCNT` writer - 15:0\\]
9CCNT : Count for 3rd Dimension: CCNT is a 16-bit unsigned value that specifies the number of frames in a block. Valid values for CCNT can be anywhere between 1 and 65535. Therefore the maximum number of frames in a block is 65535 (64K-1 frames). CCNT of '1' means '1' frame in the block and CCNT of '0' means '0' frames in the block. A CCNT value of '0' is considered as either a null or dummy transfer. A Dummy or Null transfer will generate a Completion code depending on the settings of the completion bit fields of the OPT field. WIMODE has no affect on CCNT operation."]
10pub type CcntW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
11#[doc = "Field `RES86` reader - 31:16\\]
12RESERVE FIELD"]
13pub type Res86R = crate::FieldReader<u16>;
14#[doc = "Field `RES86` writer - 31:16\\]
15RESERVE FIELD"]
16pub type Res86W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
17impl R {
18    #[doc = "Bits 0:15 - 15:0\\]
19CCNT : Count for 3rd Dimension: CCNT is a 16-bit unsigned value that specifies the number of frames in a block. Valid values for CCNT can be anywhere between 1 and 65535. Therefore the maximum number of frames in a block is 65535 (64K-1 frames). CCNT of '1' means '1' frame in the block and CCNT of '0' means '0' frames in the block. A CCNT value of '0' is considered as either a null or dummy transfer. A Dummy or Null transfer will generate a Completion code depending on the settings of the completion bit fields of the OPT field. WIMODE has no affect on CCNT operation."]
20    #[inline(always)]
21    pub fn ccnt(&self) -> CcntR {
22        CcntR::new((self.bits & 0xffff) as u16)
23    }
24    #[doc = "Bits 16:31 - 31:16\\]
25RESERVE FIELD"]
26    #[inline(always)]
27    pub fn res86(&self) -> Res86R {
28        Res86R::new(((self.bits >> 16) & 0xffff) as u16)
29    }
30}
31impl W {
32    #[doc = "Bits 0:15 - 15:0\\]
33CCNT : Count for 3rd Dimension: CCNT is a 16-bit unsigned value that specifies the number of frames in a block. Valid values for CCNT can be anywhere between 1 and 65535. Therefore the maximum number of frames in a block is 65535 (64K-1 frames). CCNT of '1' means '1' frame in the block and CCNT of '0' means '0' frames in the block. A CCNT value of '0' is considered as either a null or dummy transfer. A Dummy or Null transfer will generate a Completion code depending on the settings of the completion bit fields of the OPT field. WIMODE has no affect on CCNT operation."]
34    #[inline(always)]
35    #[must_use]
36    pub fn ccnt(&mut self) -> CcntW<CcntSpec> {
37        CcntW::new(self, 0)
38    }
39    #[doc = "Bits 16:31 - 31:16\\]
40RESERVE FIELD"]
41    #[inline(always)]
42    #[must_use]
43    pub fn res86(&mut self) -> Res86W<CcntSpec> {
44        Res86W::new(self, 16)
45    }
46}
47#[doc = "C byte count\n\nYou can [`read`](crate::Reg::read) this register and get [`ccnt::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ccnt::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct CcntSpec;
49impl crate::RegisterSpec for CcntSpec {
50    type Ux = u32;
51}
52#[doc = "`read()` method returns [`ccnt::R`](R) reader structure"]
53impl crate::Readable for CcntSpec {}
54#[doc = "`write(|w| ..)` method takes [`ccnt::W`](W) writer structure"]
55impl crate::Writable for CcntSpec {
56    type Safety = crate::Unsafe;
57    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
59}
60#[doc = "`reset()` method sets CCNT to value 0"]
61impl crate::Resettable for CcntSpec {
62    const RESET_VALUE: u32 = 0;
63}