38 #include "contiki-conf.h"
53 static volatile struct channel_ctrl channel_config[UDMA_CONF_MAX_CHANNEL + 1]
59 memset(&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);
#define UDMA_PRIOCLR
DMA channel priority 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.
Header file for the ARM Nested Vectored Interrupt Controller.
void udma_channel_disable(uint8_t channel)
Disables a uDMA channel.
void udma_set_channel_assignment(uint8_t channel, uint8_t enc)
Choose an encoding for a uDMA channel.
void udma_set_channel_src(uint8_t channel, uint32_t src_end)
Sets the channels source address.
void __attribute__((interrupt))
This ISR handles most of the business interacting with the 1-wire bus.
void udma_channel_use_alternate(uint8_t channel)
Use the alternate control data structure for a channel.
Header file with register, macro and function declarations for the cc2538 micro-DMA controller module...
void udma_channel_mask_clr(uint8_t channel)
Enable peripheral triggers for a uDMA channel.
#define UDMA_USEBURSTSET
DMA channel useburst set.
void nvic_interrupt_enable(uint32_t intr)
Enables interrupt intr.
#define UDMA_ALTCLR
DMA channel primary alternate clear.
#define UDMA_ERRCLR
DMA bus error clear.
void udma_channel_use_primary(uint8_t channel)
Use the primary control data structure for a channel.
#define NVIC_INT_UDMA_ERR
uDMA error
void udma_channel_enable(uint8_t channel)
Enables a uDMA channel.
#define UDMA_CFG
DMA configuration.
#define UDMA_CHIS
DMA channel interrupt status.
Header file with register manipulation macro definitions.
#define UDMA_ENASET
DMA channel enable set.
void udma_channel_prio_set_default(uint8_t channel)
Set a uDMA channel to default priority.
#define UDMA_USEBURSTCLR
DMA channel useburst clear.
#define UDMA_PRIOSET
DMA channel priority set.
void udma_channel_prio_set_high(uint8_t channel)
Set a uDMA channel to high priority.
#define UDMA_ENACLR
DMA channel enable clear.
void udma_set_channel_dst(uint8_t channel, uint32_t dst_end)
void udma_channel_mask_set(uint8_t channel)
Disable 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_SWREQ
DMA channel software request.
#define UDMA_REQMASKCLR
DMA channel request mask clear.
#define UDMA_CHMAP0
DMA channel map select 0.
#define UDMA_CTLBASE
DMA channel control base pointer.
#define UDMA_REQMASKSET
DMA channel request mask set.
#define NVIC_INT_UDMA
uDMA software
#define UDMA_CFG_MASTEN
Controller master enable.
void udma_channel_use_burst(uint8_t channel)
Configure a channel to only use burst transfers.
void udma_channel_use_single(uint8_t channel)
Configure a channel to use single as well as burst requests.
#define UDMA_CHIS_CHIS
Channel [n] interrupt status.
#define UDMA_ALTSET
DMA channel primary alternate set.
void udma_init()
Initialise the uDMA driver.