AM62Ax MCU+ SDK  09.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>
64 #include <drivers/hw_include/csl_types.h>
65 #include <drivers/udma.h>
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 /* ========================================================================== */
72 /* Macros & Typedefs */
73 /* ========================================================================== */
74 
76 typedef void *MCASP_Handle;
77 
82 #define MCASP_GBLCTL_TIMEOUT (30000U)
83 
88 #define MCASP_DATA_TIMEOUT (30000U)
89 
91 #define MCASP_RESET ((uint32_t) 0x00U)
92 #define MCASP_ENABLE ((uint32_t) 0x01U)
93 #define MCASP_DISABLE ((uint32_t) 0x00U)
94 
95 /*
96 ** McASP Register Offset
97 */
98 #define MCASP_REG_OFFSET ((uint32_t)0x4U)
99 
109 #define MCASP_TRANSFER_STATUS_COMPLETED (0U)
110 
111 #define MCASP_TRANSFER_STATUS_STARTED (1U)
112 
113 #define MCASP_TRANSFER_STATUS_CANCELLED (2U)
114 
115 #define MCASP_TRANSFER_STATUS_FAILED (3U)
116 
117 #define MCASP_TRANSFER_STATUS_TIMEOUT (4U)
118 
130 #define MCASP_TRANSFER_MODE_POLLING (0U)
131 
136 #define MCASP_TRANSFER_MODE_INTERRUPT (1U)
137 
141 #define MCASP_TRANSFER_MODE_DMA (2U)
142 
153 #define MCASP_OPMODE_MASTER (0U)
154 
155 #define MCASP_OPMODE_SLAVE (1U)
156 
167 #define MCASP_CHANNEL_INPUT (0x0001U)
168 
169 #define MCASP_CHANNEL_OUTPUT (0x0002U)
170 
171 #define MCASP_CHANNEL_INOUT (MCASP_CHANNEL_INPUT | MCASP_CHANNEL_OUTPUT)
172 
182 #define MCASP_DRIVER_STATE_DELETED (0U)
183 #define MCASP_DRIVER_STATE_CREATED (1U)
184 #define MCASP_DRIVER_STATE_INITIALIZED (2U)
185 #define MCASP_DRIVER_STATE_OPENED (3U)
186 #define MCASP_DRIVER_STATE_CLOSED (4U)
187 #define MCASP_DRIVER_STATE_DEINITIALIZED (5U)
188 #define MCASP_DRIVER_STATE_POWERED_DOWN (6U)
189 #define MCASP_DRIVER_STATE_PWRM_SUSPEND (7U)
190 
200 #define MCASP_SERIALIZER_STATUS_FREE (0U)
201 #define MCASP_SERIALIZER_STATUS_XMT (1U)
202 #define MCASP_SERIALIZER_STATUS_RCV (2U)
203 
213 #define MCASP_CHANNEL_MODE_FREE (0U)
214 #define MCASP_CHANNEL_MODE_XMT_DIT (1U)
215 #define MCASP_CHANNEL_MODE_XMT_TDM (2U)
216 #define MCASP_CHANNEL_MODE_RCV (3U)
217 
227 #define MCASP_WORD_SELECT_LSW (0U)
228 #define MCASP_WORD_SELECT_MSW (1U)
229 
245 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_NON_INTERLEAVED (0U)
246 
251 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_INTERLEAVED (1U)
252 
258 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1 (2U)
259 
265 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2 (3U)
266 
276 #define MCASP_TRANSMIT_STATE_TX_RESET (0U)
277 #define MCASP_TRANSMIT_STATE_TX_FLUSH (1U)
278 #define MCASP_TRANSMIT_STATE_LOAD_INIT_BUFFER (2U)
279 #define MCASP_TRANSMIT_STATE_RELEASE_FROM_RESET (3U)
280 #define MCASP_TRANSMIT_STATE_WAIT_EVENT (4U)
281 #define MCASP_TRANSMIT_STATE_PROCESS_EVENT (5U)
282 #define MCASP_TRANSMIT_STATE_LOAD_ACTIVE_BUFFER (6U)
283 #define MCASP_TRANSMIT_STATE_DONE (7U)
284 #define MCASP_TRANSMIT_STATE_SPIN_IDLE (8U)
285 #define MCASP_TRANSMIT_STATE_ERROR (9U)
286 #define MCASP_TRANSMIT_STATE_EXIT (10U)
287 
297 #define MCASP_RECEIVE_STATE_RX_RESET (0U)
298 #define MCASP_RECEIVE_STATE_RX_FLUSH (1U)
299 #define MCASP_RECEIVE_STATE_RELEASE_FROM_RESET (2U)
300 #define MCASP_RECEIVE_STATE_WAIT_EVENT (3U)
301 #define MCASP_RECEIVE_STATE_PROCESS_EVENT (4U)
302 #define MCASP_RECEIVE_STATE_DONE (5U)
303 #define MCASP_RECEIVE_STATE_SPIN_IDLE (6U)
304 #define MCASP_RECEIVE_STATE_ERROR (7U)
305 #define MCASP_RECEIVE_STATE_EXIT (8U)
306 
308 #define MCASP_DIR_OUT 0
309 #define MCASP_DIR_IN 1
310 
311 #define MCASP_TRPD_INVALID_PTR (0xFFFFFFFF)
312 
313 /* ========================================================================== */
314 /* Structure Definitions */
315 /* ========================================================================== */
316 
321 typedef struct
322 {
326  void *buf;
329  uint32_t count;
333  uint32_t timeout;
335  int32_t status;
337  void *args;
340 
348 typedef void (*MCASP_TxCallbackFxn) (MCASP_Handle handle,
349  MCASP_Transaction *transaction);
350 
351 typedef void (*MCASP_RxCallbackFxn) (MCASP_Handle handle,
352  MCASP_Transaction *transaction);
353 
357 typedef struct
358 {
359  uint32_t aClk;
361  uint32_t hiClk;
363  uint32_t clkChk;
366 
370 typedef struct
371 {
372  uint32_t pfunc;
374  uint32_t pdir;
376  uint32_t gblCtl;
378  uint32_t ditCtl;
380  uint32_t dlbCtl;
382  uint32_t amute;
384  uint32_t serSetup[16u];
387 
391 typedef struct
392 {
393  uint32_t fifoCtl;
395  uint32_t fifoStatus;
398 
402 typedef struct
403 {
404  uint32_t mask;
406  uint32_t fmt;
408  uint32_t frSyncCtl;
410  uint32_t tdm;
412  uint32_t intCtl;
414  uint32_t stat;
416  uint32_t evtCtl;
423 
427 typedef struct
428 {
436 
437 typedef struct MCASP_DMAChConfig_s
438 {
439  void *txChHandle;
441  void *rxChHandle;
447  void *txTrpdMem;
449  void *rxTrpdMem;
451  uint32_t trpdMemSize;
453  void *txRingMem;
455  void *rxRingMem;
457  uint32_t ringMemSize;
459  uint32_t ringElemCnt;
461  uint32_t rxEvtNum;
463  uint32_t txEvtNum;
465  uint32_t isOpen;
468 
469 typedef struct
470 {
471  uint8_t *pTrpdMem;
472  uint8_t inUse;
474 
485 typedef struct
486 {
487  uint32_t transferMode;
489  uint8_t txBufferFormat;
491  uint8_t rxBufferFormat;
493  uint8_t txSerUsedCount;
495  uint8_t rxSerUsedCount;
497  uint8_t *txSerUsedArray;
499  uint8_t *rxSerUsedArray;
501  uint8_t txSlotCount;
503  uint8_t rxSlotCount;
509  uint32_t txLoopjobEnable;
511  uint8_t *txLoopjobBuf;
515  uint32_t rxLoopjobEnable;
517  uint8_t *rxLoopjobBuf;
528  uint8_t *cyclicBuffTx;
532  uint32_t cyclicBuffCntTx;
535  uint8_t *cyclicBuffRx;
539  uint32_t cyclicBuffCntRx;
560 
564 typedef struct
565 {
566  uint32_t intrNum;
568  uint32_t evntNum;
570  uint8_t intrPriority;
573 
578 typedef struct
579 {
580  uint32_t inProgress;
582  uint32_t state;
584  int32_t status;
586  uint32_t count;
588  uint8_t slotCount;
590  uint8_t slotIndex;
592  uint8_t frameCount;
594  uint8_t frameIndex;
596  uint8_t serCount;
598  uint8_t *serArray;
600  uint8_t bufferFormat;
609  uint32_t loopjobEnable;
613 
617 typedef struct
618 {
619  /*
620  * User params
621  */
624  uint16_t instNum;
626  uint32_t drvState;
628  uint32_t transferMode;
641  /*
642  * State variables
643  */
644  uint32_t isOpen;
646  uint32_t isTxStarted;
648  uint32_t isRxStarted;
659  QueueP_Object reqQueueObjTx, curentQueueObjTx, reqQueueObjRx, curentQueueObjRx;
661  QueueP_Handle reqQueueHandleTx, curentQueueHandleTx, reqQueueHandleRx, curentQueueHandleRx;
669  uint8_t *cyclicBuffTx;
673  uint32_t cyclicBuffCntTx;
676  uint8_t *cyclicBuffRx;
680  uint32_t cyclicBuffCntRx;
706 
714 } MCASP_Object;
715 
717 typedef struct
718 {
719  /*
720  * SOC configuration
721  */
722  uintptr_t baseAddr;
724  uintptr_t dataBaseAddr;
728  uint16_t serStatus[16];
736  uint32_t txSlotSize;
738  uint32_t rxSlotSize;
740 } MCASP_Attrs;
741 
742 typedef struct
743 {
748 } MCASP_Config;
749 
751 extern MCASP_Config gMcaspConfig[];
753 extern uint32_t gMcaspConfigNum;
754 
755 /* ========================================================================== */
756 /* Function Declarations */
757 /* ========================================================================== */
758 
762 void MCASP_init(void);
763 
767 void MCASP_deinit(void);
768 
775 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms);
776 
791 MCASP_Handle MCASP_open(uint32_t index, const MCASP_OpenParams *openParams);
792 
803 
818 
831 
844 
856 
868 
878 
888 
898 
908 
909 /* ========================================================================== */
910 /* Static Function Definitions */
911 /* ========================================================================== */
912 
913 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
914 {
915  if (openPrms != NULL)
916  {
917  // Set Default values
918  }
919 }
920 
921 #ifdef __cplusplus
922 }
923 #endif
924 
925 #endif /* #ifndef MCASP_H_ */
926 
MCASP_Object::bcdmaDrvHandle
Udma_DrvHandle bcdmaDrvHandle
Definition: mcasp/v1/mcasp.h:707
MCASP_GlobalConfig::amute
uint32_t amute
Definition: mcasp/v1/mcasp.h:382
MCASP_TransferObj::txnLoopjob
MCASP_Transaction txnLoopjob
Definition: mcasp/v1/mcasp.h:607
MCASP_OpenParams::txLoopjobEnable
uint32_t txLoopjobEnable
Definition: mcasp/v1/mcasp.h:509
MCASP_Config::attrs
const MCASP_Attrs * attrs
Definition: mcasp/v1/mcasp.h:744
MCASP_Object::txTrCompletionIdx
uint8_t txTrCompletionIdx
Definition: mcasp/v1/mcasp.h:698
MCASP_OpenParams::cyclicBuffCntTx
uint32_t cyclicBuffCntTx
Definition: mcasp/v1/mcasp.h:532
MCASP_DmaChConfig::cqRxEvtHandle
void * cqRxEvtHandle
Definition: mcasp/v1/mcasp.h:445
MCASP_Transaction::args
void * args
Definition: mcasp/v1/mcasp.h:337
MCASP_OpenParams::cyclicBuffSizeTx
uint32_t cyclicBuffSizeTx
Definition: mcasp/v1/mcasp.h:530
MCASP_ClockConfig::aClk
uint32_t aClk
Definition: mcasp/v1/mcasp.h:359
MCASP_Object::cyclicBuffCntRx
uint32_t cyclicBuffCntRx
Definition: mcasp/v1/mcasp.h:680
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:525
MCASP_OpenParams::bcdmaRxCqEvtHandle
Udma_EventHandle bcdmaRxCqEvtHandle
Definition: mcasp/v1/mcasp.h:549
MCASP_Object
MCASP driver object.
Definition: mcasp/v1/mcasp.h:618
MCASP_close
void MCASP_close(MCASP_Handle handle)
Function to close a MCASP peripheral specified by the MCASP handle.
MCASP_DmaTrpdMemAlloc
Definition: mcasp/v1/mcasp.h:470
MCASP_OpenParams::trpdMemAllocRx
MCASP_DmaTrpdMemAlloc * trpdMemAllocRx
Definition: mcasp/v1/mcasp.h:557
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:410
MCASP_DmaChConfig::rxChHandle
void * rxChHandle
Definition: mcasp/v1/mcasp.h:441
MCASP_GlobalConfig::pfunc
uint32_t pfunc
Definition: mcasp/v1/mcasp.h:372
MCASP_OpenParams::txSlotCount
uint8_t txSlotCount
Definition: mcasp/v1/mcasp.h:501
MCASP_TransferObj::frameIndex
uint8_t frameIndex
Definition: mcasp/v1/mcasp.h:594
MCASP_Object::handle
MCASP_Handle handle
Definition: mcasp/v1/mcasp.h:622
gMcaspConfig
MCASP_Config gMcaspConfig[]
Externally defined driver configuration array.
index
uint16_t index
Definition: tisci_rm_proxy.h:3
MCASP_TransferObj::slotCount
uint8_t slotCount
Definition: mcasp/v1/mcasp.h:588
MCASP_OpenParams::txSerUsedCount
uint8_t txSerUsedCount
Definition: mcasp/v1/mcasp.h:493
MCASP_TransferObj::status
int32_t status
Definition: mcasp/v1/mcasp.h:584
Udma_ChHandle
void * Udma_ChHandle
UDMA channel handle.
Definition: udma_types.h:67
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:497
MCASP_Object::hwiObjTx
HwiP_Object hwiObjTx
Definition: mcasp/v1/mcasp.h:654
MCASP_OpenParams::txLoopjobBufLength
uint32_t txLoopjobBufLength
Definition: mcasp/v1/mcasp.h:513
MCASP_DmaChConfig::txChHandle
void * txChHandle
Definition: mcasp/v1/mcasp.h:439
MCASP_Object::isTxStarted
uint32_t isTxStarted
Definition: mcasp/v1/mcasp.h:646
MCASP_Object::transferSemObj
SemaphoreP_Object transferSemObj
Definition: mcasp/v1/mcasp.h:652
MCASP_Object::lockObj
SemaphoreP_Object lockObj
Definition: mcasp/v1/mcasp.h:650
MCASP_Attrs::txSlotSize
uint32_t txSlotSize
Definition: mcasp/v1/mcasp.h:736
MCASP_TransferObj::frameCount
uint8_t frameCount
Definition: mcasp/v1/mcasp.h:592
MCASP_OpenParams::dmaChCfg
MCASP_DmaChConfig * dmaChCfg
Definition: mcasp/v1/mcasp.h:522
MCASP_OpenParams::rxCallbackFxn
MCASP_RxCallbackFxn rxCallbackFxn
Definition: mcasp/v1/mcasp.h:507
MCASP_OpenParams::rxLoopjobBufLength
uint32_t rxLoopjobBufLength
Definition: mcasp/v1/mcasp.h:519
MCASP_Object::reqQueueHandleTx
QueueP_Handle reqQueueHandleTx
Definition: mcasp/v1/mcasp.h:661
MCASP_TransferObj::state
uint32_t state
Definition: mcasp/v1/mcasp.h:582
MCASP_FifoConfig
Hardware fifo setup structure.
Definition: mcasp/v1/mcasp.h:392
MCASP_OpenParams::cyclicTxFeedDMAHandle
Udma_ChHandle * cyclicTxFeedDMAHandle
Definition: mcasp/v1/mcasp.h:542
MCASP_DataConfig::clk
MCASP_ClockConfig clk
Definition: mcasp/v1/mcasp.h:418
MCASP_DmaChConfig::isOpen
uint32_t isOpen
Definition: mcasp/v1/mcasp.h:465
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:726
MCASP_Attrs::hwCfg
MCASP_HwConfig hwCfg
Definition: mcasp/v1/mcasp.h:730
MCASP_FifoConfig::fifoStatus
uint32_t fifoStatus
Definition: mcasp/v1/mcasp.h:395
SemaphoreP.h
MCASP_GlobalConfig::dlbCtl
uint32_t dlbCtl
Definition: mcasp/v1/mcasp.h:380
MCASP_DataConfig
Hardware setup data structure.
Definition: mcasp/v1/mcasp.h:403
MCASP_DmaChConfig::txTrpdMem
void * txTrpdMem
Definition: mcasp/v1/mcasp.h:447
MCASP_TransferObj::serCount
uint8_t serCount
Definition: mcasp/v1/mcasp.h:596
MCASP_Object::currTxTransRemCnt
uint32_t currTxTransRemCnt
Definition: mcasp/v1/mcasp.h:688
MCASP_Object::currTransRx
MCASP_Transaction * currTransRx
Definition: mcasp/v1/mcasp.h:685
MCASP_TransferObj::cbFxn
MCASP_TxCallbackFxn cbFxn
Definition: mcasp/v1/mcasp.h:604
MCASP_DmaTrpdMemAlloc::inUse
uint8_t inUse
Definition: mcasp/v1/mcasp.h:472
MCASP_OpenParams::trpdMemAllocTx
MCASP_DmaTrpdMemAlloc * trpdMemAllocTx
Definition: mcasp/v1/mcasp.h:555
MCASP_Transaction
Data structure used with transfer call.
Definition: mcasp/v1/mcasp.h:322
MCASP_OpenParams::cyclicBuffSizeRx
uint32_t cyclicBuffSizeRx
Definition: mcasp/v1/mcasp.h:537
MCASP_DmaChConfig::cqTxEvtHandle
void * cqTxEvtHandle
Definition: mcasp/v1/mcasp.h:443
MCASP_OpenParams
MCASP Parameters.
Definition: mcasp/v1/mcasp.h:486
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:487
MCASP_Object::currRxTransRemCnt
uint32_t currRxTransRemCnt
Definition: mcasp/v1/mcasp.h:690
MCASP_Object::XmtObj
MCASP_TransferObj XmtObj
Definition: mcasp/v1/mcasp.h:636
MCASP_Attrs
MCASP instance attributes - used during init time.
Definition: mcasp/v1/mcasp.h:718
MCASP_Transaction::count
uint32_t count
Definition: mcasp/v1/mcasp.h:329
MCASP_GlobalConfig
Hardware setup global structure.
Definition: mcasp/v1/mcasp.h:371
MCASP_HwIntConfig::intrPriority
uint8_t intrPriority
Definition: mcasp/v1/mcasp.h:570
MCASP_HwConfig::tx
MCASP_DataConfig tx
Definition: mcasp/v1/mcasp.h:433
MCASP_Config
Definition: mcasp/v1/mcasp.h:743
MCASP_RxCallbackFxn
void(* MCASP_RxCallbackFxn)(MCASP_Handle handle, MCASP_Transaction *transaction)
Definition: mcasp/v1/mcasp.h:351
MCASP_DmaChConfig::rxRingMem
void * rxRingMem
Definition: mcasp/v1/mcasp.h:455
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:602
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_OpenParams::bcdmaDrvHandle
Udma_DrvHandle bcdmaDrvHandle
Definition: mcasp/v1/mcasp.h:552
MCASP_TransferObj::bufferFormat
uint8_t bufferFormat
Definition: mcasp/v1/mcasp.h:600
MCASP_TransferObj::count
uint32_t count
Definition: mcasp/v1/mcasp.h:586
MCASP_DmaChConfig::txRingMem
void * txRingMem
Definition: mcasp/v1/mcasp.h:453
MCASP_Object::mcaspDmaHandle
void * mcaspDmaHandle
Definition: mcasp/v1/mcasp.h:630
MCASP_OpenParams::rxBufferFormat
uint8_t rxBufferFormat
Definition: mcasp/v1/mcasp.h:491
MCASP_GlobalConfig::ditCtl
uint32_t ditCtl
Definition: mcasp/v1/mcasp.h:378
MCASP_DataConfig::evtCtl
uint32_t evtCtl
Definition: mcasp/v1/mcasp.h:416
MCASP_Object::RcvObj
MCASP_TransferObj RcvObj
Definition: mcasp/v1/mcasp.h:638
MCASP_Attrs::rxSlotSize
uint32_t rxSlotSize
Definition: mcasp/v1/mcasp.h:738
MCASP_TransferObj::loopjobEnable
uint32_t loopjobEnable
Definition: mcasp/v1/mcasp.h:609
MCASP_HwConfig::rx
MCASP_DataConfig rx
Definition: mcasp/v1/mcasp.h:431
MCASP_ClockConfig::hiClk
uint32_t hiClk
Definition: mcasp/v1/mcasp.h:361
MCASP_OpenParams::cyclicRxFeedDMAHandle
Udma_ChHandle * cyclicRxFeedDMAHandle
Definition: mcasp/v1/mcasp.h:544
QueueP.h
Udma_EventHandle
void * Udma_EventHandle
UDMA event handle.
Definition: udma_types.h:69
MCASP_OpenParams::txCallbackFxn
MCASP_TxCallbackFxn txCallbackFxn
Definition: mcasp/v1/mcasp.h:505
MCASP_DmaChConfig::trpdMemSize
uint32_t trpdMemSize
Definition: mcasp/v1/mcasp.h:451
mcasp.h
MCASP_Transaction::qElem
QueueP_Elem qElem
Definition: mcasp/v1/mcasp.h:323
MCASP_Attrs::baseAddr
uintptr_t baseAddr
Definition: mcasp/v1/mcasp.h:722
MCASP_Transaction::status
int32_t status
Definition: mcasp/v1/mcasp.h:335
MCASP_OpenParams::rxSlotCount
uint8_t rxSlotCount
Definition: mcasp/v1/mcasp.h:503
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:358
MCASP_TransferObj::inProgress
uint32_t inProgress
Definition: mcasp/v1/mcasp.h:580
MCASP_GlobalConfig::gblCtl
uint32_t gblCtl
Definition: mcasp/v1/mcasp.h:376
MCASP_DataConfig::frSyncCtl
uint32_t frSyncCtl
Definition: mcasp/v1/mcasp.h:408
MCASP_Object::cyclicBuffRx
uint8_t * cyclicBuffRx
Definition: mcasp/v1/mcasp.h:676
MCASP_Object::completedQueueObjRx
QueueP_Object completedQueueObjRx
Definition: mcasp/v1/mcasp.h:664
MCASP_Attrs::dataBaseAddr
uintptr_t dataBaseAddr
Definition: mcasp/v1/mcasp.h:724
MCASP_Object::isOpen
uint32_t isOpen
Definition: mcasp/v1/mcasp.h:644
MCASP_DataConfig::intCtl
uint32_t intCtl
Definition: mcasp/v1/mcasp.h:412
QueueP_Handle
void * QueueP_Handle
Opaque client reference to an instance of a QueueP.
Definition: QueueP.h:68
MCASP_Object::cyclicTxFeedDMAHandle
Udma_ChHandle cyclicTxFeedDMAHandle
Definition: mcasp/v1/mcasp.h:693
MCASP_DmaChConfig::txEvtNum
uint32_t txEvtNum
Definition: mcasp/v1/mcasp.h:463
MCASP_OpenParams::rxLoopjobEnable
uint32_t rxLoopjobEnable
Definition: mcasp/v1/mcasp.h:515
MCASP_DataConfig::stat
uint32_t stat
Definition: mcasp/v1/mcasp.h:414
MCASP_openParamsInit
static void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
Function to initialize the MCASP_OpenParams struct to its defaults.
Definition: mcasp/v1/mcasp.h:913
MCASP_HwConfig::gbl
MCASP_GlobalConfig gbl
Definition: mcasp/v1/mcasp.h:429
MCASP_Handle
void * MCASP_Handle
A handle that is returned from a MCASP_open() call.
Definition: mcasp/v1/mcasp.h:76
MCASP_Object::bcdmaTxCyclicEvtHandle
Udma_EventHandle bcdmaTxCyclicEvtHandle
Definition: mcasp/v1/mcasp.h:703
MCASP_Object::completedQueueHandleRx
QueueP_Handle completedQueueHandleRx
Definition: mcasp/v1/mcasp.h:666
MCASP_GlobalConfig::pdir
uint32_t pdir
Definition: mcasp/v1/mcasp.h:374
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
MCASP_Object::trpdMemAllocTx
MCASP_DmaTrpdMemAlloc * trpdMemAllocTx
Definition: mcasp/v1/mcasp.h:710
MCASP_Object::reqQueueObjTx
QueueP_Object reqQueueObjTx
Definition: mcasp/v1/mcasp.h:659
MCASP_Object::transferMode
uint32_t transferMode
Definition: mcasp/v1/mcasp.h:628
udma.h
UDMA Driver API/interface file.
MCASP_Object::bcdmaRxCyclicEvtHandle
Udma_EventHandle bcdmaRxCyclicEvtHandle
Definition: mcasp/v1/mcasp.h:705
MCASP_HwIntConfig::intrNum
uint32_t intrNum
Definition: mcasp/v1/mcasp.h:566
MCASP_HwIntConfig
McASP Interrupt structures.
Definition: mcasp/v1/mcasp.h:565
Udma_DrvHandle
void * Udma_DrvHandle
UDMA driver handle.
Definition: udma_types.h:65
MCASP_Object::currTransTx
MCASP_Transaction * currTransTx
Definition: mcasp/v1/mcasp.h:683
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:406
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:348
MCASP_Object::rxTrCompletionIdx
uint8_t rxTrCompletionIdx
Definition: mcasp/v1/mcasp.h:700
MCASP_TransferObj
McASP Transfer Data structure stored in driver object.
Definition: mcasp/v1/mcasp.h:579
MCASP_Object::dmaChCfg
MCASP_DmaChConfig * dmaChCfg
Definition: mcasp/v1/mcasp.h:633
MCASP_Object::cyclicBuffSizeTx
uint32_t cyclicBuffSizeTx
Definition: mcasp/v1/mcasp.h:671
MCASP_Attrs::intCfgRx
MCASP_HwIntConfig intCfgRx
Definition: mcasp/v1/mcasp.h:734
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:461
MCASP_Object::cyclicBuffCntTx
uint32_t cyclicBuffCntTx
Definition: mcasp/v1/mcasp.h:673
MCASP_ClockConfig::clkChk
uint32_t clkChk
Definition: mcasp/v1/mcasp.h:363
MCASP_OpenParams::rxSerUsedCount
uint8_t rxSerUsedCount
Definition: mcasp/v1/mcasp.h:495
MCASP_Attrs::intCfgTx
MCASP_HwIntConfig intCfgTx
Definition: mcasp/v1/mcasp.h:732
MCASP_HwIntConfig::evntNum
uint32_t evntNum
Definition: mcasp/v1/mcasp.h:568
MCASP_DmaChConfig::ringElemCnt
uint32_t ringElemCnt
Definition: mcasp/v1/mcasp.h:459
MCASP_OpenParams::bcdmaTxCqEvtHandle
Udma_EventHandle bcdmaTxCqEvtHandle
Definition: mcasp/v1/mcasp.h:547
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:598
MCASP_Transaction::timeout
uint32_t timeout
Definition: mcasp/v1/mcasp.h:333
MCASP_OpenParams::rxLoopjobBuf
uint8_t * rxLoopjobBuf
Definition: mcasp/v1/mcasp.h:517
MCASP_DataConfig::fifoCfg
MCASP_FifoConfig fifoCfg
Definition: mcasp/v1/mcasp.h:420
MCASP_Object::instNum
uint16_t instNum
Definition: mcasp/v1/mcasp.h:624
MCASP_OpenParams::cyclicBuffCntRx
uint32_t cyclicBuffCntRx
Definition: mcasp/v1/mcasp.h:539
MCASP_DmaChConfig::ringMemSize
uint32_t ringMemSize
Definition: mcasp/v1/mcasp.h:457
MCASP_TransferObj::slotIndex
uint8_t slotIndex
Definition: mcasp/v1/mcasp.h:590
MCASP_Transaction::buf
void * buf
Definition: mcasp/v1/mcasp.h:326
MCASP_Object::cyclicBuffTx
uint8_t * cyclicBuffTx
Definition: mcasp/v1/mcasp.h:669
MCASP_OpenParams::cyclicBuffRx
uint8_t * cyclicBuffRx
Definition: mcasp/v1/mcasp.h:535
MCASP_DmaChConfig::rxTrpdMem
void * rxTrpdMem
Definition: mcasp/v1/mcasp.h:449
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_Object::trpdMemAllocRx
MCASP_DmaTrpdMemAlloc * trpdMemAllocRx
Definition: mcasp/v1/mcasp.h:712
MCASP_DmaChConfig
Definition: mcasp/v1/mcasp.h:438
MCASP_Object::hwiObjRx
HwiP_Object hwiObjRx
Definition: mcasp/v1/mcasp.h:656
MCASP_Object::isRxStarted
uint32_t isRxStarted
Definition: mcasp/v1/mcasp.h:648
MCASP_Object::cyclicRxFeedDMAHandle
Udma_ChHandle cyclicRxFeedDMAHandle
Definition: mcasp/v1/mcasp.h:695
MCASP_Config::object
MCASP_Object * object
Definition: mcasp/v1/mcasp.h:746
MCASP_Object::cyclicBuffSizeRx
uint32_t cyclicBuffSizeRx
Definition: mcasp/v1/mcasp.h:678
MCASP_OpenParams::cyclicBuffTx
uint8_t * cyclicBuffTx
Definition: mcasp/v1/mcasp.h:528
MCASP_init
void MCASP_init(void)
This function initializes the MCASP module.
MCASP_FifoConfig::fifoCtl
uint32_t fifoCtl
Definition: mcasp/v1/mcasp.h:393
MCASP_OpenParams::txLoopjobBuf
uint8_t * txLoopjobBuf
Definition: mcasp/v1/mcasp.h:511
MCASP_HwConfig
Hardware setup structure.
Definition: mcasp/v1/mcasp.h:428
MCASP_OpenParams::rxSerUsedArray
uint8_t * rxSerUsedArray
Definition: mcasp/v1/mcasp.h:499
MCASP_DmaTrpdMemAlloc::pTrpdMem
uint8_t * pTrpdMem
Definition: mcasp/v1/mcasp.h:471
MCASP_DataConfig::mask
uint32_t mask
Definition: mcasp/v1/mcasp.h:404
MCASP_Object::drvState
uint32_t drvState
Definition: mcasp/v1/mcasp.h:626
MCASP_OpenParams::txBufferFormat
uint8_t txBufferFormat
Definition: mcasp/v1/mcasp.h:489
MCASP_stopTransferTx
int32_t MCASP_stopTransferTx(MCASP_Handle handle)
Function to stop McASP transmission.