TI-RTOS Drivers
tidrivers_full_2_20_00_08
|
uDMA driver implementation for CC3200.
============================================================================
This driver is intended for use only by TI-RTOS drivers that use the uDMA peripheral (e.g., SPI and I2S). This driver is mainly used for Power management of the UDMA peripheral.
The application should only define the memory for the control table and set up the UDMACC3200_HWAttrs and UDMACC3200_Config structures.
The UDMACC3200 header file should be included in an application as follows:
Go to the source code of this file.
Data Structures | |
struct | UDMACC3200_HWAttrs |
UDMACC3200 Hardware attributes. More... | |
struct | UDMACC3200_Config |
UDMACC3200 Global configuration. More... | |
struct | UDMACC3200_Object |
UDMACC3200 object. More... | |
Typedefs | |
typedef void(* | UDMACC3200_ErrorFxn) (uintptr_t arg) |
UDMA error function pointer. More... | |
typedef struct UDMACC3200_HWAttrs | UDMACC3200_HWAttrs |
UDMACC3200 Hardware attributes. More... | |
typedef struct UDMACC3200_Config | UDMACC3200_Config |
UDMACC3200 Global configuration. More... | |
typedef struct UDMACC3200_Config * | UDMACC3200_Handle |
A handle that is returned from a UDMACC3200_open() call. More... | |
typedef struct UDMACC3200_Object | UDMACC3200_Object |
UDMACC3200 object. More... | |
Functions | |
void | UDMACC3200_close (UDMACC3200_Handle handle) |
Function to close the DMA driver. More... | |
void | UDMACC3200_init () |
Function to initialize the CC3200 DMA driver. More... | |
UDMACC3200_Handle | UDMACC3200_open () |
Function to initialize the CC3200 DMA peripheral. More... | |
typedef void(* UDMACC3200_ErrorFxn) (uintptr_t arg) |
UDMA error function pointer.
typedef struct UDMACC3200_HWAttrs UDMACC3200_HWAttrs |
UDMACC3200 Hardware attributes.
This structure contains the base address of the uDMA control table, and uDMA error interrupt attributes.
The control table is used by the uDMA controller to store channel control structures. The control table can be located anywhere in system memory, but must be contiguous and aligned on a 1024-byte boundary.
dmaErrorFxn is the uDMA peripheral's error interrupt handler.
intPriority is priority of the uDMA peripheral's error interrupt, as defined by the underlying OS. It is passed unmodified to the underlying OS's interrupt handler creation code, so you need to refer to the OS documentation for usage. For example, for SYS/BIOS applications, refer to the ti.sysbios.family.arm.m3.Hwi documentation for SYS/BIOS usage of interrupt priorities. If the driver uses the ti.drivers.ports interface instead of making OS calls directly, then the HwiP port handles the interrupt priority in an OS specific way. In the case of the SYS/BIOS port, intPriority is passed unmodified to Hwi_create().
A sample structure is shown below:
typedef struct UDMACC3200_Config UDMACC3200_Config |
UDMACC3200 Global configuration.
The UDMACC3200_Config structure contains pointers used by the UDMACC3200 driver.
This structure needs to be defined before calling UDMACC3200_init() and it must not be changed thereafter.
typedef struct UDMACC3200_Config* UDMACC3200_Handle |
A handle that is returned from a UDMACC3200_open() call.
typedef struct UDMACC3200_Object UDMACC3200_Object |
UDMACC3200 object.
The application must not access any member variables of this structure!
void UDMACC3200_close | ( | UDMACC3200_Handle | handle | ) |
Function to close the DMA driver.
This function releases Power dependency on UDMA that was previously set with a call to UDMACC3200_open(). If there is only one outstanding UDMACC3200_open() call (i.e. all but one UDMACC3200_open() calls have been matched by a corresponding call to UDMACC3200_close()), this function will disable the UDMA.
handle | A UDMACC3200_Handle returned from UDMACC3200_open() |
void UDMACC3200_init | ( | ) |
Function to initialize the CC3200 DMA driver.
The function will set the isOpen flag to false, and should be called prior to opening the DMA driver.
UDMACC3200_Handle UDMACC3200_open | ( | ) |
Function to initialize the CC3200 DMA peripheral.
UDMACC3200_open() can be called multiple times. Each time the function is called, it will set a dependency on the peripheral and enable the clock. The Power dependency count on the UDMA will be equal to the number of outstanding calls to UDMACC3200_open(). Calling UDMACC3200_close() will decrement the Power dependency count, and the last call to UDMACC3200_close() will disable the UDMA.