AM62L FreeRTOS SDK  11.00.00
mcasp/v1/mcasp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
50 #ifndef MCASP_H_
51 #define MCASP_H_
52 
53 /* ========================================================================== */
54 /* Include Files */
55 /* ========================================================================== */
56 
57 #include <drivers/mcasp.h>
58 #include <stdint.h>
59 #include <stdbool.h>
60 #include <kernel/dpl/HwiP.h>
61 #include <kernel/dpl/SemaphoreP.h>
62 #include <kernel/dpl/QueueP.h>
63 #include <drivers/hw_include/cslr_mcasp.h>
65 #include <drivers/udma.h>
66 #include <drivers/mcasp/v1/mcasp_drv_configs/mcasp_drv_config.h>
67 
68 #if defined (SOC_AM62AX)
69 #include <drivers/mcasp/v1/soc/am62ax/mcasp_soc.h>
70 #endif
71 
72 #if defined (SOC_AM62DX)
73 #include <drivers/mcasp/v1/soc/am62dx/mcasp_soc.h>
74 #endif
75 
76 #if defined (SOC_AM62LX)
77 #include <drivers/mcasp/v1/soc/am62lx/mcasp_soc.h>
78 #endif
79 
80 #if defined (SOC_AM62PX)
81 #include <drivers/mcasp/v1/soc/am62px/mcasp_soc.h>
82 #endif
83 
84 #if defined (SOC_AM62X)
85 #include <drivers/mcasp/v1/soc/am62x/mcasp_soc.h>
86 #endif
87 
88 #if defined (SOC_AM275X)
89 #include <drivers/mcasp/v1/soc/am275x/mcasp_soc.h>
90 #endif
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
96 /* ========================================================================== */
97 /* Macros & Typedefs */
98 /* ========================================================================== */
99 
101 typedef void *MCASP_Handle;
102 
107 #define MCASP_GBLCTL_TIMEOUT (30000U)
108 
113 #define MCASP_DATA_TIMEOUT (30000U)
114 
116 #define MCASP_RESET ((uint32_t) 0x00U)
117 #define MCASP_ENABLE ((uint32_t) 0x01U)
118 #define MCASP_DISABLE ((uint32_t) 0x00U)
119 
120 /*
121 ** McASP Register Offset
122 */
123 #define MCASP_REG_OFFSET ((uint32_t)0x4U)
124 
134 #define MCASP_TRANSFER_STATUS_COMPLETED (0U)
135 
136 #define MCASP_TRANSFER_STATUS_STARTED (1U)
137 
138 #define MCASP_TRANSFER_STATUS_CANCELLED (2U)
139 
140 #define MCASP_TRANSFER_STATUS_FAILED (3U)
141 
142 #define MCASP_TRANSFER_STATUS_TIMEOUT (4U)
143 
155 #define MCASP_TRANSFER_MODE_POLLING (0U)
156 
161 #define MCASP_TRANSFER_MODE_INTERRUPT (1U)
162 
166 #define MCASP_TRANSFER_MODE_DMA (2U)
167 
178 #define MCASP_OPMODE_MASTER (0U)
179 
180 #define MCASP_OPMODE_SLAVE (1U)
181 
192 #define MCASP_CHANNEL_INPUT (0x0001U)
193 
194 #define MCASP_CHANNEL_OUTPUT (0x0002U)
195 
196 #define MCASP_CHANNEL_INOUT (MCASP_CHANNEL_INPUT | MCASP_CHANNEL_OUTPUT)
197 
207 #define MCASP_DRIVER_STATE_DELETED (0U)
208 #define MCASP_DRIVER_STATE_CREATED (1U)
209 #define MCASP_DRIVER_STATE_INITIALIZED (2U)
210 #define MCASP_DRIVER_STATE_OPENED (3U)
211 #define MCASP_DRIVER_STATE_CLOSED (4U)
212 #define MCASP_DRIVER_STATE_DEINITIALIZED (5U)
213 #define MCASP_DRIVER_STATE_POWERED_DOWN (6U)
214 #define MCASP_DRIVER_STATE_PWRM_SUSPEND (7U)
215 
225 #define MCASP_SERIALIZER_STATUS_FREE (0U)
226 #define MCASP_SERIALIZER_STATUS_XMT (1U)
227 #define MCASP_SERIALIZER_STATUS_RCV (2U)
228 
238 #define MCASP_CHANNEL_MODE_FREE (0U)
239 #define MCASP_CHANNEL_MODE_XMT_DIT (1U)
240 #define MCASP_CHANNEL_MODE_XMT_TDM (2U)
241 #define MCASP_CHANNEL_MODE_RCV (3U)
242 
252 #define MCASP_WORD_SELECT_LSW (0U)
253 #define MCASP_WORD_SELECT_MSW (1U)
254 
270 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_NON_INTERLEAVED (0U)
271 
276 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_INTERLEAVED (1U)
277 
283 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1 (2U)
284 
290 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2 (3U)
291 
301 #define MCASP_TRANSMIT_STATE_TX_RESET (0U)
302 #define MCASP_TRANSMIT_STATE_TX_FLUSH (1U)
303 #define MCASP_TRANSMIT_STATE_LOAD_INIT_BUFFER (2U)
304 #define MCASP_TRANSMIT_STATE_RELEASE_FROM_RESET (3U)
305 #define MCASP_TRANSMIT_STATE_WAIT_EVENT (4U)
306 #define MCASP_TRANSMIT_STATE_PROCESS_EVENT (5U)
307 #define MCASP_TRANSMIT_STATE_LOAD_ACTIVE_BUFFER (6U)
308 #define MCASP_TRANSMIT_STATE_DONE (7U)
309 #define MCASP_TRANSMIT_STATE_SPIN_IDLE (8U)
310 #define MCASP_TRANSMIT_STATE_ERROR (9U)
311 #define MCASP_TRANSMIT_STATE_EXIT (10U)
312 
322 #define MCASP_RECEIVE_STATE_RX_RESET (0U)
323 #define MCASP_RECEIVE_STATE_RX_FLUSH (1U)
324 #define MCASP_RECEIVE_STATE_RELEASE_FROM_RESET (2U)
325 #define MCASP_RECEIVE_STATE_WAIT_EVENT (3U)
326 #define MCASP_RECEIVE_STATE_PROCESS_EVENT (4U)
327 #define MCASP_RECEIVE_STATE_DONE (5U)
328 #define MCASP_RECEIVE_STATE_SPIN_IDLE (6U)
329 #define MCASP_RECEIVE_STATE_ERROR (7U)
330 #define MCASP_RECEIVE_STATE_EXIT (8U)
331 
333 #define MCASP_DIR_OUT (uint32_t) 0
334 #define MCASP_DIR_IN (uint32_t) 1
335 
336 #define MCASP_TRPD_INVALID_PTR (0xFFFFFFFF)
337 
338 /* ========================================================================== */
339 /* Structure Definitions */
340 /* ========================================================================== */
341 
346 typedef struct
347 {
351  void *buf;
354  uint32_t count;
358  uint32_t timeout;
360  int32_t status;
362  void *args;
365 
373 typedef void (*MCASP_TxCallbackFxn) (MCASP_Handle handle,
374  MCASP_Transaction *transaction);
375 
376 typedef void (*MCASP_RxCallbackFxn) (MCASP_Handle handle,
377  MCASP_Transaction *transaction);
378 
382 typedef struct
383 {
384  uint32_t aClk;
386  uint32_t hiClk;
388  uint32_t clkChk;
390  uint8_t isHClkExt;
392  uint32_t hClkExt;
395 
399 typedef struct
400 {
401  uint32_t pfunc;
403  uint32_t pdir;
405  uint32_t gblCtl;
407  uint32_t ditCtl;
409  uint32_t dlbCtl;
411  uint32_t amute;
413  uint32_t serSetup[16u];
416 
420 typedef struct
421 {
422  uint32_t fifoCtl;
424  uint32_t fifoStatus;
427 
431 typedef struct
432 {
433  uint32_t mask;
435  uint32_t fmt;
437  uint32_t frSyncCtl;
439  uint32_t tdm;
441  uint32_t intCtl;
443  uint32_t stat;
445  uint32_t evtCtl;
452 
456 typedef struct
457 {
465 
466 typedef struct MCASP_DMAChConfig_s
467 {
468  void *txChHandle;
470  void *rxChHandle;
476  void *txTrpdMem;
478  void *rxTrpdMem;
480  uint32_t trpdMemSize;
482  void *txRingMem;
484  void *rxRingMem;
486  void *txCbParams;
488  void *rxCbParams;
490  uint32_t rxEvtNum;
492  uint32_t txEvtNum;
494  uint32_t isOpen;
497 
508 typedef struct
509 {
510  uint32_t transferMode;
512  uint8_t txBufferFormat;
514  uint8_t rxBufferFormat;
516  uint8_t txSerUsedCount;
518  uint8_t rxSerUsedCount;
520  uint8_t *txSerUsedArray;
522  uint8_t *rxSerUsedArray;
524  uint8_t txSlotCount;
526  uint8_t rxSlotCount;
532  uint32_t txLoopjobEnable;
534  uint8_t *txLoopjobBuf;
538  uint32_t rxLoopjobEnable;
540  uint8_t *rxLoopjobBuf;
551  uint8_t skipDriverOpen;
554 
558 typedef struct
559 {
560  uint32_t intrNum;
562  uint16_t evntNum;
564  uint8_t intrPriority;
567 
572 typedef struct
573 {
574  uint32_t inProgress;
576  uint32_t state;
578  int32_t status;
580  uint32_t count;
582  uint8_t slotCount;
584  uint8_t slotIndex;
586  uint8_t frameCount;
588  uint8_t frameIndex;
590  uint8_t serCount;
592  uint8_t *serArray;
594  uint8_t bufferFormat;
603  uint32_t loopjobEnable;
607 
608 typedef struct
609 {
610  uint8_t initDone;
612  uint32_t txnByteCnt;
614  uint16_t icnt0;
616  uint16_t icnt1;
618  uint16_t icnt2;
620  uint16_t icnt3;
622 } MCASP_DmaIcnt;
623 
627 typedef struct
628 {
629  /*
630  * User params
631  */
634  uint16_t instNum;
636  uint32_t drvState;
638  uint32_t transferMode;
653  /*
654  * State variables
655  */
656  uint32_t isOpen;
658  uint32_t isTxStarted;
660  uint32_t isRxStarted;
671  QueueP_Object reqQueueObjTx, curentQueueObjTx, reqQueueObjRx, curentQueueObjRx;
673  QueueP_Handle reqQueueHandleTx, curentQueueHandleTx, reqQueueHandleRx, curentQueueHandleRx;
681  uint32_t lastPlayed;
683  uint32_t lastFilled;
685  uint32_t lastReceived;
687  uint32_t lastRecQueued;
690  uint8_t txFifoEnable;
692  uint8_t rxFifoEnable;
699 } MCASP_Object;
700 
702 typedef struct
703 {
704  /*
705  * SOC configuration
706  */
707  uint32_t instNum;
709  uintptr_t baseAddr;
711  uintptr_t dataBaseAddr;
713  uint8_t isSynchronous;
717  uint16_t serStatus[16];
725  uint32_t txSlotSize;
727  uint32_t rxSlotSize;
733 } MCASP_Attrs;
734 
735 typedef struct
736 {
741 } MCASP_Config;
742 
744 extern MCASP_Config gMcaspConfig[];
746 extern uint32_t gMcaspConfigNum;
747 
748 /* ========================================================================== */
749 /* Function Declarations */
750 /* ========================================================================== */
751 
755 void MCASP_init(void);
756 
760 void MCASP_deinit(void);
761 
768 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms);
769 
784 MCASP_Handle MCASP_open(uint32_t index, const MCASP_OpenParams *openParams);
785 
796 
811 
824 
837 
849 
861 
871 
881 
893 
905 
918 int32_t MCASP_setTxTxnCount(MCASP_Handle handle, uint32_t txnCount);
919 
920 
933 int32_t MCASP_setRxTxnCount(MCASP_Handle handle, uint32_t txnCount);
934 
935 /* ========================================================================== */
936 /* Static Function Definitions */
937 /* ========================================================================== */
938 
939 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
940 {
941  if (openPrms != NULL)
942  {
943  // Set Default values
944  }
945 }
946 
947 #ifdef __cplusplus
948 }
949 #endif
950 
951 #endif /* #ifndef MCASP_H_ */
952 
MCASP_GlobalConfig::amute
uint32_t amute
Definition: mcasp/v1/mcasp.h:411
MCASP_TransferObj::txnLoopjob
MCASP_Transaction txnLoopjob
Definition: mcasp/v1/mcasp.h:601
MCASP_OpenParams::txLoopjobEnable
uint32_t txLoopjobEnable
Definition: mcasp/v1/mcasp.h:532
MCASP_Config::attrs
const MCASP_Attrs * attrs
Definition: mcasp/v1/mcasp.h:737
MCASP_DmaChConfig::cqRxEvtHandle
void * cqRxEvtHandle
Definition: mcasp/v1/mcasp.h:474
MCASP_Transaction::args
void * args
Definition: mcasp/v1/mcasp.h:362
MCASP_ClockConfig::aClk
uint32_t aClk
Definition: mcasp/v1/mcasp.h:384
MCASP_withdrawRx
MCASP_Transaction * MCASP_withdrawRx(MCASP_Handle handle)
Function to withdraw the buffer submitted to McASP driver for reception. This should be called after ...
MCASP_OpenParams::mcaspDmaDrvObj
void * mcaspDmaDrvObj
Definition: mcasp/v1/mcasp.h:548
MCASP_Object
MCASP driver object.
Definition: mcasp/v1/mcasp.h:628
MCASP_close
void MCASP_close(MCASP_Handle handle)
Function to close a MCASP peripheral specified by the MCASP handle.
MCASP_setTxTxnCount
int32_t MCASP_setTxTxnCount(MCASP_Handle handle, uint32_t txnCount)
Function to set the Tx transaction count.
MCASP_submitRx
int32_t MCASP_submitRx(MCASP_Handle handle, MCASP_Transaction *txn)
Function to submit the buffer to McASP driver for reception. Transaction object is held by the driver...
QueueP_Elem
Opaque QueueP element.
Definition: QueueP.h:77
MCASP_DataConfig::tdm
uint32_t tdm
Definition: mcasp/v1/mcasp.h:439
MCASP_DmaChConfig::rxChHandle
void * rxChHandle
Definition: mcasp/v1/mcasp.h:470
MCASP_GlobalConfig::pfunc
uint32_t pfunc
Definition: mcasp/v1/mcasp.h:401
MCASP_OpenParams::txSlotCount
uint8_t txSlotCount
Definition: mcasp/v1/mcasp.h:524
MCASP_DmaChConfig::txCbParams
void * txCbParams
Definition: mcasp/v1/mcasp.h:486
MCASP_TransferObj::frameIndex
uint8_t frameIndex
Definition: mcasp/v1/mcasp.h:588
MCASP_Object::handle
MCASP_Handle handle
Definition: mcasp/v1/mcasp.h:632
gMcaspConfig
MCASP_Config gMcaspConfig[]
Externally defined driver configuration array.
MCASP_OpenParams::skipDriverOpen
uint8_t skipDriverOpen
Definition: mcasp/v1/mcasp.h:551
MCASP_TransferObj::slotCount
uint8_t slotCount
Definition: mcasp/v1/mcasp.h:582
MCASP_DmaIcnt::icnt3
uint16_t icnt3
Definition: mcasp/v1/mcasp.h:620
MCASP_DmaChConfig::rxCbParams
void * rxCbParams
Definition: mcasp/v1/mcasp.h:488
MCASP_OpenParams::txSerUsedCount
uint8_t txSerUsedCount
Definition: mcasp/v1/mcasp.h:516
MCASP_DmaIcnt::txnByteCnt
uint32_t txnByteCnt
Definition: mcasp/v1/mcasp.h:612
MCASP_TransferObj::status
int32_t status
Definition: mcasp/v1/mcasp.h:578
MCASP_withdrawTx
MCASP_Transaction * MCASP_withdrawTx(MCASP_Handle handle)
Function to withdraw the buffer submitted to McASP driver for transmission. This should be called aft...
MCASP_OpenParams::txSerUsedArray
uint8_t * txSerUsedArray
Definition: mcasp/v1/mcasp.h:520
MCASP_Object::hwiObjTx
HwiP_Object hwiObjTx
Definition: mcasp/v1/mcasp.h:666
NULL
#define NULL
Define NULL if not defined.
Definition: csl_types.h:100
MCASP_OpenParams::txLoopjobBufLength
uint32_t txLoopjobBufLength
Definition: mcasp/v1/mcasp.h:536
MCASP_DmaChConfig::txChHandle
void * txChHandle
Definition: mcasp/v1/mcasp.h:468
MCASP_Object::isTxStarted
uint32_t isTxStarted
Definition: mcasp/v1/mcasp.h:658
MCASP_Object::transferSemObj
SemaphoreP_Object transferSemObj
Definition: mcasp/v1/mcasp.h:664
MCASP_Object::lockObj
SemaphoreP_Object lockObj
Definition: mcasp/v1/mcasp.h:662
MCASP_Attrs::txSlotSize
uint32_t txSlotSize
Definition: mcasp/v1/mcasp.h:725
MCASP_TransferObj::frameCount
uint8_t frameCount
Definition: mcasp/v1/mcasp.h:586
MCASP_Object::mcaspPktDmaHandle
void * mcaspPktDmaHandle
Definition: mcasp/v1/mcasp.h:642
MCASP_OpenParams::dmaChCfg
MCASP_DmaChConfig * dmaChCfg
Definition: mcasp/v1/mcasp.h:545
MCASP_OpenParams::rxCallbackFxn
MCASP_RxCallbackFxn rxCallbackFxn
Definition: mcasp/v1/mcasp.h:530
MCASP_OpenParams::rxLoopjobBufLength
uint32_t rxLoopjobBufLength
Definition: mcasp/v1/mcasp.h:542
MCASP_DmaIcnt::icnt1
uint16_t icnt1
Definition: mcasp/v1/mcasp.h:616
MCASP_Object::reqQueueHandleTx
QueueP_Handle reqQueueHandleTx
Definition: mcasp/v1/mcasp.h:673
MCASP_TransferObj::state
uint32_t state
Definition: mcasp/v1/mcasp.h:576
MCASP_FifoConfig
Hardware fifo setup structure.
Definition: mcasp/v1/mcasp.h:421
MCASP_DataConfig::clk
MCASP_ClockConfig clk
Definition: mcasp/v1/mcasp.h:447
MCASP_DmaChConfig::isOpen
uint32_t isOpen
Definition: mcasp/v1/mcasp.h:494
MCASP_Attrs::txFifoWaterLevel
uint8_t txFifoWaterLevel
Definition: mcasp/v1/mcasp.h:729
MCASP_open
MCASP_Handle MCASP_open(uint32_t index, const MCASP_OpenParams *openParams)
This function opens a given MCASP peripheral.
MCASP_Attrs::numOfSerializers
uint16_t numOfSerializers
Definition: mcasp/v1/mcasp.h:715
MCASP_Attrs::hwCfg
MCASP_HwConfig hwCfg
Definition: mcasp/v1/mcasp.h:719
MCASP_FifoConfig::fifoStatus
uint32_t fifoStatus
Definition: mcasp/v1/mcasp.h:424
SemaphoreP.h
MCASP_GlobalConfig::dlbCtl
uint32_t dlbCtl
Definition: mcasp/v1/mcasp.h:409
MCASP_DataConfig
Hardware setup data structure.
Definition: mcasp/v1/mcasp.h:432
MCASP_DmaChConfig::txTrpdMem
void * txTrpdMem
Definition: mcasp/v1/mcasp.h:476
MCASP_TransferObj::serCount
uint8_t serCount
Definition: mcasp/v1/mcasp.h:590
MCASP_Object::lastPlayed
uint32_t lastPlayed
Definition: mcasp/v1/mcasp.h:681
MCASP_Object::rxFifoEnable
uint8_t rxFifoEnable
Definition: mcasp/v1/mcasp.h:692
MCASP_TransferObj::cbFxn
MCASP_TxCallbackFxn cbFxn
Definition: mcasp/v1/mcasp.h:598
MCASP_Transaction
Data structure used with transfer call.
Definition: mcasp/v1/mcasp.h:347
csl_types.h
This file contains the Register Desciptions for CSL types.
MCASP_DmaChConfig::cqTxEvtHandle
void * cqTxEvtHandle
Definition: mcasp/v1/mcasp.h:472
MCASP_OpenParams
MCASP Parameters.
Definition: mcasp/v1/mcasp.h:509
MCASP_stopTransferRx
int32_t MCASP_stopTransferRx(MCASP_Handle handle)
Function to stop McASP reception.
MCASP_OpenParams::transferMode
uint32_t transferMode
Definition: mcasp/v1/mcasp.h:510
MCASP_Object::XmtObj
MCASP_TransferObj XmtObj
Definition: mcasp/v1/mcasp.h:648
MCASP_Attrs
MCASP instance attributes - used during init time.
Definition: mcasp/v1/mcasp.h:703
MCASP_HwIntConfig::evntNum
uint16_t evntNum
Definition: mcasp/v1/mcasp.h:562
MCASP_Transaction::count
uint32_t count
Definition: mcasp/v1/mcasp.h:354
MCASP_GlobalConfig
Hardware setup global structure.
Definition: mcasp/v1/mcasp.h:400
MCASP_HwIntConfig::intrPriority
uint8_t intrPriority
Definition: mcasp/v1/mcasp.h:564
MCASP_HwConfig::tx
MCASP_DataConfig tx
Definition: mcasp/v1/mcasp.h:462
MCASP_Config
Definition: mcasp/v1/mcasp.h:736
MCASP_RxCallbackFxn
void(* MCASP_RxCallbackFxn)(MCASP_Handle handle, MCASP_Transaction *transaction)
Definition: mcasp/v1/mcasp.h:376
MCASP_DmaChConfig::rxRingMem
void * rxRingMem
Definition: mcasp/v1/mcasp.h:484
MCASP_Object::lastRecQueued
uint32_t lastRecQueued
Definition: mcasp/v1/mcasp.h:687
MCASP_deinit
void MCASP_deinit(void)
This function de-initializes the MCASP module.
HwiP.h
MCASP_TransferObj::transaction
MCASP_Transaction * transaction
Definition: mcasp/v1/mcasp.h:596
MCASP_startTransferTx
int32_t MCASP_startTransferTx(MCASP_Handle handle)
Function to start McASP transmission.
gMcaspConfigNum
uint32_t gMcaspConfigNum
Externally defined driver configuration array size.
MCASP_TransferObj::bufferFormat
uint8_t bufferFormat
Definition: mcasp/v1/mcasp.h:594
MCASP_TransferObj::count
uint32_t count
Definition: mcasp/v1/mcasp.h:580
MCASP_DmaChConfig::txRingMem
void * txRingMem
Definition: mcasp/v1/mcasp.h:482
MCASP_Object::mcaspDmaHandle
void * mcaspDmaHandle
Definition: mcasp/v1/mcasp.h:640
MCASP_OpenParams::rxBufferFormat
uint8_t rxBufferFormat
Definition: mcasp/v1/mcasp.h:514
MCASP_GlobalConfig::ditCtl
uint32_t ditCtl
Definition: mcasp/v1/mcasp.h:407
MCASP_DataConfig::evtCtl
uint32_t evtCtl
Definition: mcasp/v1/mcasp.h:445
MCASP_Object::RcvObj
MCASP_TransferObj RcvObj
Definition: mcasp/v1/mcasp.h:650
MCASP_Attrs::rxSlotSize
uint32_t rxSlotSize
Definition: mcasp/v1/mcasp.h:727
MCASP_TransferObj::loopjobEnable
uint32_t loopjobEnable
Definition: mcasp/v1/mcasp.h:603
MCASP_HwConfig::rx
MCASP_DataConfig rx
Definition: mcasp/v1/mcasp.h:460
MCASP_ClockConfig::hiClk
uint32_t hiClk
Definition: mcasp/v1/mcasp.h:386
QueueP.h
MCASP_OpenParams::txCallbackFxn
MCASP_TxCallbackFxn txCallbackFxn
Definition: mcasp/v1/mcasp.h:528
MCASP_DmaChConfig::trpdMemSize
uint32_t trpdMemSize
Definition: mcasp/v1/mcasp.h:480
MCASP_setRxTxnCount
int32_t MCASP_setRxTxnCount(MCASP_Handle handle, uint32_t txnCount)
Function to set the Rx transaction count.
mcasp.h
MCASP_Transaction::qElem
QueueP_Elem qElem
Definition: mcasp/v1/mcasp.h:348
MCASP_Attrs::baseAddr
uintptr_t baseAddr
Definition: mcasp/v1/mcasp.h:709
MCASP_Transaction::status
int32_t status
Definition: mcasp/v1/mcasp.h:360
MCASP_OpenParams::rxSlotCount
uint8_t rxSlotCount
Definition: mcasp/v1/mcasp.h:526
QueueP_Object
Opaque task object used with the task APIs.
Definition: QueueP.h:92
MCASP_ClockConfig
Hardware setup data clock structure.
Definition: mcasp/v1/mcasp.h:383
MCASP_TransferObj::inProgress
uint32_t inProgress
Definition: mcasp/v1/mcasp.h:574
MCASP_GlobalConfig::gblCtl
uint32_t gblCtl
Definition: mcasp/v1/mcasp.h:405
MCASP_DataConfig::frSyncCtl
uint32_t frSyncCtl
Definition: mcasp/v1/mcasp.h:437
MCASP_Object::completedQueueObjRx
QueueP_Object completedQueueObjRx
Definition: mcasp/v1/mcasp.h:676
MCASP_Attrs::dataBaseAddr
uintptr_t dataBaseAddr
Definition: mcasp/v1/mcasp.h:711
MCASP_ClockConfig::isHClkExt
uint8_t isHClkExt
Definition: mcasp/v1/mcasp.h:390
MCASP_Object::isOpen
uint32_t isOpen
Definition: mcasp/v1/mcasp.h:656
MCASP_DataConfig::intCtl
uint32_t intCtl
Definition: mcasp/v1/mcasp.h:441
QueueP_Handle
void * QueueP_Handle
Opaque client reference to an instance of a QueueP.
Definition: QueueP.h:68
MCASP_DmaChConfig::txEvtNum
uint32_t txEvtNum
Definition: mcasp/v1/mcasp.h:492
MCASP_OpenParams::rxLoopjobEnable
uint32_t rxLoopjobEnable
Definition: mcasp/v1/mcasp.h:538
MCASP_Object::txFifoEnable
uint8_t txFifoEnable
Definition: mcasp/v1/mcasp.h:690
MCASP_DataConfig::stat
uint32_t stat
Definition: mcasp/v1/mcasp.h:443
MCASP_openParamsInit
static void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
Function to initialize the MCASP_OpenParams struct to its defaults.
Definition: mcasp/v1/mcasp.h:939
MCASP_HwConfig::gbl
MCASP_GlobalConfig gbl
Definition: mcasp/v1/mcasp.h:458
MCASP_Handle
void * MCASP_Handle
A handle that is returned from a MCASP_open() call.
Definition: mcasp/v1/mcasp.h:101
MCASP_Object::completedQueueHandleRx
QueueP_Handle completedQueueHandleRx
Definition: mcasp/v1/mcasp.h:678
MCASP_GlobalConfig::pdir
uint32_t pdir
Definition: mcasp/v1/mcasp.h:403
MCASP_DmaIcnt::icnt2
uint16_t icnt2
Definition: mcasp/v1/mcasp.h:618
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
MCASP_Object::reqQueueObjTx
QueueP_Object reqQueueObjTx
Definition: mcasp/v1/mcasp.h:671
MCASP_Object::transferMode
uint32_t transferMode
Definition: mcasp/v1/mcasp.h:638
udma.h
UDMA Driver API/interface file.
MCASP_HwIntConfig::intrNum
uint32_t intrNum
Definition: mcasp/v1/mcasp.h:560
MCASP_HwIntConfig
McASP Interrupt structures.
Definition: mcasp/v1/mcasp.h:559
MCASP_startTransferRx
int32_t MCASP_startTransferRx(MCASP_Handle handle)
Function to start McASP reception.
MCASP_DataConfig::fmt
uint32_t fmt
Definition: mcasp/v1/mcasp.h:435
MCASP_TxCallbackFxn
void(* MCASP_TxCallbackFxn)(MCASP_Handle handle, MCASP_Transaction *transaction)
The definition of a callback function used by the MCASP driver when used in Callback Mode.
Definition: mcasp/v1/mcasp.h:373
MCASP_TransferObj
McASP Transfer Data structure stored in driver object.
Definition: mcasp/v1/mcasp.h:573
MCASP_Object::dmaChCfg
MCASP_DmaChConfig * dmaChCfg
Definition: mcasp/v1/mcasp.h:645
MCASP_Attrs::intCfgRx
MCASP_HwIntConfig intCfgRx
Definition: mcasp/v1/mcasp.h:723
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
MCASP_DmaChConfig::rxEvtNum
uint32_t rxEvtNum
Definition: mcasp/v1/mcasp.h:490
MCASP_Object::rxDmaIcnt
MCASP_DmaIcnt rxDmaIcnt
Definition: mcasp/v1/mcasp.h:697
MCASP_ClockConfig::clkChk
uint32_t clkChk
Definition: mcasp/v1/mcasp.h:388
MCASP_Object::txDmaIcnt
MCASP_DmaIcnt txDmaIcnt
Definition: mcasp/v1/mcasp.h:695
MCASP_Object::lastFilled
uint32_t lastFilled
Definition: mcasp/v1/mcasp.h:683
MCASP_OpenParams::rxSerUsedCount
uint8_t rxSerUsedCount
Definition: mcasp/v1/mcasp.h:518
MCASP_Attrs::isSynchronous
uint8_t isSynchronous
Definition: mcasp/v1/mcasp.h:713
MCASP_Attrs::intCfgTx
MCASP_HwIntConfig intCfgTx
Definition: mcasp/v1/mcasp.h:721
MCASP_DmaIcnt::icnt0
uint16_t icnt0
Definition: mcasp/v1/mcasp.h:614
MCASP_Attrs::instNum
uint32_t instNum
Definition: mcasp/v1/mcasp.h:707
MCASP_getHandle
MCASP_Handle MCASP_getHandle(uint32_t index)
This function returns the handle of an open MCASP Instance from the instance index.
MCASP_TransferObj::serArray
uint8_t * serArray
Definition: mcasp/v1/mcasp.h:592
MCASP_DmaIcnt
Definition: mcasp/v1/mcasp.h:609
MCASP_Transaction::timeout
uint32_t timeout
Definition: mcasp/v1/mcasp.h:358
MCASP_OpenParams::rxLoopjobBuf
uint8_t * rxLoopjobBuf
Definition: mcasp/v1/mcasp.h:540
MCASP_DataConfig::fifoCfg
MCASP_FifoConfig fifoCfg
Definition: mcasp/v1/mcasp.h:449
MCASP_Object::instNum
uint16_t instNum
Definition: mcasp/v1/mcasp.h:634
MCASP_TransferObj::slotIndex
uint8_t slotIndex
Definition: mcasp/v1/mcasp.h:584
MCASP_DmaIcnt::initDone
uint8_t initDone
Definition: mcasp/v1/mcasp.h:610
MCASP_Transaction::buf
void * buf
Definition: mcasp/v1/mcasp.h:351
MCASP_DmaChConfig::rxTrpdMem
void * rxTrpdMem
Definition: mcasp/v1/mcasp.h:478
MCASP_submitTx
int32_t MCASP_submitTx(MCASP_Handle handle, MCASP_Transaction *txn)
Function to submit the buffer to McASP driver for transmission. Transaction object is held by the dri...
MCASP_DmaChConfig
Definition: mcasp/v1/mcasp.h:467
MCASP_Object::hwiObjRx
HwiP_Object hwiObjRx
Definition: mcasp/v1/mcasp.h:668
MCASP_Object::isRxStarted
uint32_t isRxStarted
Definition: mcasp/v1/mcasp.h:660
MCASP_Config::object
MCASP_Object * object
Definition: mcasp/v1/mcasp.h:739
MCASP_ClockConfig::hClkExt
uint32_t hClkExt
Definition: mcasp/v1/mcasp.h:392
MCASP_Attrs::rxFifoWaterLevel
uint8_t rxFifoWaterLevel
Definition: mcasp/v1/mcasp.h:731
MCASP_init
void MCASP_init(void)
This function initializes the MCASP module.
MCASP_FifoConfig::fifoCtl
uint32_t fifoCtl
Definition: mcasp/v1/mcasp.h:422
MCASP_OpenParams::txLoopjobBuf
uint8_t * txLoopjobBuf
Definition: mcasp/v1/mcasp.h:534
MCASP_HwConfig
Hardware setup structure.
Definition: mcasp/v1/mcasp.h:457
MCASP_OpenParams::rxSerUsedArray
uint8_t * rxSerUsedArray
Definition: mcasp/v1/mcasp.h:522
MCASP_DataConfig::mask
uint32_t mask
Definition: mcasp/v1/mcasp.h:433
MCASP_Object::drvState
uint32_t drvState
Definition: mcasp/v1/mcasp.h:636
MCASP_OpenParams::txBufferFormat
uint8_t txBufferFormat
Definition: mcasp/v1/mcasp.h:512
MCASP_Object::lastReceived
uint32_t lastReceived
Definition: mcasp/v1/mcasp.h:685
MCASP_stopTransferTx
int32_t MCASP_stopTransferTx(MCASP_Handle handle)
Function to stop McASP transmission.