atsamd11c/dmac/
chstatus.rs

1#[doc = "Register `CHSTATUS` reader"]
2pub type R = crate::R<ChstatusSpec>;
3#[doc = "Field `PEND` reader - Channel Pending"]
4pub type PendR = crate::BitReader;
5#[doc = "Field `BUSY` reader - Channel Busy"]
6pub type BusyR = crate::BitReader;
7#[doc = "Field `FERR` reader - Channel Fetch Error"]
8pub type FerrR = crate::BitReader;
9impl R {
10    #[doc = "Bit 0 - Channel Pending"]
11    #[inline(always)]
12    pub fn pend(&self) -> PendR {
13        PendR::new((self.bits & 1) != 0)
14    }
15    #[doc = "Bit 1 - Channel Busy"]
16    #[inline(always)]
17    pub fn busy(&self) -> BusyR {
18        BusyR::new(((self.bits >> 1) & 1) != 0)
19    }
20    #[doc = "Bit 2 - Channel Fetch Error"]
21    #[inline(always)]
22    pub fn ferr(&self) -> FerrR {
23        FerrR::new(((self.bits >> 2) & 1) != 0)
24    }
25}
26#[doc = "Channel Status\n\nYou can [`read`](crate::Reg::read) this register and get [`chstatus::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
27pub struct ChstatusSpec;
28impl crate::RegisterSpec for ChstatusSpec {
29    type Ux = u8;
30}
31#[doc = "`read()` method returns [`chstatus::R`](R) reader structure"]
32impl crate::Readable for ChstatusSpec {}
33#[doc = "`reset()` method sets CHSTATUS to value 0"]
34impl crate::Resettable for ChstatusSpec {
35    const RESET_VALUE: u8 = 0;
36}