xref: /freebsd/sys/contrib/ncsw/inc/Peripherals/fm_vsp_ext.h (revision c2c014f24c10f90d85126ac5fbd4d8524de32b1c)
1*852ba100SJustin Hibbits /*
2*852ba100SJustin Hibbits  * Copyright 2008-2012 Freescale Semiconductor Inc.
3*852ba100SJustin Hibbits  *
4*852ba100SJustin Hibbits  * Redistribution and use in source and binary forms, with or without
5*852ba100SJustin Hibbits  * modification, are permitted provided that the following conditions are met:
6*852ba100SJustin Hibbits  *     * Redistributions of source code must retain the above copyright
7*852ba100SJustin Hibbits  *       notice, this list of conditions and the following disclaimer.
8*852ba100SJustin Hibbits  *     * Redistributions in binary form must reproduce the above copyright
9*852ba100SJustin Hibbits  *       notice, this list of conditions and the following disclaimer in the
10*852ba100SJustin Hibbits  *       documentation and/or other materials provided with the distribution.
11*852ba100SJustin Hibbits  *     * Neither the name of Freescale Semiconductor nor the
12*852ba100SJustin Hibbits  *       names of its contributors may be used to endorse or promote products
13*852ba100SJustin Hibbits  *       derived from this software without specific prior written permission.
14*852ba100SJustin Hibbits  *
15*852ba100SJustin Hibbits  *
16*852ba100SJustin Hibbits  * ALTERNATIVELY, this software may be distributed under the terms of the
17*852ba100SJustin Hibbits  * GNU General Public License ("GPL") as published by the Free Software
18*852ba100SJustin Hibbits  * Foundation, either version 2 of that License or (at your option) any
19*852ba100SJustin Hibbits  * later version.
20*852ba100SJustin Hibbits  *
21*852ba100SJustin Hibbits  * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
22*852ba100SJustin Hibbits  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23*852ba100SJustin Hibbits  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24*852ba100SJustin Hibbits  * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
25*852ba100SJustin Hibbits  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26*852ba100SJustin Hibbits  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27*852ba100SJustin Hibbits  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28*852ba100SJustin Hibbits  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*852ba100SJustin Hibbits  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30*852ba100SJustin Hibbits  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*852ba100SJustin Hibbits  */
32*852ba100SJustin Hibbits 
33*852ba100SJustin Hibbits 
34*852ba100SJustin Hibbits /**************************************************************************//**
35*852ba100SJustin Hibbits  @File          fm_vsp_ext.h
36*852ba100SJustin Hibbits 
37*852ba100SJustin Hibbits  @Description   FM Virtual Storage-Profile ...
38*852ba100SJustin Hibbits *//***************************************************************************/
39*852ba100SJustin Hibbits #ifndef __FM_VSP_EXT_H
40*852ba100SJustin Hibbits #define __FM_VSP_EXT_H
41*852ba100SJustin Hibbits 
42*852ba100SJustin Hibbits #include "std_ext.h"
43*852ba100SJustin Hibbits #include "error_ext.h"
44*852ba100SJustin Hibbits #include "string_ext.h"
45*852ba100SJustin Hibbits #include "debug_ext.h"
46*852ba100SJustin Hibbits 
47*852ba100SJustin Hibbits #include "fm_ext.h"
48*852ba100SJustin Hibbits 
49*852ba100SJustin Hibbits 
50*852ba100SJustin Hibbits /**************************************************************************//**
51*852ba100SJustin Hibbits 
52*852ba100SJustin Hibbits  @Group         FM_grp Frame Manager API
53*852ba100SJustin Hibbits 
54*852ba100SJustin Hibbits  @Description   FM API functions, definitions and enums
55*852ba100SJustin Hibbits 
56*852ba100SJustin Hibbits  @{
57*852ba100SJustin Hibbits *//***************************************************************************/
58*852ba100SJustin Hibbits 
59*852ba100SJustin Hibbits /**************************************************************************//**
60*852ba100SJustin Hibbits  @Group         FM_VSP_grp FM Virtual-Storage-Profile
61*852ba100SJustin Hibbits 
62*852ba100SJustin Hibbits  @Description   FM Virtual-Storage-Profile API
63*852ba100SJustin Hibbits 
64*852ba100SJustin Hibbits  @{
65*852ba100SJustin Hibbits *//***************************************************************************/
66*852ba100SJustin Hibbits 
67*852ba100SJustin Hibbits /**************************************************************************//**
68*852ba100SJustin Hibbits  @Group         FM_VSP_init_grp FM VSP Initialization Unit
69*852ba100SJustin Hibbits 
70*852ba100SJustin Hibbits  @Description   FM VSP initialization API.
71*852ba100SJustin Hibbits 
72*852ba100SJustin Hibbits  @{
73*852ba100SJustin Hibbits *//***************************************************************************/
74*852ba100SJustin Hibbits 
75*852ba100SJustin Hibbits /**************************************************************************//**
76*852ba100SJustin Hibbits  @Description   Virtual Storage Profile
77*852ba100SJustin Hibbits *//***************************************************************************/
78*852ba100SJustin Hibbits typedef struct t_FmVspParams {
79*852ba100SJustin Hibbits     t_Handle            h_Fm;               /**< A handle to the FM object this VSP related to */
80*852ba100SJustin Hibbits     t_FmExtPools        extBufPools;        /**< Which external buffer pools are used
81*852ba100SJustin Hibbits                                                  (up to FM_PORT_MAX_NUM_OF_EXT_POOLS), and their sizes.
82*852ba100SJustin Hibbits                                                  parameter associated with Rx / OP port */
83*852ba100SJustin Hibbits     uint16_t            liodnOffset;        /**< VSP's LIODN offset */
84*852ba100SJustin Hibbits     struct {
85*852ba100SJustin Hibbits         e_FmPortType    portType;           /**< Port type */
86*852ba100SJustin Hibbits         uint8_t         portId;             /**< Port Id - relative to type */
87*852ba100SJustin Hibbits     } portParams;
88*852ba100SJustin Hibbits     uint8_t             relativeProfileId;  /**< VSP Id - relative to VSP's range
89*852ba100SJustin Hibbits                                                  defined in relevant FM object */
90*852ba100SJustin Hibbits } t_FmVspParams;
91*852ba100SJustin Hibbits 
92*852ba100SJustin Hibbits 
93*852ba100SJustin Hibbits /**************************************************************************//**
94*852ba100SJustin Hibbits  @Function      FM_VSP_Config
95*852ba100SJustin Hibbits 
96*852ba100SJustin Hibbits  @Description   Creates descriptor for the FM VSP module.
97*852ba100SJustin Hibbits 
98*852ba100SJustin Hibbits                 The routine returns a handle (descriptor) to the FM VSP object.
99*852ba100SJustin Hibbits                 This descriptor must be passed as first parameter to all other
100*852ba100SJustin Hibbits                 FM VSP function calls.
101*852ba100SJustin Hibbits 
102*852ba100SJustin Hibbits                 No actual initialization or configuration of FM hardware is
103*852ba100SJustin Hibbits                 done by this routine.
104*852ba100SJustin Hibbits 
105*852ba100SJustin Hibbits @Param[in]      p_FmVspParams   Pointer to data structure of parameters
106*852ba100SJustin Hibbits 
107*852ba100SJustin Hibbits  @Retval        Handle to FM VSP object, or NULL for Failure.
108*852ba100SJustin Hibbits *//***************************************************************************/
109*852ba100SJustin Hibbits t_Handle FM_VSP_Config(t_FmVspParams *p_FmVspParams);
110*852ba100SJustin Hibbits 
111*852ba100SJustin Hibbits /**************************************************************************//**
112*852ba100SJustin Hibbits  @Function      FM_VSP_Init
113*852ba100SJustin Hibbits 
114*852ba100SJustin Hibbits  @Description   Initializes the FM VSP module
115*852ba100SJustin Hibbits 
116*852ba100SJustin Hibbits  @Param[in]     h_FmVsp - FM VSP module descriptor
117*852ba100SJustin Hibbits 
118*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
119*852ba100SJustin Hibbits *//***************************************************************************/
120*852ba100SJustin Hibbits t_Error FM_VSP_Init(t_Handle h_FmVsp);
121*852ba100SJustin Hibbits 
122*852ba100SJustin Hibbits /**************************************************************************//**
123*852ba100SJustin Hibbits  @Function      FM_VSP_Free
124*852ba100SJustin Hibbits 
125*852ba100SJustin Hibbits  @Description   Frees all resources that were assigned to FM VSP module.
126*852ba100SJustin Hibbits 
127*852ba100SJustin Hibbits                 Calling this routine invalidates the descriptor.
128*852ba100SJustin Hibbits 
129*852ba100SJustin Hibbits  @Param[in]     h_FmVsp - FM VSP module descriptor
130*852ba100SJustin Hibbits 
131*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
132*852ba100SJustin Hibbits *//***************************************************************************/
133*852ba100SJustin Hibbits t_Error FM_VSP_Free(t_Handle h_FmVsp);
134*852ba100SJustin Hibbits 
135*852ba100SJustin Hibbits 
136*852ba100SJustin Hibbits /**************************************************************************//**
137*852ba100SJustin Hibbits  @Group         FM_VSP_adv_config_grp  FM VSP Advanced Configuration Unit
138*852ba100SJustin Hibbits 
139*852ba100SJustin Hibbits  @Description   FM VSP advanced configuration functions.
140*852ba100SJustin Hibbits 
141*852ba100SJustin Hibbits  @{
142*852ba100SJustin Hibbits *//***************************************************************************/
143*852ba100SJustin Hibbits 
144*852ba100SJustin Hibbits /**************************************************************************//**
145*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigBufferPrefixContent
146*852ba100SJustin Hibbits 
147*852ba100SJustin Hibbits  @Description   Defines the structure, size and content of the application buffer.
148*852ba100SJustin Hibbits 
149*852ba100SJustin Hibbits                 The prefix will
150*852ba100SJustin Hibbits                 In VSPs defined for Tx ports, if 'passPrsResult', the application
151*852ba100SJustin Hibbits                 should set a value to their offsets in the prefix of
152*852ba100SJustin Hibbits                 the FM will save the first 'privDataSize', than,
153*852ba100SJustin Hibbits                 depending on 'passPrsResult' and 'passTimeStamp', copy parse result
154*852ba100SJustin Hibbits                 and timeStamp, and the packet itself (in this order), to the
155*852ba100SJustin Hibbits                 application buffer, and to offset.
156*852ba100SJustin Hibbits 
157*852ba100SJustin Hibbits                 Calling this routine changes the buffer margins definitions
158*852ba100SJustin Hibbits                 in the internal driver data base from its default
159*852ba100SJustin Hibbits                 configuration: Data size:  [DEFAULT_FM_SP_bufferPrefixContent_privDataSize]
160*852ba100SJustin Hibbits                                Pass Parser result: [DEFAULT_FM_SP_bufferPrefixContent_passPrsResult].
161*852ba100SJustin Hibbits                                Pass timestamp: [DEFAULT_FM_SP_bufferPrefixContent_passTimeStamp].
162*852ba100SJustin Hibbits 
163*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                         A handle to a FM VSP module.
164*852ba100SJustin Hibbits  @Param[in,out] p_FmBufferPrefixContent         A structure of parameters describing the
165*852ba100SJustin Hibbits                                                 structure of the buffer.
166*852ba100SJustin Hibbits                                                 Out parameter: Start margin - offset
167*852ba100SJustin Hibbits                                                 of data from start of external buffer.
168*852ba100SJustin Hibbits 
169*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
170*852ba100SJustin Hibbits 
171*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
172*852ba100SJustin Hibbits *//***************************************************************************/
173*852ba100SJustin Hibbits t_Error FM_VSP_ConfigBufferPrefixContent(t_Handle                   h_FmVsp,
174*852ba100SJustin Hibbits                                          t_FmBufferPrefixContent    *p_FmBufferPrefixContent);
175*852ba100SJustin Hibbits 
176*852ba100SJustin Hibbits /**************************************************************************//**
177*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigDmaSwapData
178*852ba100SJustin Hibbits 
179*852ba100SJustin Hibbits  @Description   Calling this routine changes the DMA swap data parameter
180*852ba100SJustin Hibbits                 in the internal driver data base from its default
181*852ba100SJustin Hibbits                 configuration  [DEFAULT_FM_SP_dmaSwapData]
182*852ba100SJustin Hibbits 
183*852ba100SJustin Hibbits  @Param[in]     h_FmVsp     A handle to a FM VSP module.
184*852ba100SJustin Hibbits  @Param[in]     swapData    New selection
185*852ba100SJustin Hibbits 
186*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
187*852ba100SJustin Hibbits 
188*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
189*852ba100SJustin Hibbits *//***************************************************************************/
190*852ba100SJustin Hibbits t_Error FM_VSP_ConfigDmaSwapData(t_Handle h_FmVsp, e_FmDmaSwapOption swapData);
191*852ba100SJustin Hibbits 
192*852ba100SJustin Hibbits /**************************************************************************//**
193*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigDmaIcCacheAttr
194*852ba100SJustin Hibbits 
195*852ba100SJustin Hibbits  @Description   Calling this routine changes the internal context cache
196*852ba100SJustin Hibbits                 attribute parameter in the internal driver data base
197*852ba100SJustin Hibbits                 from its default configuration  [DEFAULT_FM_SP_dmaIntContextCacheAttr]
198*852ba100SJustin Hibbits 
199*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                 A handle to a FM VSP module.
200*852ba100SJustin Hibbits  @Param[in]     intContextCacheAttr     New selection
201*852ba100SJustin Hibbits 
202*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
203*852ba100SJustin Hibbits 
204*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
205*852ba100SJustin Hibbits *//***************************************************************************/
206*852ba100SJustin Hibbits t_Error FM_VSP_ConfigDmaIcCacheAttr(t_Handle            h_FmVsp,
207*852ba100SJustin Hibbits                                     e_FmDmaCacheOption  intContextCacheAttr);
208*852ba100SJustin Hibbits 
209*852ba100SJustin Hibbits /**************************************************************************//**
210*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigDmaHdrAttr
211*852ba100SJustin Hibbits 
212*852ba100SJustin Hibbits  @Description   Calling this routine changes the header cache
213*852ba100SJustin Hibbits                 attribute parameter in the internal driver data base
214*852ba100SJustin Hibbits                 from its default configuration  [DEFAULT_FM_SP_dmaHeaderCacheAttr]
215*852ba100SJustin Hibbits 
216*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                     A handle to a FM VSP module.
217*852ba100SJustin Hibbits  @Param[in]     headerCacheAttr             New selection
218*852ba100SJustin Hibbits 
219*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
220*852ba100SJustin Hibbits 
221*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
222*852ba100SJustin Hibbits *//***************************************************************************/
223*852ba100SJustin Hibbits t_Error FM_VSP_ConfigDmaHdrAttr(t_Handle h_FmVsp, e_FmDmaCacheOption headerCacheAttr);
224*852ba100SJustin Hibbits 
225*852ba100SJustin Hibbits /**************************************************************************//**
226*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigDmaScatterGatherAttr
227*852ba100SJustin Hibbits 
228*852ba100SJustin Hibbits  @Description   Calling this routine changes the scatter gather cache
229*852ba100SJustin Hibbits                 attribute parameter in the internal driver data base
230*852ba100SJustin Hibbits                 from its default configuration [DEFAULT_FM_SP_dmaScatterGatherCacheAttr]
231*852ba100SJustin Hibbits 
232*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                     A handle to a FM VSP module.
233*852ba100SJustin Hibbits  @Param[in]     scatterGatherCacheAttr      New selection
234*852ba100SJustin Hibbits 
235*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
236*852ba100SJustin Hibbits 
237*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
238*852ba100SJustin Hibbits *//***************************************************************************/
239*852ba100SJustin Hibbits t_Error FM_VSP_ConfigDmaScatterGatherAttr(t_Handle              h_FmVsp,
240*852ba100SJustin Hibbits                                           e_FmDmaCacheOption    scatterGatherCacheAttr);
241*852ba100SJustin Hibbits 
242*852ba100SJustin Hibbits /**************************************************************************//**
243*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigDmaWriteOptimize
244*852ba100SJustin Hibbits 
245*852ba100SJustin Hibbits  @Description   Calling this routine changes the write optimization
246*852ba100SJustin Hibbits                 parameter in the internal driver data base
247*852ba100SJustin Hibbits                 from its default configuration: optimize = [DEFAULT_FM_SP_dmaWriteOptimize]
248*852ba100SJustin Hibbits 
249*852ba100SJustin Hibbits  @Param[in]     h_FmVsp     A handle to a FM VSP module.
250*852ba100SJustin Hibbits  @Param[in]     optimize    TRUE to enable optimization, FALSE for normal operation
251*852ba100SJustin Hibbits 
252*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
253*852ba100SJustin Hibbits 
254*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
255*852ba100SJustin Hibbits *//***************************************************************************/
256*852ba100SJustin Hibbits t_Error FM_VSP_ConfigDmaWriteOptimize(t_Handle h_FmVsp, bool optimize);
257*852ba100SJustin Hibbits 
258*852ba100SJustin Hibbits /**************************************************************************//**
259*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigNoScatherGather
260*852ba100SJustin Hibbits 
261*852ba100SJustin Hibbits  @Description   Calling this routine changes the possibility to receive S/G frame
262*852ba100SJustin Hibbits                 in the internal driver data base
263*852ba100SJustin Hibbits                 from its default configuration: optimize = [DEFAULT_FM_SP_noScatherGather]
264*852ba100SJustin Hibbits 
265*852ba100SJustin Hibbits  @Param[in]     h_FmVsp             A handle to a FM VSP module.
266*852ba100SJustin Hibbits  @Param[in]     noScatherGather     TRUE to operate without scatter/gather capability.
267*852ba100SJustin Hibbits 
268*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
269*852ba100SJustin Hibbits 
270*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
271*852ba100SJustin Hibbits *//***************************************************************************/
272*852ba100SJustin Hibbits t_Error FM_VSP_ConfigNoScatherGather(t_Handle h_FmVsp, bool noScatherGather);
273*852ba100SJustin Hibbits 
274*852ba100SJustin Hibbits /**************************************************************************//**
275*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigPoolDepletion
276*852ba100SJustin Hibbits 
277*852ba100SJustin Hibbits  @Description   Calling this routine enables pause frame generation depending on the
278*852ba100SJustin Hibbits                 depletion status of BM pools. It also defines the conditions to activate
279*852ba100SJustin Hibbits                 this functionality. By default, this functionality is disabled.
280*852ba100SJustin Hibbits 
281*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                 A handle to a FM VSP module.
282*852ba100SJustin Hibbits  @Param[in]     p_BufPoolDepletion      A structure of pool depletion parameters
283*852ba100SJustin Hibbits 
284*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
285*852ba100SJustin Hibbits 
286*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
287*852ba100SJustin Hibbits *//***************************************************************************/
288*852ba100SJustin Hibbits t_Error FM_VSP_ConfigPoolDepletion(t_Handle h_FmVsp, t_FmBufPoolDepletion *p_BufPoolDepletion);
289*852ba100SJustin Hibbits 
290*852ba100SJustin Hibbits /**************************************************************************//**
291*852ba100SJustin Hibbits  @Function      FM_VSP_ConfigBackupPools
292*852ba100SJustin Hibbits 
293*852ba100SJustin Hibbits  @Description   Calling this routine allows the configuration of some of the BM pools
294*852ba100SJustin Hibbits                 defined for this port as backup pools.
295*852ba100SJustin Hibbits                 A pool configured to be a backup pool will be used only if all other
296*852ba100SJustin Hibbits                 enabled non-backup pools are depleted.
297*852ba100SJustin Hibbits 
298*852ba100SJustin Hibbits  @Param[in]     h_FmVsp                 A handle to a FM VSP module.
299*852ba100SJustin Hibbits  @Param[in]     p_BackupBmPools         An array of pool id's. All pools specified here will
300*852ba100SJustin Hibbits                                         be defined as backup pools.
301*852ba100SJustin Hibbits 
302*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
303*852ba100SJustin Hibbits 
304*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Config() and before FM_VSP_Init().
305*852ba100SJustin Hibbits *//***************************************************************************/
306*852ba100SJustin Hibbits t_Error FM_VSP_ConfigBackupPools(t_Handle h_FmVsp, t_FmBackupBmPools *p_BackupBmPools);
307*852ba100SJustin Hibbits 
308*852ba100SJustin Hibbits /** @} */ /* end of FM_VSP_adv_config_grp group */
309*852ba100SJustin Hibbits /** @} */ /* end of FM_VSP_init_grp group */
310*852ba100SJustin Hibbits 
311*852ba100SJustin Hibbits 
312*852ba100SJustin Hibbits /**************************************************************************//**
313*852ba100SJustin Hibbits  @Group         FM_VSP_control_grp FM VSP Control Unit
314*852ba100SJustin Hibbits 
315*852ba100SJustin Hibbits  @Description   FM VSP runtime control API.
316*852ba100SJustin Hibbits 
317*852ba100SJustin Hibbits  @{
318*852ba100SJustin Hibbits *//***************************************************************************/
319*852ba100SJustin Hibbits 
320*852ba100SJustin Hibbits /**************************************************************************//**
321*852ba100SJustin Hibbits  @Function      FM_VSP_GetBufferDataOffset
322*852ba100SJustin Hibbits 
323*852ba100SJustin Hibbits  @Description   Relevant for Rx ports.
324*852ba100SJustin Hibbits                 Returns the data offset from the beginning of the data buffer
325*852ba100SJustin Hibbits 
326*852ba100SJustin Hibbits  @Param[in]     h_FmVsp - FM PORT module descriptor
327*852ba100SJustin Hibbits 
328*852ba100SJustin Hibbits  @Return        data offset.
329*852ba100SJustin Hibbits 
330*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Init().
331*852ba100SJustin Hibbits *//***************************************************************************/
332*852ba100SJustin Hibbits uint32_t FM_VSP_GetBufferDataOffset(t_Handle h_FmVsp);
333*852ba100SJustin Hibbits 
334*852ba100SJustin Hibbits /**************************************************************************//**
335*852ba100SJustin Hibbits  @Function      FM_VSP_GetBufferICInfo
336*852ba100SJustin Hibbits 
337*852ba100SJustin Hibbits  @Description   Returns the Internal Context offset from the beginning of the data buffer
338*852ba100SJustin Hibbits 
339*852ba100SJustin Hibbits  @Param[in]     h_FmVsp - FM PORT module descriptor
340*852ba100SJustin Hibbits  @Param[in]     p_Data   - A pointer to the data buffer.
341*852ba100SJustin Hibbits 
342*852ba100SJustin Hibbits  @Return        Internal context info pointer on success, NULL if 'allOtherInfo' was not
343*852ba100SJustin Hibbits                 configured for this port.
344*852ba100SJustin Hibbits 
345*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Init().
346*852ba100SJustin Hibbits *//***************************************************************************/
347*852ba100SJustin Hibbits uint8_t * FM_VSP_GetBufferICInfo(t_Handle h_FmVsp, char *p_Data);
348*852ba100SJustin Hibbits 
349*852ba100SJustin Hibbits /**************************************************************************//**
350*852ba100SJustin Hibbits  @Function      FM_VSP_GetBufferPrsResult
351*852ba100SJustin Hibbits 
352*852ba100SJustin Hibbits  @Description   Returns the pointer to the parse result in the data buffer.
353*852ba100SJustin Hibbits                 In Rx ports this is relevant after reception, if parse
354*852ba100SJustin Hibbits                 result is configured to be part of the data passed to the
355*852ba100SJustin Hibbits                 application. For non Rx ports it may be used to get the pointer
356*852ba100SJustin Hibbits                 of the area in the buffer where parse result should be
357*852ba100SJustin Hibbits                 initialized - if so configured.
358*852ba100SJustin Hibbits                 See FM_VSP_ConfigBufferPrefixContent for data buffer prefix
359*852ba100SJustin Hibbits                 configuration.
360*852ba100SJustin Hibbits 
361*852ba100SJustin Hibbits  @Param[in]     h_FmVsp    - FM PORT module descriptor
362*852ba100SJustin Hibbits  @Param[in]     p_Data      - A pointer to the data buffer.
363*852ba100SJustin Hibbits 
364*852ba100SJustin Hibbits  @Return        Parse result pointer on success, NULL if parse result was not
365*852ba100SJustin Hibbits                 configured for this port.
366*852ba100SJustin Hibbits 
367*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Init().
368*852ba100SJustin Hibbits *//***************************************************************************/
369*852ba100SJustin Hibbits t_FmPrsResult * FM_VSP_GetBufferPrsResult(t_Handle h_FmVsp, char *p_Data);
370*852ba100SJustin Hibbits 
371*852ba100SJustin Hibbits /**************************************************************************//**
372*852ba100SJustin Hibbits  @Function      FM_VSP_GetBufferTimeStamp
373*852ba100SJustin Hibbits 
374*852ba100SJustin Hibbits  @Description   Returns the time stamp in the data buffer.
375*852ba100SJustin Hibbits                 Relevant for Rx ports for getting the buffer time stamp.
376*852ba100SJustin Hibbits                 See FM_VSP_ConfigBufferPrefixContent for data buffer prefix
377*852ba100SJustin Hibbits                 configuration.
378*852ba100SJustin Hibbits 
379*852ba100SJustin Hibbits  @Param[in]     h_FmVsp    - FM PORT module descriptor
380*852ba100SJustin Hibbits  @Param[in]     p_Data      - A pointer to the data buffer.
381*852ba100SJustin Hibbits 
382*852ba100SJustin Hibbits  @Return        A pointer to the hash result on success, NULL otherwise.
383*852ba100SJustin Hibbits 
384*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Init().
385*852ba100SJustin Hibbits *//***************************************************************************/
386*852ba100SJustin Hibbits uint64_t * FM_VSP_GetBufferTimeStamp(t_Handle h_FmVsp, char *p_Data);
387*852ba100SJustin Hibbits 
388*852ba100SJustin Hibbits /**************************************************************************//**
389*852ba100SJustin Hibbits  @Function      FM_VSP_GetBufferHashResult
390*852ba100SJustin Hibbits 
391*852ba100SJustin Hibbits  @Description   Given a data buffer, on the condition that hash result was defined
392*852ba100SJustin Hibbits                 as a part of the buffer content (see FM_VSP_ConfigBufferPrefixContent)
393*852ba100SJustin Hibbits                 this routine will return the pointer to the hash result location in the
394*852ba100SJustin Hibbits                 buffer prefix.
395*852ba100SJustin Hibbits 
396*852ba100SJustin Hibbits  @Param[in]     h_FmVsp    - FM PORT module descriptor
397*852ba100SJustin Hibbits  @Param[in]     p_Data      - A pointer to the data buffer.
398*852ba100SJustin Hibbits 
399*852ba100SJustin Hibbits  @Return        A pointer to the hash result on success, NULL otherwise.
400*852ba100SJustin Hibbits 
401*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_VSP_Init().
402*852ba100SJustin Hibbits *//***************************************************************************/
403*852ba100SJustin Hibbits uint8_t * FM_VSP_GetBufferHashResult(t_Handle h_FmVsp, char *p_Data);
404*852ba100SJustin Hibbits 
405*852ba100SJustin Hibbits 
406*852ba100SJustin Hibbits /** @} */ /* end of FM_VSP_control_grp group */
407*852ba100SJustin Hibbits /** @} */ /* end of FM_VSP_grp group */
408*852ba100SJustin Hibbits /** @} */ /* end of FM_grp group */
409*852ba100SJustin Hibbits 
410*852ba100SJustin Hibbits 
411*852ba100SJustin Hibbits #endif /* __FM_VSP_EXT_H */
412