blob: 1f63426fefb5556dce9c00793aa973b593919eb9 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/** \file vp_api.h
2 * vp_api.h
3 *
4 * Header file for the API-II c files.
5 *
6 * This file contains the all of the VoicePath API-II function prototypes. This
7 * file should be used to bring in the VP-API-II library modules that are
8 * necessary for a given application.
9 *
10 *****************************************************************************
11 * NOTE: Inclusion of only this file is sufficient to bring in the all the *
12 * necessary aspects of VP_API. *
13 *****************************************************************************
14 *
15 * Copyright (c) 2011, Microsemi Corporation
16 *
17 * $Revision: 12615 $
18 * $LastChangedDate: 2018-07-24 07:21:36 -0500 (Tue, 24 Jul 2018) $
19 */
20
21
22#ifndef VP_API_H
23#define VP_API_H
24
25/******************************************************************************
26 * VP-API Version *
27 *****************************************************************************/
28/*
29 * The following version number tag is updated at every release of the VP-API.
30 * Since the VP-API is a common interface that supports more than one device,
31 * version number change might occur when any aspect of the VP-API gets
32 * released.
33 */
34#define VP_API_VERSION_TAG (0x021B00)
35#define VP_API_VERSION_PATCH_NUM 0
36
37#define VP_API_VERSION_MAJOR_NUM (((VP_API_VERSION_TAG) & 0xFF0000) >> 16)
38#define VP_API_VERSION_MINOR_NUM (((VP_API_VERSION_TAG) & 0x00FF00) >> 8)
39#define VP_API_VERSION_MINI_NUM ((VP_API_VERSION_TAG) & 0x0000FF)
40
41
42/* First include various basic data types used in the API */
43#include "vp_api_types.h"
44
45/******************************************************************************
46 * Defines the configuration of VP-API library that needs to be built. *
47 * Please modify the following include file as per your VP-API library *
48 * requirement(s). *
49 ******************************************************************************/
50#include "vp_api_cfg.h"
51
52/******************************************************************************
53 * PLEASE DO NOT MODIFY BELOW THIS LINE *
54 ******************************************************************************/
55/* Include the main VP-API-Common file */
56#include "vp_api_common.h"
57
58/* Include the VP-API-Header file required for the CSLAC sequencer */
59#if defined (VP_CSLAC_SEQ_EN)
60#include "vp_api_cslac_seq.h"
61#endif
62
63/* Include the necessary files depending on the requirement of the project */
64#if defined (VP_CC_792_SERIES)
65#include "vp792_api.h" /* Vp792 device specific API functions and typedefs */
66#endif
67
68#if defined (VP_CC_880_SERIES)
69#include "vp880_api.h" /* Vp880 device specific API functions and typedefs */
70
71/*
72 * For 0823 LM, the FXO CID line is controlled by I/O3. For 0803 LM, it's
73 * controlled by I/O2. Control with I/O3 is better since I/O2 has more features
74 *
75 * #define VP880_FXO_CID_LINE VP880_IODATA_IO2 Use with 0803 ref
76 * #define VP880_FXO_CID_LINE VP880_IODATA_IO3 Use with 0823 ref
77 */
78#define VP880_FXO_CID_LINE VP880_IODATA_IO3
79#endif
80
81#if defined (VP_CC_890_SERIES)
82#include "vp890_api.h" /* Vp890 device specific API functions and typedefs */
83#endif
84
85#if defined (VP_CC_VCP_SERIES)
86#include "dvp_api.h" /* VCP device specific API functions and typedefs */
87#endif
88
89#if defined (VP_CC_VCP2_SERIES)
90#include "vcp2_api.h" /* VCP2 device specific API functions and typedefs */
91#endif
92
93#if defined (VP_CC_MELT_SERIES)
94#include "melt_api.h" /* VCP2-MeLT device specific API functions and typedefs */
95#endif
96
97#if defined (VP_CC_886_SERIES)
98#include "vp886_api.h" /* Vp886 device specific API functions and typedefs */
99#endif
100
101#if defined (VP_CC_MELT792_SERIES)
102#include "melt792_api.h" /* MeLT-792 device specific API functions and typedefs */
103#endif
104
105#if defined (VP_CC_KWRAP)
106#include "vp_kernel.h" /* KWRAP device specific API functions and typedefs */
107#endif
108
109/* Macros for calling a device-specific API function using the pointer in the
110 Device Context: */
111typedef void (*VpTempFuncPtrType) (void);
112
113#define VP_CALL_DEV_FUNC(func, args) \
114 (((pDevCtx->funPtrsToApiFuncs.func) == VP_NULL) ? VP_STATUS_FUNC_NOT_SUPPORTED : (pDevCtx->funPtrsToApiFuncs.func) args )
115
116/*
117 * Based on the existing structure of the include files the following def
118 * have been moved here.
119 */
120
121#if defined(VP_CC_880_SERIES) || defined(VP_CC_890_SERIES) || defined (VP_CC_886_SERIES)
122
123typedef union VpTestHeapType {
124 uint8 dummy; /* preventing an empty union */
125 #if defined(VP_CC_880_SERIES) && defined(VP880_INCLUDE_TESTLINE_CODE)
126 Vp880TestHeapType vpTestHeap880;
127 #define VP_TEST_HEAP_IS_REQUIRED
128 #endif
129
130 #if defined(VP_CC_890_SERIES) && defined(VP890_INCLUDE_TESTLINE_CODE)
131 Vp890TestHeapType vpTestHeap890;
132 #define VP_TEST_HEAP_IS_REQUIRED
133 #endif
134
135 #if defined(VP_CC_886_SERIES) && defined(VP886_INCLUDE_TESTLINE_CODE)
136 Vp886TestHeapType vpTestHeap886;
137 #define VP_TEST_HEAP_IS_REQUIRED
138 #endif
139} VpTestHeapType;
140#else
141typedef char VpTestHeapType;
142#endif
143
144#endif /* VP_API_H */
145
146
147
148