AM273x MCU+ SDK  08.06.00
mcasp/v0/mcasp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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/edma.h>
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
70 /* ========================================================================== */
71 /* Macros & Typedefs */
72 /* ========================================================================== */
73 
75 typedef void *MCASP_Handle;
76 
81 #define MCASP_GBLCTL_TIMEOUT (30000U)
82 
87 #define MCASP_DATA_TIMEOUT (30000U)
88 
90 #define MCASP_RESET ((uint32_t) 0x00U)
91 #define MCASP_ENABLE ((uint32_t) 0x01U)
92 #define MCASP_DISABLE ((uint32_t) 0x00U)
93 
94 /*
95 ** McASP Register Offset
96 */
97 #define MCASP_REG_OFFSET ((uint32_t)0x4U)
98 
108 #define MCASP_TRANSFER_STATUS_COMPLETED (0U)
109 
110 #define MCASP_TRANSFER_STATUS_STARTED (1U)
111 
112 #define MCASP_TRANSFER_STATUS_CANCELLED (2U)
113 
114 #define MCASP_TRANSFER_STATUS_FAILED (3U)
115 
116 #define MCASP_TRANSFER_STATUS_TIMEOUT (4U)
117 
129 #define MCASP_TRANSFER_MODE_POLLING (0U)
130 
135 #define MCASP_TRANSFER_MODE_INTERRUPT (1U)
136 
140 #define MCASP_TRANSFER_MODE_DMA (2U)
141 
152 #define MCASP_OPMODE_CONTROLLER (0U)
153 
154 #define MCASP_OPMODE_PERIPHERAL (1U)
155 
166 #define MCASP_CHANNEL_INPUT (0x0001U)
167 
168 #define MCASP_CHANNEL_OUTPUT (0x0002U)
169 
170 #define MCASP_CHANNEL_INOUT (MCASP_CHANNEL_INPUT | MCASP_CHANNEL_OUTPUT)
171 
181 #define MCASP_DRIVER_STATE_DELETED (0U)
182 #define MCASP_DRIVER_STATE_CREATED (1U)
183 #define MCASP_DRIVER_STATE_INITIALIZED (2U)
184 #define MCASP_DRIVER_STATE_OPENED (3U)
185 #define MCASP_DRIVER_STATE_CLOSED (4U)
186 #define MCASP_DRIVER_STATE_DEINITIALIZED (5U)
187 #define MCASP_DRIVER_STATE_POWERED_DOWN (6U)
188 #define MCASP_DRIVER_STATE_PWRM_SUSPEND (7U)
189 
199 #define MCASP_SERIALIZER_STATUS_FREE (0U)
200 #define MCASP_SERIALIZER_STATUS_XMT (1U)
201 #define MCASP_SERIALIZER_STATUS_RCV (2U)
202 
212 #define MCASP_CHANNEL_MODE_FREE (0U)
213 #define MCASP_CHANNEL_MODE_XMT_DIT (1U)
214 #define MCASP_CHANNEL_MODE_XMT_TDM (2U)
215 #define MCASP_CHANNEL_MODE_RCV (3U)
216 
226 #define MCASP_WORD_SELECT_LSW (0U)
227 #define MCASP_WORD_SELECT_MSW (1U)
228 
244 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_NON_INTERLEAVED (0U)
245 
250 #define MCASP_AUDBUFF_FORMAT_1SER_MULTISLOT_INTERLEAVED (1U)
251 
257 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1 (2U)
258 
264 #define MCASP_AUDBUFF_FORMAT_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2 (3U)
265 
275 #define MCASP_TRANSMIT_STATE_TX_RESET (0U)
276 #define MCASP_TRANSMIT_STATE_TX_FLUSH (1U)
277 #define MCASP_TRANSMIT_STATE_LOAD_INIT_BUFFER (2U)
278 #define MCASP_TRANSMIT_STATE_RELEASE_FROM_RESET (3U)
279 #define MCASP_TRANSMIT_STATE_WAIT_EVENT (4U)
280 #define MCASP_TRANSMIT_STATE_PROCESS_EVENT (5U)
281 #define MCASP_TRANSMIT_STATE_LOAD_ACTIVE_BUFFER (6U)
282 #define MCASP_TRANSMIT_STATE_DONE (7U)
283 #define MCASP_TRANSMIT_STATE_SPIN_IDLE (8U)
284 #define MCASP_TRANSMIT_STATE_ERROR (9U)
285 #define MCASP_TRANSMIT_STATE_EXIT (10U)
286 
296 #define MCASP_RECEIVE_STATE_RX_RESET (0U)
297 #define MCASP_RECEIVE_STATE_RX_FLUSH (1U)
298 #define MCASP_RECEIVE_STATE_RELEASE_FROM_RESET (2U)
299 #define MCASP_RECEIVE_STATE_WAIT_EVENT (3U)
300 #define MCASP_RECEIVE_STATE_PROCESS_EVENT (4U)
301 #define MCASP_RECEIVE_STATE_DONE (5U)
302 #define MCASP_RECEIVE_STATE_SPIN_IDLE (6U)
303 #define MCASP_RECEIVE_STATE_ERROR (7U)
304 #define MCASP_RECEIVE_STATE_EXIT (8U)
305 
307 /* ========================================================================== */
308 /* Structure Definitions */
309 /* ========================================================================== */
310 
315 typedef struct
316 {
320  void *buf;
323  uint32_t count;
327  uint32_t timeout;
329  int32_t status;
331  void *args;
334 
342 typedef void (*MCASP_TxCallbackFxn) (MCASP_Handle handle,
343  MCASP_Transaction *transaction);
344 
345 typedef void (*MCASP_RxCallbackFxn) (MCASP_Handle handle,
346  MCASP_Transaction *transaction);
347 
351 typedef struct
352 {
353  uint32_t aClk;
355  uint32_t hiClk;
357  uint32_t clkChk;
360 
364 typedef struct
365 {
366  uint32_t pfunc;
368  uint32_t pdir;
370  uint32_t gblCtl;
372  uint32_t ditCtl;
374  uint32_t dlbCtl;
376  uint32_t amute;
378  uint32_t serSetup[16u];
381 
385 typedef struct
386 {
387  uint32_t fifoCtl;
389  uint32_t fifoStatus;
392 
396 typedef struct
397 {
398  uint32_t mask;
400  uint32_t fmt;
402  uint32_t frSyncCtl;
404  uint32_t tdm;
406  uint32_t intCtl;
408  uint32_t stat;
410  uint32_t evtCtl;
417 
421 typedef struct
422 {
430 
441 typedef struct
442 {
443  int32_t edmaInst;
445  uint32_t transferMode;
447  uint8_t txBufferFormat;
449  uint8_t rxBufferFormat;
451  uint8_t txSerUsedCount;
453  uint8_t rxSerUsedCount;
455  uint8_t *txSerUsedArray;
457  uint8_t *rxSerUsedArray;
459  uint8_t txSlotCount;
461  uint8_t rxSlotCount;
467  uint32_t txLoopjobEnable;
469  uint8_t *txLoopjobBuf;
473  uint32_t rxLoopjobEnable;
475  uint8_t *rxLoopjobBuf;
480 
484 typedef struct
485 {
486  uint32_t intrNum;
488  uint8_t intrPriority;
491 
496 typedef struct
497 {
498  uint32_t inProgress;
500  uint32_t state;
502  int32_t status;
504  uint32_t count;
506  uint8_t slotCount;
508  uint8_t slotIndex;
510  uint8_t frameCount;
512  uint8_t frameIndex;
514  uint8_t serCount;
516  uint8_t *serArray;
518  uint8_t bufferFormat;
527  uint32_t loopjobEnable;
531 
535 typedef struct
536 {
537  uint32_t baseAddr;
539  uint32_t regionId;
541  uint32_t chId;
543  uint32_t paramId;
545  uint32_t tccId;
547  uint32_t linkParamId;
551 
555 typedef struct
556 {
557  /*
558  * User params
559  */
562  uint16_t instNum;
564  uint32_t drvState;
566  uint32_t transferMode;
568  int32_t edmaInst;
575  /*
576  * State variables
577  */
578  uint32_t isOpen;
580  uint32_t isTxStarted;
582  uint32_t isRxStarted;
597  QueueP_Object reqQueueObjTx, curentQueueObjTx, reqQueueObjRx, curentQueueObjRx;
599  QueueP_Handle reqQueueHandleTx, curentQueueHandleTx, reqQueueHandleRx, curentQueueHandleRx;
601 } MCASP_Object;
602 
604 typedef struct
605 {
606  /*
607  * SOC configuration
608  */
609  uintptr_t baseAddr;
611  uintptr_t dataBaseAddr;
615  uint16_t serStatus[16];
623  uint32_t edmaChTx;
625  uint32_t edmaChRx;
627  uint32_t txSlotSize;
629  uint32_t rxSlotSize;
631 } MCASP_Attrs;
632 
633 typedef struct
634 {
639 } MCASP_Config;
640 
642 extern MCASP_Config gMcaspConfig[];
644 extern uint32_t gMcaspConfigNum;
645 
646 
647 /* ========================================================================== */
648 /* Function Declarations */
649 /* ========================================================================== */
650 
654 void MCASP_init(void);
655 
659 void MCASP_deinit(void);
660 
667 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms);
668 
683 MCASP_Handle MCASP_open(uint32_t index, const MCASP_OpenParams *openParams);
684 
695 
710 
723 
736 
748 
760 
770 
780 
790 
800 
801 /* ========================================================================== */
802 /* Static Function Definitions */
803 /* ========================================================================== */
804 
805 static inline void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
806 {
807  if (openPrms != NULL)
808  {
809  // Set Default values
810  }
811 }
812 
813 #ifdef __cplusplus
814 }
815 #endif
816 
817 #endif /* #ifndef MCASP_H_ */
818 
MCASP_GlobalConfig::amute
uint32_t amute
Definition: mcasp/v0/mcasp.h:376
MCASP_TransferObj::txnLoopjob
MCASP_Transaction txnLoopjob
Definition: mcasp/v0/mcasp.h:525
MCASP_OpenParams::txLoopjobEnable
uint32_t txLoopjobEnable
Definition: mcasp/v0/mcasp.h:467
MCASP_Config::attrs
const MCASP_Attrs * attrs
Definition: mcasp/v0/mcasp.h:635
MCASP_Transaction::args
void * args
Definition: mcasp/v0/mcasp.h:331
MCASP_ClockConfig::aClk
uint32_t aClk
Definition: mcasp/v0/mcasp.h:353
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_Object
MCASP driver object.
Definition: mcasp/v0/mcasp.h:556
MCASP_close
void MCASP_close(MCASP_Handle handle)
Function to close a MCASP peripheral specified by the MCASP handle.
MCASP_EdmaConfig::intrObj
Edma_IntrObject intrObj
Definition: mcasp/v0/mcasp.h:549
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/v0/mcasp.h:404
MCASP_GlobalConfig::pfunc
uint32_t pfunc
Definition: mcasp/v0/mcasp.h:366
MCASP_OpenParams::txSlotCount
uint8_t txSlotCount
Definition: mcasp/v0/mcasp.h:459
MCASP_TransferObj::frameIndex
uint8_t frameIndex
Definition: mcasp/v0/mcasp.h:512
MCASP_Object::handle
MCASP_Handle handle
Definition: mcasp/v0/mcasp.h:560
gMcaspConfig
MCASP_Config gMcaspConfig[]
Externally defined driver configuration array.
Edma_IntrObject
EDMA interrupt configuration object. The object is passed to the EDMA_registerIntr() function....
Definition: edma/v0/edma.h:479
MCASP_TransferObj::slotCount
uint8_t slotCount
Definition: mcasp/v0/mcasp.h:506
MCASP_OpenParams::txSerUsedCount
uint8_t txSerUsedCount
Definition: mcasp/v0/mcasp.h:451
MCASP_TransferObj::status
int32_t status
Definition: mcasp/v0/mcasp.h:502
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/v0/mcasp.h:455
MCASP_Object::hwiObjTx
HwiP_Object hwiObjTx
Definition: mcasp/v0/mcasp.h:588
MCASP_OpenParams::txLoopjobBufLength
uint32_t txLoopjobBufLength
Definition: mcasp/v0/mcasp.h:471
MCASP_Object::isTxStarted
uint32_t isTxStarted
Definition: mcasp/v0/mcasp.h:580
MCASP_Object::transferSemObj
SemaphoreP_Object transferSemObj
Definition: mcasp/v0/mcasp.h:586
MCASP_EdmaConfig::baseAddr
uint32_t baseAddr
Definition: mcasp/v0/mcasp.h:537
MCASP_Object::lockObj
SemaphoreP_Object lockObj
Definition: mcasp/v0/mcasp.h:584
MCASP_Attrs::txSlotSize
uint32_t txSlotSize
Definition: mcasp/v0/mcasp.h:627
MCASP_TransferObj::frameCount
uint8_t frameCount
Definition: mcasp/v0/mcasp.h:510
MCASP_OpenParams::rxCallbackFxn
MCASP_RxCallbackFxn rxCallbackFxn
Definition: mcasp/v0/mcasp.h:465
MCASP_OpenParams::rxLoopjobBufLength
uint32_t rxLoopjobBufLength
Definition: mcasp/v0/mcasp.h:477
MCASP_Object::reqQueueHandleTx
QueueP_Handle reqQueueHandleTx
Definition: mcasp/v0/mcasp.h:599
MCASP_TransferObj::state
uint32_t state
Definition: mcasp/v0/mcasp.h:500
MCASP_FifoConfig
Hardware fifo setup structure.
Definition: mcasp/v0/mcasp.h:386
MCASP_EdmaConfig::paramId
uint32_t paramId
Definition: mcasp/v0/mcasp.h:543
MCASP_Attrs::edmaChRx
uint32_t edmaChRx
Definition: mcasp/v0/mcasp.h:625
MCASP_DataConfig::clk
MCASP_ClockConfig clk
Definition: mcasp/v0/mcasp.h:412
MCASP_EdmaConfig::linkParamId
uint32_t linkParamId
Definition: mcasp/v0/mcasp.h:547
MCASP_EdmaConfig
MCASP edma configuration object.
Definition: mcasp/v0/mcasp.h:536
MCASP_open
MCASP_Handle MCASP_open(uint32_t index, const MCASP_OpenParams *openParams)
This function opens a given MCASP peripheral.
MCASP_OpenParams::edmaInst
int32_t edmaInst
Definition: mcasp/v0/mcasp.h:443
MCASP_Attrs::numOfSerializers
uint16_t numOfSerializers
Definition: mcasp/v0/mcasp.h:613
MCASP_Attrs::hwCfg
MCASP_HwConfig hwCfg
Definition: mcasp/v0/mcasp.h:617
MCASP_FifoConfig::fifoStatus
uint32_t fifoStatus
Definition: mcasp/v0/mcasp.h:389
SemaphoreP.h
MCASP_GlobalConfig::dlbCtl
uint32_t dlbCtl
Definition: mcasp/v0/mcasp.h:374
MCASP_DataConfig
Hardware setup data structure.
Definition: mcasp/v0/mcasp.h:397
MCASP_TransferObj::serCount
uint8_t serCount
Definition: mcasp/v0/mcasp.h:514
MCASP_TransferObj::cbFxn
MCASP_TxCallbackFxn cbFxn
Definition: mcasp/v0/mcasp.h:522
edma.h
MCASP_Transaction
Data structure used with transfer call.
Definition: mcasp/v0/mcasp.h:316
MCASP_Object::xmtDmaObj
MCASP_EdmaConfig xmtDmaObj
Definition: mcasp/v0/mcasp.h:592
MCASP_OpenParams
MCASP Parameters.
Definition: mcasp/v0/mcasp.h:442
MCASP_stopTransferRx
int32_t MCASP_stopTransferRx(MCASP_Handle handle)
Function to stop McASP reception.
MCASP_OpenParams::transferMode
uint32_t transferMode
Definition: mcasp/v0/mcasp.h:445
MCASP_Object::XmtObj
MCASP_TransferObj XmtObj
Definition: mcasp/v0/mcasp.h:570
MCASP_Attrs
MCASP instance attributes - used during init time.
Definition: mcasp/v0/mcasp.h:605
MCASP_Transaction::count
uint32_t count
Definition: mcasp/v0/mcasp.h:323
MCASP_GlobalConfig
Hardware setup global structure.
Definition: mcasp/v0/mcasp.h:365
MCASP_EdmaConfig::tccId
uint32_t tccId
Definition: mcasp/v0/mcasp.h:545
MCASP_HwIntConfig::intrPriority
uint8_t intrPriority
Definition: mcasp/v0/mcasp.h:488
MCASP_HwConfig::tx
MCASP_DataConfig tx
Definition: mcasp/v0/mcasp.h:427
MCASP_Config
Definition: mcasp/v0/mcasp.h:634
MCASP_RxCallbackFxn
void(* MCASP_RxCallbackFxn)(MCASP_Handle handle, MCASP_Transaction *transaction)
Definition: mcasp/v0/mcasp.h:345
MCASP_deinit
void MCASP_deinit(void)
This function de-initializes the MCASP module.
HwiP.h
MCASP_TransferObj::transaction
MCASP_Transaction * transaction
Definition: mcasp/v0/mcasp.h:520
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/v0/mcasp.h:518
MCASP_TransferObj::count
uint32_t count
Definition: mcasp/v0/mcasp.h:504
MCASP_OpenParams::rxBufferFormat
uint8_t rxBufferFormat
Definition: mcasp/v0/mcasp.h:449
MCASP_GlobalConfig::ditCtl
uint32_t ditCtl
Definition: mcasp/v0/mcasp.h:372
MCASP_DataConfig::evtCtl
uint32_t evtCtl
Definition: mcasp/v0/mcasp.h:410
MCASP_Object::RcvObj
MCASP_TransferObj RcvObj
Definition: mcasp/v0/mcasp.h:572
MCASP_Attrs::rxSlotSize
uint32_t rxSlotSize
Definition: mcasp/v0/mcasp.h:629
MCASP_TransferObj::loopjobEnable
uint32_t loopjobEnable
Definition: mcasp/v0/mcasp.h:527
MCASP_HwConfig::rx
MCASP_DataConfig rx
Definition: mcasp/v0/mcasp.h:425
MCASP_ClockConfig::hiClk
uint32_t hiClk
Definition: mcasp/v0/mcasp.h:355
QueueP.h
MCASP_OpenParams::txCallbackFxn
MCASP_TxCallbackFxn txCallbackFxn
Definition: mcasp/v0/mcasp.h:463
mcasp.h
MCASP_Transaction::qElem
QueueP_Elem qElem
Definition: mcasp/v0/mcasp.h:317
MCASP_Attrs::baseAddr
uintptr_t baseAddr
Definition: mcasp/v0/mcasp.h:609
MCASP_Transaction::status
int32_t status
Definition: mcasp/v0/mcasp.h:329
MCASP_OpenParams::rxSlotCount
uint8_t rxSlotCount
Definition: mcasp/v0/mcasp.h:461
MCASP_Object::rcvDmaObj
MCASP_EdmaConfig rcvDmaObj
Definition: mcasp/v0/mcasp.h:594
QueueP_Object
Opaque task object used with the task APIs.
Definition: QueueP.h:92
MCASP_Object::edmaInst
int32_t edmaInst
Definition: mcasp/v0/mcasp.h:568
MCASP_ClockConfig
Hardware setup data clock structure.
Definition: mcasp/v0/mcasp.h:352
MCASP_TransferObj::inProgress
uint32_t inProgress
Definition: mcasp/v0/mcasp.h:498
MCASP_EdmaConfig::regionId
uint32_t regionId
Definition: mcasp/v0/mcasp.h:539
MCASP_GlobalConfig::gblCtl
uint32_t gblCtl
Definition: mcasp/v0/mcasp.h:370
MCASP_DataConfig::frSyncCtl
uint32_t frSyncCtl
Definition: mcasp/v0/mcasp.h:402
MCASP_Attrs::dataBaseAddr
uintptr_t dataBaseAddr
Definition: mcasp/v0/mcasp.h:611
MCASP_Object::isOpen
uint32_t isOpen
Definition: mcasp/v0/mcasp.h:578
MCASP_DataConfig::intCtl
uint32_t intCtl
Definition: mcasp/v0/mcasp.h:406
QueueP_Handle
void * QueueP_Handle
Opaque client reference to an instance of a QueueP.
Definition: QueueP.h:68
MCASP_OpenParams::rxLoopjobEnable
uint32_t rxLoopjobEnable
Definition: mcasp/v0/mcasp.h:473
MCASP_DataConfig::stat
uint32_t stat
Definition: mcasp/v0/mcasp.h:408
MCASP_openParamsInit
static void MCASP_openParamsInit(MCASP_OpenParams *openPrms)
Function to initialize the MCASP_OpenParams struct to its defaults.
Definition: mcasp/v0/mcasp.h:805
MCASP_Attrs::edmaChTx
uint32_t edmaChTx
Definition: mcasp/v0/mcasp.h:623
MCASP_HwConfig::gbl
MCASP_GlobalConfig gbl
Definition: mcasp/v0/mcasp.h:423
MCASP_Handle
void * MCASP_Handle
A handle that is returned from a MCASP_open() call.
Definition: mcasp/v0/mcasp.h:75
MCASP_GlobalConfig::pdir
uint32_t pdir
Definition: mcasp/v0/mcasp.h:368
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:91
MCASP_Object::reqQueueObjTx
QueueP_Object reqQueueObjTx
Definition: mcasp/v0/mcasp.h:597
MCASP_Object::transferMode
uint32_t transferMode
Definition: mcasp/v0/mcasp.h:566
MCASP_HwIntConfig::intrNum
uint32_t intrNum
Definition: mcasp/v0/mcasp.h:486
MCASP_HwIntConfig
McASP Interrupt structures.
Definition: mcasp/v0/mcasp.h:485
MCASP_startTransferRx
int32_t MCASP_startTransferRx(MCASP_Handle handle)
Function to start McASP reception.
MCASP_DataConfig::fmt
uint32_t fmt
Definition: mcasp/v0/mcasp.h:400
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/v0/mcasp.h:342
MCASP_TransferObj
McASP Transfer Data structure stored in driver object.
Definition: mcasp/v0/mcasp.h:497
MCASP_Attrs::intCfgRx
MCASP_HwIntConfig intCfgRx
Definition: mcasp/v0/mcasp.h:621
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
MCASP_ClockConfig::clkChk
uint32_t clkChk
Definition: mcasp/v0/mcasp.h:357
MCASP_OpenParams::rxSerUsedCount
uint8_t rxSerUsedCount
Definition: mcasp/v0/mcasp.h:453
MCASP_Attrs::intCfgTx
MCASP_HwIntConfig intCfgTx
Definition: mcasp/v0/mcasp.h:619
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/v0/mcasp.h:516
MCASP_Transaction::timeout
uint32_t timeout
Definition: mcasp/v0/mcasp.h:327
MCASP_OpenParams::rxLoopjobBuf
uint8_t * rxLoopjobBuf
Definition: mcasp/v0/mcasp.h:475
MCASP_DataConfig::fifoCfg
MCASP_FifoConfig fifoCfg
Definition: mcasp/v0/mcasp.h:414
MCASP_Object::instNum
uint16_t instNum
Definition: mcasp/v0/mcasp.h:562
MCASP_TransferObj::slotIndex
uint8_t slotIndex
Definition: mcasp/v0/mcasp.h:508
MCASP_Transaction::buf
void * buf
Definition: mcasp/v0/mcasp.h:320
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::hwiObjRx
HwiP_Object hwiObjRx
Definition: mcasp/v0/mcasp.h:590
MCASP_Object::isRxStarted
uint32_t isRxStarted
Definition: mcasp/v0/mcasp.h:582
MCASP_Config::object
MCASP_Object * object
Definition: mcasp/v0/mcasp.h:637
MCASP_init
void MCASP_init(void)
This function initializes the MCASP module.
MCASP_FifoConfig::fifoCtl
uint32_t fifoCtl
Definition: mcasp/v0/mcasp.h:387
MCASP_OpenParams::txLoopjobBuf
uint8_t * txLoopjobBuf
Definition: mcasp/v0/mcasp.h:469
MCASP_HwConfig
Hardware setup structure.
Definition: mcasp/v0/mcasp.h:422
MCASP_OpenParams::rxSerUsedArray
uint8_t * rxSerUsedArray
Definition: mcasp/v0/mcasp.h:457
MCASP_DataConfig::mask
uint32_t mask
Definition: mcasp/v0/mcasp.h:398
MCASP_EdmaConfig::chId
uint32_t chId
Definition: mcasp/v0/mcasp.h:541
MCASP_Object::drvState
uint32_t drvState
Definition: mcasp/v0/mcasp.h:564
MCASP_OpenParams::txBufferFormat
uint8_t txBufferFormat
Definition: mcasp/v0/mcasp.h:447
MCASP_stopTransferTx
int32_t MCASP_stopTransferTx(MCASP_Handle handle)
Function to stop McASP transmission.