CC27xxDriverLibrary
udma.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_dma.h"
#include "debug.h"
#include "interrupt.h"
Include dependency graph for udma.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  uDMAControlTableEntry
 A structure that defines an entry in the channel control table. More...
 

Macros

#define uDMATaskStructEntry(transferCount, itemSize, srcIncrement, pSrcAddr, dstIncrement, pDstAddr, arbSize, mode)
 A helper macro for building scatter-gather task table entries. More...
 
#define UDMA_NUM_CHANNELS   8
 
#define UDMA_PRIORITY_LOW   0x00000000
 
#define UDMA_PRIORITY_HIGH   0x00000001
 
#define UDMA_ATTR_USEBURST   0x00000001
 
#define UDMA_ATTR_ALTSELECT   0x00000002
 
#define UDMA_ATTR_HIGH_PRIORITY   0x00000004
 
#define UDMA_ATTR_REQMASK   0x00000008
 
#define UDMA_ATTR_ALL   0x0000000F
 
#define UDMA_MODE_STOP   0x00000000
 
#define UDMA_MODE_BASIC   0x00000001
 
#define UDMA_MODE_AUTO   0x00000002
 
#define UDMA_MODE_PINGPONG   0x00000003
 
#define UDMA_MODE_MEM_SCATTER_GATHER   0x00000004
 
#define UDMA_MODE_PER_SCATTER_GATHER   0x00000006
 
#define UDMA_MODE_M   0x00000007
 
#define UDMA_MODE_ALT_SELECT   0x00000001
 
#define UDMA_DST_INC_8   0x00000000
 
#define UDMA_DST_INC_16   0x40000000
 
#define UDMA_DST_INC_32   0x80000000
 
#define UDMA_DST_INC_NONE   0xC0000000
 
#define UDMA_DST_INC_M   0xC0000000
 
#define UDMA_DST_INC_S   30
 
#define UDMA_SRC_INC_8   0x00000000
 
#define UDMA_SRC_INC_16   0x04000000
 
#define UDMA_SRC_INC_32   0x08000000
 
#define UDMA_SRC_INC_NONE   0x0c000000
 
#define UDMA_SRC_INC_M   0x0C000000
 
#define UDMA_SRC_INC_S   26
 
#define UDMA_SIZE_8   0x00000000
 
#define UDMA_SIZE_16   0x11000000
 
#define UDMA_SIZE_32   0x22000000
 
#define UDMA_SIZE_M   0x33000000
 
#define UDMA_SIZE_S   24
 
#define UDMA_ARB_1   0x00000000
 
#define UDMA_ARB_2   0x00004000
 
#define UDMA_ARB_4   0x00008000
 
#define UDMA_ARB_8   0x0000c000
 
#define UDMA_ARB_16   0x00010000
 
#define UDMA_ARB_32   0x00014000
 
#define UDMA_ARB_64   0x00018000
 
#define UDMA_ARB_128   0x0001c000
 
#define UDMA_ARB_256   0x00020000
 
#define UDMA_ARB_512   0x00024000
 
#define UDMA_ARB_1024   0x00028000
 
#define UDMA_ARB_M   0x0003C000
 
#define UDMA_ARB_S   14
 
#define UDMA_NEXT_USEBURST   0x00000008
 
#define UDMA_XFER_SIZE_MAX   1024
 
#define UDMA_XFER_SIZE_M   0x00003FF0
 
#define UDMA_XFER_SIZE_S   4
 
#define UDMA_CHANNEL_0_M   0x001
 UDMA channel 0 (SPI0_TX or UART1_RX) More...
 
#define UDMA_CHANNEL_1_M   0x002
 UDMA channel 1 (SPI0_RX or UART1_TX) More...
 
#define UDMA_CHANNEL_2_M   0x004
 UDMA channel 2 (LRFD or UART0_TX) More...
 
#define UDMA_CHANNEL_3_M   0x008
 UDMA channel 3 (ADC0 or UART0_RX) More...
 
#define UDMA_CHANNEL_4_M   0x010
 UDMA channel 4 (AES_A or LRFD) More...
 
#define UDMA_CHANNEL_5_M   0x020
 UDMA channel 5 (AES_B or ADC0) More...
 
#define UDMA_CHANNEL_6_M   0x040
 UDMA channel 6 (CAN_A or SPI1_TX) More...
 
#define UDMA_CHANNEL_7_M   0x080
 UDMA channel 7 (CAN_B or SPI1_RX) More...
 
#define UDMA_CHANNEL_8_M   0x100
 UDMA channel 8 (Software Event Channel 0) More...
 
#define UDMA_CHANNEL_9_M   0x200
 UDMA channel 9 (Software Event Channel 1) More...
 
#define UDMA_CHANNEL_10_M   0x400
 UDMA channel 10 (Software Event Channel 2) More...
 
#define UDMA_CHANNEL_11_M   0x800
 UDMA channel 11 (Software Event Channel 3) More...
 
#define UDMA_PRI_SELECT   0x00000000
 
#define UDMA_ALT_SELECT   0x00000010
 

Functions

__STATIC_INLINE void uDMAEnable (void)
 Enables the uDMA controller for use. More...
 
__STATIC_INLINE void uDMADisable (void)
 Disables the uDMA controller for use. More...
 
__STATIC_INLINE uint32_t uDMAGetErrorStatus (void)
 Gets the uDMA error status. More...
 
__STATIC_INLINE void uDMAClearErrorStatus (void)
 Clears the uDMA error interrupt. More...
 
__STATIC_INLINE void uDMAEnableChannel (uint32_t channelBitMask)
 Enables a uDMA channel for operation. More...
 
__STATIC_INLINE void uDMADisableChannel (uint32_t channelBitMask)
 Disables a uDMA channel for operation. More...
 
__STATIC_INLINE bool uDMAIsChannelEnabled (uint32_t channelBitMask)
 Checks if a uDMA channel is enabled for operation. More...
 
__STATIC_INLINE void uDMASetControlBase (void *pControlTable)
 Sets the base address for the channel control table. More...
 
__STATIC_INLINE void * uDMAGetControlBase (void)
 Gets the base address for the channel control table. More...
 
__STATIC_INLINE void * uDMAGetControlAlternateBase (void)
 Gets the base address for the channel control table alternate structures. More...
 
__STATIC_INLINE void uDMARequestChannel (uint32_t channelBitMask)
 Requests a uDMA channel to start a transfer. More...
 
void uDMAEnableChannelAttribute (uint32_t channelBitMask, uint32_t attr)
 Enables attributes of a uDMA channel. More...
 
void uDMADisableChannelAttribute (uint32_t channelBitMask, uint32_t attr)
 Disables attributes of an uDMA channel. More...
 
uint32_t uDMAGetChannelAttribute (uint32_t channelBitMask)
 Gets the enabled attributes of a uDMA channel. More...
 
void uDMASetChannelControl (volatile uDMAControlTableEntry *pChannelControlStruct, uint32_t control)
 Sets the control parameters for a uDMA channel control structure. More...
 
void uDMASetChannelTransfer (volatile uDMAControlTableEntry *pChannelControlStruct, uint32_t mode, void *pSrcAddr, void *pDstAddr, uint32_t transferSize)
 Sets the transfer parameters for a uDMA channel control structure. More...
 
uint32_t uDMAGetChannelSize (volatile uDMAControlTableEntry const *pChannelControlStruct)
 Gets the current transfer size for a uDMA channel control structure. More...
 
uint32_t uDMAGetChannelMode (volatile uDMAControlTableEntry const *pChannelControlStruct)
 Gets the transfer mode for a uDMA channel control structure. More...
 
__STATIC_INLINE void uDMARegisterInt (uint32_t intChannel, void(*pfnHandler)(void))
 Registers an interrupt handler for the uDMA controller in the dynamic interrupt table. More...
 
__STATIC_INLINE void uDMAUnregisterInt (uint32_t intChannel)
 Unregisters an interrupt handler for the uDMA controller in the dynamic interrupt table. More...
 
__STATIC_INLINE void uDMAClearInt (uint32_t channelBitMask)
 Clears uDMA interrupt done status. More...
 
__STATIC_INLINE uint32_t uDMAIntStatus (void)
 Get the uDMA interrupt status. More...
 
__STATIC_INLINE void uDMAEnableSwEventInt (uint32_t intChannel)
 Enable interrupt on software event driven uDMA transfers. More...
 
__STATIC_INLINE void uDMADisableSwEventInt (uint32_t intChannel)
 Disable interrupt on software event driven uDMA transfers. More...
 
__STATIC_INLINE uint32_t uDMAGetStatus (void)
 Return the status of the uDMA module. More...
 
__STATIC_INLINE void uDMASetChannelPriority (uint32_t channelBitMask)
 Set the priority of a uDMA channel. More...
 
__STATIC_INLINE bool uDMAGetChannelPriority (uint32_t channelBitMask)
 Get the priority of a uDMA channel. More...
 
__STATIC_INLINE void uDMAClearChannelPriority (uint32_t channelBitMask)
 Clear the priority of a uDMA channel. More...