Data Structures | |
struct | SDMA_transferState |
State structure shared between SDMAK and SDMA user layers. More... | |
union | SDMA_requestDmaParams |
SDMAK ioctl input/output parameters. More... | |
struct | SDMA_ChannelDescriptor |
Descriptor for a channel granted with a SDMA_IOCREQUESTDMA ioctl(). More... | |
Defines | |
#define | SDMA_VERSION 0x01000000U |
Enumerations | |
enum | SDMA_commmands { SDMA_IOCREQUESTDMA = 1, SDMA_IOCRELEASEDMA, SDMA_IOCWAITFORCOMPLETION, SDMA_IOCGETVERSION } |
SDMAK ioctl() commands. More... | |
enum | SDMA_Status { SDMA_OK = 0, SDMA_EFAIL, SDMA_ENOCHANNEL, SDMA_ENOINIT } |
Status codes for SDMA API return values. More... | |
Functions | |
int | SDMA_init (void) |
SDMA initialization API. | |
int | SDMA_exit (void) |
SDMA finalization API. | |
SDMA_Status | SDMA_getChannels (int numChannels, SDMA_ChannelDescriptor chanArray[]) |
Returns available logical channels. | |
SDMA_Status | SDMA_freeChannels (int numChannels, SDMA_ChannelDescriptor chanArray[]) |
Frees previously requested logical channels. | |
SDMA_Status | SDMA_wait (SDMA_ChannelDescriptor *channel) |
Waits for the transfer corresponding to this descriptor to complete. | |
SDMA_Status | SDMA_check (SDMA_ChannelDescriptor *channel, int *pcompleted) |
Checks the status of the transfer corresponding to this descriptor and returns it in the *pcompleted field. | |
int | SDMA_getVersion (void) |
Retrieve version from SDMA driver. |
This is the API for the SDMA Manager.
#define SDMA_VERSION 0x01000000U |
enum SDMA_commmands |
enum SDMA_Status |
Status codes for SDMA API return values.
SDMA_OK |
OK |
SDMA_EFAIL |
general failure |
SDMA_ENOCHANNEL |
no channels available |
SDMA_ENOINIT |
SDMA_init() not called |
int SDMA_init | ( | void | ) |
SDMA initialization API.
int SDMA_exit | ( | void | ) |
SDMA finalization API.
SDMA_Status SDMA_getChannels | ( | int | numChannels, | |
SDMA_ChannelDescriptor | chanArray[] | |||
) |
Returns available logical channels.
numChannels | number of requested channels. | |
chanArray | pointer to SDMA_ChannelDescriptor storage of sufficient size to hold numChannels descriptors. All structure array fields are filled by this API (in other words, no fields need to be filled by the caller prior to the call). |
SDMA_Status SDMA_freeChannels | ( | int | numChannels, | |
SDMA_ChannelDescriptor | chanArray[] | |||
) |
Frees previously requested logical channels.
numChannels | number of requested channels. | |
chanArray | pointer to SDMA_ChannelDescriptor storage of sufficient size to hold numChannels descriptors. This will typically be the same pointer passed to SDMA_getChannels(). |
SDMA_Status SDMA_wait | ( | SDMA_ChannelDescriptor * | channel | ) |
Waits for the transfer corresponding to this descriptor to complete.
channel | pointer to the single channel for which to wait. |
SDMA_IOCWAITFORCOMPLETION
ioctl(), which will block inside the SDMAK module and become unblocked by the completion ISR.SDMA_Status SDMA_check | ( | SDMA_ChannelDescriptor * | channel, | |
int * | pcompleted | |||
) |
Checks the status of the transfer corresponding to this descriptor and returns it in the *pcompleted field.
channel | pointer to single channel to check. | |
pcompleted | pointer to completion status. |
int SDMA_getVersion | ( | void | ) |
Retrieve version from SDMA driver.