rp2040_pac/dma/
chan_abort.rs

1#[doc = "Register `CHAN_ABORT` reader"]
2pub type R = crate::R<CHAN_ABORT_SPEC>;
3#[doc = "Register `CHAN_ABORT` writer"]
4pub type W = crate::W<CHAN_ABORT_SPEC>;
5#[doc = "Field `CHAN_ABORT` reader - Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.  
6
7 After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel."]
8pub type CHAN_ABORT_R = crate::FieldReader<u16>;
9#[doc = "Field `CHAN_ABORT` writer - Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.  
10
11 After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel."]
12pub type CHAN_ABORT_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13impl R {
14    #[doc = "Bits 0:15 - Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.  
15
16 After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel."]
17    #[inline(always)]
18    pub fn chan_abort(&self) -> CHAN_ABORT_R {
19        CHAN_ABORT_R::new((self.bits & 0xffff) as u16)
20    }
21}
22impl W {
23    #[doc = "Bits 0:15 - Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.  
24
25 After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel."]
26    #[inline(always)]
27    #[must_use]
28    pub fn chan_abort(&mut self) -> CHAN_ABORT_W<CHAN_ABORT_SPEC> {
29        CHAN_ABORT_W::new(self, 0)
30    }
31    #[doc = r" Writes raw bits to the register."]
32    #[doc = r""]
33    #[doc = r" # Safety"]
34    #[doc = r""]
35    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
36    #[inline(always)]
37    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
38        self.bits = bits;
39        self
40    }
41}
42#[doc = "Abort an in-progress transfer sequence on one or more channels  
43
44You can [`read`](crate::generic::Reg::read) this register and get [`chan_abort::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 [`chan_abort::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct CHAN_ABORT_SPEC;
46impl crate::RegisterSpec for CHAN_ABORT_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`chan_abort::R`](R) reader structure"]
50impl crate::Readable for CHAN_ABORT_SPEC {}
51#[doc = "`write(|w| ..)` method takes [`chan_abort::W`](W) writer structure"]
52impl crate::Writable for CHAN_ABORT_SPEC {
53    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
54    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
55}
56#[doc = "`reset()` method sets CHAN_ABORT to value 0"]
57impl crate::Resettable for CHAN_ABORT_SPEC {
58    const RESET_VALUE: u32 = 0;
59}