MCASP Driver API/interface file.
Go to the source code of this file.
Data Structures | |
struct | MCASP_Transaction |
Data structure used with transfer call. More... | |
struct | MCASP_ClockConfig |
Hardware setup data clock structure. More... | |
struct | MCASP_GlobalConfig |
Hardware setup global structure. More... | |
struct | MCASP_FifoConfig |
Hardware fifo setup structure. More... | |
struct | MCASP_DataConfig |
Hardware setup data structure. More... | |
struct | MCASP_HwConfig |
Hardware setup structure. More... | |
struct | MCASP_OpenParams |
MCASP Parameters. More... | |
struct | MCASP_HwIntConfig |
McASP Interrupt structures. More... | |
struct | MCASP_TransferObj |
McASP Transfer Data structure stored in driver object. More... | |
struct | MCASP_ChannelObj |
McASP Channel Object. More... | |
struct | MCASP_Object |
MCASP driver object. More... | |
struct | MCASP_Attrs |
MCASP instance attributes - used during init time. More... | |
struct | MCASP_Config |
Macros | |
#define | MCASP_GBLCTL_TIMEOUT (30000U) |
The time to try (in Msec) before the GBLCTL register setting timeouts if the setting/resetting is done in a context other than a task this will be used as a retry count rather than the MSec timeout. More... | |
#define | MCASP_RESET ((uint32_t) 0x00U) |
McASP macros for enable/reset. More... | |
#define | MCASP_ENABLE ((uint32_t) 0x01U) |
#define | MCASP_DISABLE ((uint32_t) 0x00U) |
#define | MCASP_REG_OFFSET ((uint32_t)0x4U) |
Transfer Status Code | |
#define | MCASP_TRANSFER_STATUS_COMPLETED (0U) |
I/O completed successfully. More... | |
#define | MCASP_TRANSFER_STATUS_STARTED (1U) |
I/O queued and pending. More... | |
#define | MCASP_TRANSFER_STATUS_CANCELLED (2U) |
I/O cancelled. Returned by incomplete read or write requests. More... | |
#define | MCASP_TRANSFER_STATUS_FAILED (3U) |
Generic failure condition. More... | |
#define | MCASP_TRANSFER_STATUS_TIMEOUT (4U) |
I/O timeout occurred. More... | |
McASP Transfer Mode | |
#define | MCASP_DRIVER_MODE_POLLING (0U) |
MCASP read/write APIs blocks execution. This mode can only be used when called within a Task context. More... | |
#define | MCASP_DRIVER_MODE_INTERRUPT (1U) |
MCASP read/write APIs does not block code execution and will call a MCASP_CallbackFxn. This mode can be used in a Task, Swi, or Hwi context. More... | |
#define | MCASP_DRIVER_MODE_DMA (2U) |
MCASP read/write APIs does not block code execution and will use DMA for transfers. More... | |
McASP Operating Mode | |
#define | MCASP_OPMODE_MASTER (0U) |
I/O completed successfully. More... | |
#define | MCASP_OPMODE_SLAVE (1U) |
I/O queued and pending. More... | |
MCASP Channel Direction | |
#define | MCASP_CHANNEL_INPUT (0x0001U) |
MCASP Channel will receive data. More... | |
#define | MCASP_CHANNEL_OUTPUT (0x0002U) |
MCASP Channel will transmit data. More... | |
#define | MCASP_CHANNEL_INOUT (MCASP_CHANNEL_INPUT | MCASP_CHANNEL_OUTPUT) |
McASP channel transmits & recieves data. More... | |
MCASP Driver State | |
#define | MCASP_DRIVER_STATE_DELETED (0U) |
#define | MCASP_DRIVER_STATE_CREATED (1U) |
#define | MCASP_DRIVER_STATE_INITIALIZED (2U) |
#define | MCASP_DRIVER_STATE_OPENED (3U) |
#define | MCASP_DRIVER_STATE_CLOSED (4U) |
#define | MCASP_DRIVER_STATE_DEINITIALIZED (5U) |
#define | MCASP_DRIVER_STATE_POWERED_DOWN (6U) |
#define | MCASP_DRIVER_STATE_PWRM_SUSPEND (7U) |
MCASP Serializer Status | |
#define | MCASP_SERIALIZER_STATUS_FREE (0U) |
#define | MCASP_SERIALIZER_STATUS_XMT (1U) |
#define | MCASP_SERIALIZER_STATUS_RCV (2U) |
MCASP Channel Mode | |
#define | MCASP_CHANNEL_MODE_FREE (0U) |
#define | MCASP_CHANNEL_MODE_XMT_DIT (1U) |
#define | MCASP_CHANNEL_MODE_XMT_TDM (2U) |
#define | MCASP_CHANNEL_MODE_RCV (3U) |
MCASP Word Select | |
#define | MCASP_WORD_SELECT_LSW (0U) |
#define | MCASP_WORD_SELECT_MSW (1U) |
Transmit State for McASP transfer | |
#define | MCASP_TRANSMIT_STATE_TX_RESET (0U) |
#define | MCASP_TRANSMIT_STATE_TX_FLUSH (1U) |
#define | MCASP_TRANSMIT_STATE_LOAD_INIT_BUFFER (2U) |
#define | MCASP_TRANSMIT_STATE_RELEASE_FROM_RESET (3U) |
#define | MCASP_TRANSMIT_STATE_WAIT_EVENT (4U) |
#define | MCASP_TRANSMIT_STATE_PROCESS_EVENT (5U) |
#define | MCASP_TRANSMIT_STATE_LOAD_ACTIVE_BUFFER (6U) |
#define | MCASP_TRANSMIT_STATE_DONE (7U) |
#define | MCASP_TRANSMIT_STATE_SPIN_IDLE (8U) |
#define | MCASP_TRANSMIT_STATE_ERROR (9U) |
#define | MCASP_TRANSMIT_STATE_EXIT (10U) |
Receive State for McASP transfer | |
#define | MCASP_RECEIVE_STATE_RX_RESET (0U) |
#define | MCASP_RECEIVE_STATE_RX_FLUSH (1U) |
#define | MCASP_RECEIVE_STATE_RELEASE_FROM_RESET (2U) |
#define | MCASP_RECEIVE_STATE_WAIT_EVENT (3U) |
#define | MCASP_RECEIVE_STATE_PROCESS_EVENT (4U) |
#define | MCASP_RECEIVE_STATE_DONE (5U) |
#define | MCASP_RECEIVE_STATE_SPIN_IDLE (6U) |
#define | MCASP_RECEIVE_STATE_ERROR (7U) |
#define | MCASP_RECEIVE_STATE_EXIT (8U) |
Typedefs | |
typedef void * | MCASP_Handle |
A handle that is returned from a MCASP_open() call. More... | |
typedef void(* | MCASP_CallbackFxn) (MCASP_Handle handle, MCASP_Transaction *transaction) |
The definition of a callback function used by the MCASP driver when used in Callback Mode. More... | |
Functions | |
void | MCASP_init (void) |
This function initializes the MCASP module. More... | |
void | MCASP_deinit (void) |
This function de-initializes the MCASP module. More... | |
static void | MCASP_openParamsInit (MCASP_OpenParams *openPrms) |
Function to initialize the MCASP_OpenParams struct to its defaults. More... | |
MCASP_Handle | MCASP_open (uint32_t index, const MCASP_OpenParams *openParams) |
This function opens a given MCASP peripheral. More... | |
void | MCASP_close (MCASP_Handle handle) |
Function to close a MCASP peripheral specified by the MCASP handle. More... | |
MCASP_Handle | MCASP_getHandle (uint32_t index) |
This function returns the handle of an open MCASP Instance from the instance index. More... | |
int32_t | MCASP_transfer (MCASP_Handle handle, MCASP_Transaction *txn) |
Generic transfer function using McASP. More... | |
Variables | |
MCASP_Config | gMcaspConfig [] |
Externally defined driver configuration array. More... | |
uint32_t | gMcaspConfigNum |
Externally defined driver configuration array size. More... | |