2 /*
3 Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
4 All rights reserved.
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 // Stacking Input Buffer Driver declarations
39 //
40 //
41 // Derived from /c/ti/c6000/include/dgs.h
43 #ifndef DOB_H
44 #define DOB_H
46 #include <xdc/std.h>
47 #include <dev2.h>
48 #include <sio2.h>
49 #include <ti/xdais/xdas.h>
51 #include <outbuf.h>
52 #include <pafenc.h>
53 // .............................................................................
54 //Function table defs
56 typedef Int (*DOB_Tshutdown)(DEV2_Handle);
57 typedef Int (*DOB_TstartClocks)(DEV2_Handle);
58 typedef Int (*DOB_TissueIEC)(DEV2_Handle, PAF_OutBufConfig *);
59 typedef Int (*DOB_TreallocFrames)(DEV2_Handle);
61 typedef struct DOB_Fxns {
62 //common (must be same as DEV2_Fxns)
63 DEV2_Tclose close;
64 DEV2_Tctrl ctrl;
65 DEV2_Tidle idle;
66 DEV2_Tissue issue;
67 DEV2_Topen open;
68 DEV2_Tready ready;
69 DEV2_Treclaim reclaim;
71 //DOB specific
72 DOB_Tshutdown shutdown;
73 DOB_TstartClocks startClocks;
74 DOB_TissueIEC issueIEC;
75 DOB_TreallocFrames reallocFrames;
76 } DOB_Fxns;
78 extern DOB_Fxns DOB_FXNS;
79 extern Void DOB_init( Void );
81 // .............................................................................
83 typedef struct DOB_DeviceExtension {
84 SIO2_Obj child;
86 DOB_Fxns *pFxns;
88 XDAS_Int8 state;
89 XDAS_UInt8 maxNumBuf;
90 XDAS_UInt16 lengthofFrame;
92 float rateX;
94 PAF_OutBufStatus *pBufStatus;
95 PAF_EncodeStatus *pEncStatus;
97 } DOB_DeviceExtension;
99 // .............................................................................
101 #endif /* DOB_H */