lpc82x_pac/dma0/
active0.rs

1#[doc = "Register `ACTIVE0` reader"]
2pub struct R(crate::R<ACTIVE0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ACTIVE0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ACTIVE0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ACTIVE0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `ACT` reader - Active flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits = number of DMA channels in this device. Other bits are reserved. 0 = not active. 1 = active."]
17pub struct ACT_R(crate::FieldReader<u32, u32>);
18impl ACT_R {
19    pub(crate) fn new(bits: u32) -> Self {
20        ACT_R(crate::FieldReader::new(bits))
21    }
22}
23impl core::ops::Deref for ACT_R {
24    type Target = crate::FieldReader<u32, u32>;
25    #[inline(always)]
26    fn deref(&self) -> &Self::Target {
27        &self.0
28    }
29}
30impl R {
31    #[doc = "Bits 0:17 - Active flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits = number of DMA channels in this device. Other bits are reserved. 0 = not active. 1 = active."]
32    #[inline(always)]
33    pub fn act(&self) -> ACT_R {
34        ACT_R::new((self.bits & 0x0003_ffff) as u32)
35    }
36}
37#[doc = "Channel Active status for all DMA channels.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [active0](index.html) module"]
38pub struct ACTIVE0_SPEC;
39impl crate::RegisterSpec for ACTIVE0_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [active0::R](R) reader structure"]
43impl crate::Readable for ACTIVE0_SPEC {
44    type Reader = R;
45}
46#[doc = "`reset()` method sets ACTIVE0 to value 0"]
47impl crate::Resettable for ACTIVE0_SPEC {
48    #[inline(always)]
49    fn reset_value() -> Self::Ux {
50        0
51    }
52}