Struct rp2040_pac::DMA
source · pub struct DMA { /* private fields */ }
Expand description
DMA with separate read and write masters
Implementations§
source§impl DMA
impl DMA
sourcepub const PTR: *const RegisterBlock = {0x50000000 as *const dma::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x50000000 as *const dma::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
sourcepub fn ch(&self, n: usize) -> &CH
pub fn ch(&self, n: usize) -> &CH
0x00..0x300 - Cluster CH%s, containing CH?_READ_ADDR,CH??_READ_ADDR, CH?_WRITE_ADDR,CH??_WRITE_ADDR, CH?_TRANS_COUNT,CH??_TRANS_COUNT, CH?_CTRL_TRIG,CH??_CTRL_TRIG, CH?_AL1_CTRL,CH??_AL1_CTRL, CH?_AL1_READ_ADDR,CH??_AL1_READ_ADDR, CH?_AL1_WRITE_ADDR,CH??_AL1_WRITE_ADDR, CH?_AL1_TRANS_COUNT_TRIG,CH??_AL1_TRANS_COUNT_TRIG, CH?_AL2_CTRL,CH??_AL2_CTRL, CH?_AL2_TRANS_COUNT,CH??_AL2_TRANS_COUNT, CH?_AL2_READ_ADDR,CH??_AL2_READ_ADDR, CH?_AL2_WRITE_ADDR_TRIG,CH??_AL2_WRITE_ADDR_TRIG, CH?_AL3_CTRL,CH??_AL3_CTRL, CH?_AL3_WRITE_ADDR,CH??_AL3_WRITE_ADDR, CH?_AL3_TRANS_COUNT,CH??_AL3_TRANS_COUNT, CH?_AL3_READ_ADDR_TRIG,CH??_AL3_READ_ADDR_TRIG
sourcepub fn ch_iter(&self) -> impl Iterator<Item = &CH>
pub fn ch_iter(&self) -> impl Iterator<Item = &CH>
Iterator for array of: 0x00..0x300 - Cluster CH%s, containing CH?_READ_ADDR,CH??_READ_ADDR, CH?_WRITE_ADDR,CH??_WRITE_ADDR, CH?_TRANS_COUNT,CH??_TRANS_COUNT, CH?_CTRL_TRIG,CH??_CTRL_TRIG, CH?_AL1_CTRL,CH??_AL1_CTRL, CH?_AL1_READ_ADDR,CH??_AL1_READ_ADDR, CH?_AL1_WRITE_ADDR,CH??_AL1_WRITE_ADDR, CH?_AL1_TRANS_COUNT_TRIG,CH??_AL1_TRANS_COUNT_TRIG, CH?_AL2_CTRL,CH??_AL2_CTRL, CH?_AL2_TRANS_COUNT,CH??_AL2_TRANS_COUNT, CH?_AL2_READ_ADDR,CH??_AL2_READ_ADDR, CH?_AL2_WRITE_ADDR_TRIG,CH??_AL2_WRITE_ADDR_TRIG, CH?_AL3_CTRL,CH??_AL3_CTRL, CH?_AL3_WRITE_ADDR,CH??_AL3_WRITE_ADDR, CH?_AL3_TRANS_COUNT,CH??_AL3_TRANS_COUNT, CH?_AL3_READ_ADDR_TRIG,CH??_AL3_READ_ADDR_TRIG
sourcepub fn timer0(&self) -> &TIMER0
pub fn timer0(&self) -> &TIMER0
0x420 - Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
sourcepub fn timer1(&self) -> &TIMER1
pub fn timer1(&self) -> &TIMER1
0x424 - Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
sourcepub fn timer2(&self) -> &TIMER2
pub fn timer2(&self) -> &TIMER2
0x428 - Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
sourcepub fn timer3(&self) -> &TIMER3
pub fn timer3(&self) -> &TIMER3
0x42c - Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
sourcepub fn multi_chan_trigger(&self) -> &MULTI_CHAN_TRIGGER
pub fn multi_chan_trigger(&self) -> &MULTI_CHAN_TRIGGER
0x430 - Trigger one or more channels simultaneously
sourcepub fn sniff_ctrl(&self) -> &SNIFF_CTRL
pub fn sniff_ctrl(&self) -> &SNIFF_CTRL
0x434 - Sniffer Control
sourcepub fn sniff_data(&self) -> &SNIFF_DATA
pub fn sniff_data(&self) -> &SNIFF_DATA
0x438 - Data accumulator for sniff hardware
Write an initial seed value here before starting a DMA transfer on the channel indicated by SNIFF_CTRL_DMACH. The hardware will update this register each time it observes a read from the indicated channel. Once the channel completes, the final result can be read from this register.
sourcepub fn fifo_levels(&self) -> &FIFO_LEVELS
pub fn fifo_levels(&self) -> &FIFO_LEVELS
0x440 - Debug RAF, WAF, TDF levels
sourcepub fn chan_abort(&self) -> &CHAN_ABORT
pub fn chan_abort(&self) -> &CHAN_ABORT
0x444 - Abort an in-progress transfer sequence on one or more channels
sourcepub fn n_channels(&self) -> &N_CHANNELS
pub fn n_channels(&self) -> &N_CHANNELS
0x448 - The number of channels this DMA instance is equipped with. This DMA supports up to 16 hardware channels, but can be configured with as few as one, to minimise silicon area.
sourcepub fn ch0_dbg_ctdreq(&self) -> &CH0_DBG_CTDREQ
pub fn ch0_dbg_ctdreq(&self) -> &CH0_DBG_CTDREQ
0x800 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch0_dbg_tcr(&self) -> &CH0_DBG_TCR
pub fn ch0_dbg_tcr(&self) -> &CH0_DBG_TCR
0x804 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch1_dbg_ctdreq(&self) -> &CH1_DBG_CTDREQ
pub fn ch1_dbg_ctdreq(&self) -> &CH1_DBG_CTDREQ
0x840 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch1_dbg_tcr(&self) -> &CH1_DBG_TCR
pub fn ch1_dbg_tcr(&self) -> &CH1_DBG_TCR
0x844 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch2_dbg_ctdreq(&self) -> &CH2_DBG_CTDREQ
pub fn ch2_dbg_ctdreq(&self) -> &CH2_DBG_CTDREQ
0x880 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch2_dbg_tcr(&self) -> &CH2_DBG_TCR
pub fn ch2_dbg_tcr(&self) -> &CH2_DBG_TCR
0x884 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch3_dbg_ctdreq(&self) -> &CH3_DBG_CTDREQ
pub fn ch3_dbg_ctdreq(&self) -> &CH3_DBG_CTDREQ
0x8c0 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch3_dbg_tcr(&self) -> &CH3_DBG_TCR
pub fn ch3_dbg_tcr(&self) -> &CH3_DBG_TCR
0x8c4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch4_dbg_ctdreq(&self) -> &CH4_DBG_CTDREQ
pub fn ch4_dbg_ctdreq(&self) -> &CH4_DBG_CTDREQ
0x900 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch4_dbg_tcr(&self) -> &CH4_DBG_TCR
pub fn ch4_dbg_tcr(&self) -> &CH4_DBG_TCR
0x904 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch5_dbg_ctdreq(&self) -> &CH5_DBG_CTDREQ
pub fn ch5_dbg_ctdreq(&self) -> &CH5_DBG_CTDREQ
0x940 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch5_dbg_tcr(&self) -> &CH5_DBG_TCR
pub fn ch5_dbg_tcr(&self) -> &CH5_DBG_TCR
0x944 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch6_dbg_ctdreq(&self) -> &CH6_DBG_CTDREQ
pub fn ch6_dbg_ctdreq(&self) -> &CH6_DBG_CTDREQ
0x980 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch6_dbg_tcr(&self) -> &CH6_DBG_TCR
pub fn ch6_dbg_tcr(&self) -> &CH6_DBG_TCR
0x984 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch7_dbg_ctdreq(&self) -> &CH7_DBG_CTDREQ
pub fn ch7_dbg_ctdreq(&self) -> &CH7_DBG_CTDREQ
0x9c0 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch7_dbg_tcr(&self) -> &CH7_DBG_TCR
pub fn ch7_dbg_tcr(&self) -> &CH7_DBG_TCR
0x9c4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch8_dbg_ctdreq(&self) -> &CH8_DBG_CTDREQ
pub fn ch8_dbg_ctdreq(&self) -> &CH8_DBG_CTDREQ
0xa00 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch8_dbg_tcr(&self) -> &CH8_DBG_TCR
pub fn ch8_dbg_tcr(&self) -> &CH8_DBG_TCR
0xa04 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch9_dbg_ctdreq(&self) -> &CH9_DBG_CTDREQ
pub fn ch9_dbg_ctdreq(&self) -> &CH9_DBG_CTDREQ
0xa40 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch9_dbg_tcr(&self) -> &CH9_DBG_TCR
pub fn ch9_dbg_tcr(&self) -> &CH9_DBG_TCR
0xa44 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch10_dbg_ctdreq(&self) -> &CH10_DBG_CTDREQ
pub fn ch10_dbg_ctdreq(&self) -> &CH10_DBG_CTDREQ
0xa80 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch10_dbg_tcr(&self) -> &CH10_DBG_TCR
pub fn ch10_dbg_tcr(&self) -> &CH10_DBG_TCR
0xa84 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
sourcepub fn ch11_dbg_ctdreq(&self) -> &CH11_DBG_CTDREQ
pub fn ch11_dbg_ctdreq(&self) -> &CH11_DBG_CTDREQ
0xac0 - Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
sourcepub fn ch11_dbg_tcr(&self) -> &CH11_DBG_TCR
pub fn ch11_dbg_tcr(&self) -> &CH11_DBG_TCR
0xac4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer