53static volatile struct channel_ctrl channel_config[UDMA_CONF_MAX_CHANNEL + 1]
54 __attribute__ ((section(".udma_channel_control_table")));
59 memset((
void *)&channel_config, 0,
sizeof(channel_config));
72 if(channel > UDMA_CONF_MAX_CHANNEL) {
76 channel_config[channel].src_end_ptr = src_end;
82 if(channel > UDMA_CONF_MAX_CHANNEL) {
86 channel_config[channel].dst_end_ptr = dst_end;
92 if(channel > UDMA_CONF_MAX_CHANNEL) {
96 channel_config[channel].ctrl_word = ctrl;
105 if(channel > UDMA_CONF_MAX_CHANNEL) {
110 base_chmap += (channel >> 3) * 4;
113 shift = (channel & 0x07);
116 REG(base_chmap) = (REG(base_chmap) & ~(0x0F << shift)) | (enc << shift);
122 if(channel > UDMA_CONF_MAX_CHANNEL) {
132 if(channel > UDMA_CONF_MAX_CHANNEL) {
143 if(channel > UDMA_CONF_MAX_CHANNEL) {
153 if(channel > UDMA_CONF_MAX_CHANNEL) {
164 if(channel > UDMA_CONF_MAX_CHANNEL) {
174 if(channel > UDMA_CONF_MAX_CHANNEL) {
185 if(channel > UDMA_CONF_MAX_CHANNEL) {
195 if(channel > UDMA_CONF_MAX_CHANNEL) {
206 if(channel > UDMA_CONF_MAX_CHANNEL) {
216 if(channel > UDMA_CONF_MAX_CHANNEL) {
227 if(channel > UDMA_CONF_MAX_CHANNEL) {
237 if(channel > UDMA_CONF_MAX_CHANNEL) {
241 return (channel_config[channel].ctrl_word & 0x07);
@ UDMA_ERR_IRQn
µDMA Error Interrupt
@ UDMA_SW_IRQn
µDMA Software Interrupt
void udma_set_channel_dst(uint8_t channel, uint32_t dst_end)
Sets the channel's destination address.
void udma_init()
Initialise the uDMA driver.
void udma_channel_mask_set(uint8_t channel)
Disable peripheral triggers for a uDMA channel.
#define UDMA_ERRCLR
DMA bus error clear.
void udma_channel_enable(uint8_t channel)
Enables a uDMA channel.
#define UDMA_ALTCLR
DMA channel primary alternate clear.
uint8_t udma_channel_get_mode(uint8_t channel)
Retrieve the current mode for a channel.
void udma_channel_sw_request(uint8_t channel)
Generate a software trigger to start a transfer.
void udma_channel_use_burst(uint8_t channel)
Configure a channel to only use burst transfers.
#define UDMA_CFG
DMA configuration.
#define UDMA_PRIOCLR
DMA channel priority clear.
#define UDMA_USEBURSTCLR
DMA channel useburst clear.
#define UDMA_PRIOSET
DMA channel priority set.
void udma_channel_disable(uint8_t channel)
Disables a uDMA channel.
#define UDMA_SWREQ
DMA channel software request.
void udma_channel_prio_set_high(uint8_t channel)
Set a uDMA channel to high priority.
void udma_channel_mask_clr(uint8_t channel)
Enable peripheral triggers for a uDMA channel.
void udma_set_channel_control_word(uint8_t channel, uint32_t ctrl)
Configure the channel's control word.
#define UDMA_ENASET
DMA channel enable set.
#define UDMA_USEBURSTSET
DMA channel useburst set.
#define UDMA_REQMASKCLR
DMA channel request mask clear.
#define UDMA_CHIS_CHIS
Channel [n] interrupt status.
#define UDMA_CHIS
DMA channel interrupt status.
#define UDMA_ALTSET
DMA channel primary alternate set.
void udma_set_channel_assignment(uint8_t channel, uint8_t enc)
Choose an encoding for a uDMA channel.
#define UDMA_CHMAP0
DMA channel map select 0.
#define UDMA_REQMASKSET
DMA channel request mask set.
void udma_channel_use_single(uint8_t channel)
Configure a channel to use single as well as burst requests.
#define UDMA_ENACLR
DMA channel enable clear.
#define UDMA_CTLBASE
DMA channel control base pointer.
void udma_channel_use_primary(uint8_t channel)
Use the primary control data structure for a channel.
void udma_channel_prio_set_default(uint8_t channel)
Set a uDMA channel to default priority.
void udma_set_channel_src(uint8_t channel, uint32_t src_end)
Sets the channels source address.
void udma_channel_use_alternate(uint8_t channel)
Use the alternate control data structure for a channel.
#define UDMA_CFG_MASTEN
Controller master enable.
Header file for the ARM Nested Vectored Interrupt Controller.
Header file with register manipulation macro definitions.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...