2 /*
3 * Copyright (C) 2004-2014 Texas Instruments Incorporated - http://www.ti.com/
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the
16 * distribution.
17 *
18 * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
36 //
37 //
38 // McASP definitions for SAP_PORT (e4 specific)
39 //
40 //
41 //
43 #ifndef SAP_MCASP
44 #define SAP_MCASP
46 #include <xdc/std.h>
47 #include <sio2.h>
49 #include "sap.h"
50 #include "sap_csl_mcasp.h"
52 // ..........................................................................
53 // Global context for the DAP layer
55 typedef struct SAP_MCASP_DriverObject
56 {
57 MCASP_Handle hPort[_MCASP_PORT_CNT];
58 char fifoPresent[_MCASP_PORT_CNT];
59 } SAP_MCASP_DriverObject;
61 extern SAP_MCASP_DriverObject sapMcaspDrv;
63 // ..........................................................................
65 typedef Int (*SAP_MCASP_TwaitSet) (MCASP_Handle hMcasp, Uint32 wrReg, Uint32 rdReg, Uint32 mask, Uint32 timeout);
67 //STATIC Int DAP_updateDITRam(DEV_Handle device );
69 typedef struct SAP_MCASP_Fxns {
70 //common (must be same as SAP_PORT_Fxns)
71 SAP_PORT_Talloc alloc;
72 SAP_PORT_Tclose close;
73 SAP_PORT_Tenable enable;
74 SAP_PORT_Tinit init;
75 SAP_PORT_Topen open;
76 SAP_PORT_Treset reset;
77 SAP_PORT_TwatchDog watchDog;
79 //mcasp specific portion
80 SAP_MCASP_TwaitSet waitSet;
81 } SAP_MCASP_Fxns;
83 extern SAP_MCASP_Fxns SAP_MCASP_FXNS;
85 #define SAP_MCASP_FTABLE_waitSet(_a,_b,_c,_d,_e) (*((SAP_MCASP_Fxns *)pDevExt->pFxns->pPortFxns)->waitSet)(_a,_b,_c,_d,_e)
87 //#define DAP_MCASP_FTABLE_updateDITRam(_a) (*pDevExt->pFxns->updateDITRam)(_a)
89 // .............................................................................
90 // unused for now
91 // typedef struct DAP_MCASP_DeviceExtension
92 // {
94 // } DAP_MCASP_DeviceExtension;
96 // .............................................................................
98 #endif //SAP_MCASP_H