xdmac.c
Go to the documentation of this file.
1 
33 /*
34  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35  */
36 
37 #include "xdmac.h"
38 
47  uint32_t channel_num, xdmac_channel_config_t *cfg)
48 {
49  Assert(xdmac);
50  Assert(channel_num < XDMACCHID_NUMBER);
51  Assert(cfg);
52 
53  xdmac_channel_get_interrupt_status( xdmac, channel_num);
54  xdmac_channel_set_source_addr(xdmac, channel_num, cfg->mbr_sa);
55  xdmac_channel_set_destination_addr(xdmac, channel_num, cfg->mbr_da);
56  xdmac_channel_set_microblock_control(xdmac, channel_num, cfg->mbr_ubc);
57  xdmac_channel_set_block_control(xdmac, channel_num, cfg->mbr_bc);
58  xdmac_channel_set_datastride_mempattern(xdmac, channel_num, cfg->mbr_ds);
59  xdmac_channel_set_source_microblock_stride(xdmac, channel_num, cfg->mbr_sus);
61  xdmac_channel_set_config(xdmac, channel_num, cfg->mbr_cfg );
62 }
static void xdmac_channel_set_block_control(Xdmac *xdmac, uint32_t channel_num, uint32_t blen)
Set block length for the relevant channel of given XDMA.
static void xdmac_channel_set_datastride_mempattern(Xdmac *xdmac, uint32_t channel_num, uint32_t dds_msp)
Set the relevant channel&#39;s data stride memory pattern of given XDMA.
static void xdmac_channel_set_destination_addr(Xdmac *xdmac, uint32_t channel_num, uint32_t dst_addr)
Set destination address for the relevant channel of given XDMA.
static uint32_t xdmac_channel_get_interrupt_status(Xdmac *xdmac, uint32_t channel_num)
Get interrupt status for the relevant channel of given XDMA.
static void xdmac_channel_set_source_addr(Xdmac *xdmac, uint32_t channel_num, uint32_t src_addr)
Set source address for the relevant channel of given XDMA.
static void xdmac_channel_set_microblock_control(Xdmac *xdmac, uint32_t channel_num, uint32_t ublen)
Set microblock length for the relevant channel of given XDMA.
SAM XDMA Controller (DMAC) driver.
static void xdmac_channel_set_destination_microblock_stride(Xdmac *xdmac, uint32_t channel_num, uint32_t dubs)
Set the relevant channel&#39;s destination microblock stride of given XDMA.
void xdmac_configure_transfer(Xdmac *xdmac, uint32_t channel_num, xdmac_channel_config_t *cfg)
Configure DMA for a transfer.
Definition: xdmac.c:46
static void xdmac_channel_set_config(Xdmac *xdmac, uint32_t channel_num, uint32_t config)
Set configuration for the relevant channel of given XDMA.
#define XDMACCHID_NUMBER
Xdmac hardware registers.
#define Assert(expr)
This macro is used to test fatal errors.
Definition: compiler.h:196
static void xdmac_channel_set_source_microblock_stride(Xdmac *xdmac, uint32_t channel_num, uint32_t subs)
Set the relevant channel&#39;s source microblock stride of given XDMA.


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:58