1#[doc = "Register `CH_TRANS_COUNT` reader"]
2pub type R = crate::R<CH_TRANS_COUNT_SPEC>;
3#[doc = "Register `CH_TRANS_COUNT` writer"]
4pub type W = crate::W<CH_TRANS_COUNT_SPEC>;
5impl core::fmt::Debug for R {
6fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
7write!(f, "{}", self.bits())
8 }
9}
10impl core::fmt::Debug for crate::generic::Reg<CH_TRANS_COUNT_SPEC> {
11fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12 core::fmt::Debug::fmt(&self.read(), f)
13 }
14}
15impl W {
16#[doc = r" Writes raw bits to the register."]
17 #[doc = r""]
18 #[doc = r" # Safety"]
19 #[doc = r""]
20 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
21 #[inline(always)]
22pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
23self.bits = bits;
24self
25}
26}
27#[doc = "DMA Channel 0 Transfer Count
28 Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).
2930 When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.
3132 Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.
3334 The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD.
3536You can [`read`](crate::generic::Reg::read) this register and get [`ch_trans_count::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 [`ch_trans_count::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct CH_TRANS_COUNT_SPEC;
38impl crate::RegisterSpec for CH_TRANS_COUNT_SPEC {
39type Ux = u32;
40}
41#[doc = "`read()` method returns [`ch_trans_count::R`](R) reader structure"]
42impl crate::Readable for CH_TRANS_COUNT_SPEC {}
43#[doc = "`write(|w| ..)` method takes [`ch_trans_count::W`](W) writer structure"]
44impl crate::Writable for CH_TRANS_COUNT_SPEC {
45const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
46const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
47}
48#[doc = "`reset()` method sets CH_TRANS_COUNT to value 0"]
49impl crate::Resettable for CH_TRANS_COUNT_SPEC {
50const RESET_VALUE: u32 = 0;
51}