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 0x01010000U |
#define | SDMA_IOCMAGIC 0x0000fb00 |
SDMAK ioctl() commands. | |
#define | SDMA_IOCCMDMASK 0x000000ff |
#define | SDMA_IOCREQUESTDMA 1 |
#define | SDMA_IOCRELEASEDMA 2 |
#define | SDMA_IOCWAITFORCOMPLETION 3 |
#define | SDMA_IOCGETVERSION 4 |
Typedefs | |
typedef struct SDMA_ChannelDescriptor | SDMA_ChannelDescriptor |
Descriptor for a channel granted with a SDMA_IOCREQUESTDMA ioctl(). | |
typedef enum SDMA_Status | SDMA_Status |
Status codes for SDMA API return values. | |
Enumerations | |
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 0x01010000U |
#define SDMA_IOCMAGIC 0x0000fb00 |
SDMAK ioctl() commands.
#define SDMA_IOCCMDMASK 0x000000ff |
#define SDMA_IOCREQUESTDMA 1 |
#define SDMA_IOCRELEASEDMA 2 |
#define SDMA_IOCWAITFORCOMPLETION 3 |
#define SDMA_IOCGETVERSION 4 |
typedef struct SDMA_ChannelDescriptor SDMA_ChannelDescriptor |
Descriptor for a channel granted with a SDMA_IOCREQUESTDMA ioctl().
SDMA_IOCREQUESTDMA
ioctl(). The SDMAK module maps this address and queries and writes to it during the completion ISR activity. It is therefore vital that the address of the descriptor passed to SDMA_getChannels()
is in persistent memory that is live for the duration of SDMA channel usage.typedef enum SDMA_Status SDMA_Status |
Status codes for SDMA API return values.
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.