VCP2 Functions
[VCP2]


Functions

VCP2Handle VCP2_init (VCP2Obj *pVcp2Obj, int instNum, int *pStatus)
CSL_Status VCP2_Close (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_ceil (Uint32 val, Uint32 pwr2)
CSL_IDEF_INLINE Uint32 VCP2_normalCeil (Uint32 val1, Uint32 val2)
CSL_IDEF_INLINE void VCP2_getPeripheralID (VCP2Handle hVcp2, VCP2_PID *hPid)
CSL_IDEF_INLINE Uint32 VCP2_getBmEndian (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_getIcConfig (VCP2Handle hVcp2, VCP2_ConfigIc *configIc)
CSL_IDEF_INLINE Uint32 VCP2_getNumInFifo (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_getNumOutFifo (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_getSdEndian (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint8 VCP2_getStateIndex (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint8 VCP2_getYamBit (VCP2Handle hVcp2)
CSL_IDEF_INLINE Int16 VCP2_getMaxSm (VCP2Handle hVcp2)
CSL_IDEF_INLINE Int16 VCP2_getMinSm (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_icConfig (VCP2Handle hVcp2, VCP2_ConfigIc *vcpConfigIc)
CSL_IDEF_INLINE void VCP2_icConfigArgs (VCP2Handle hVcp2, Uint32 ic0, Uint32 ic1, Uint32 ic2, Uint32 ic3, Uint32 ic4, Uint32 ic5)
CSL_IDEF_INLINE void VCP2_setBmEndian (VCP2Handle hVcp2, Uint32 bmEnd)
CSL_IDEF_INLINE void VCP2_setNativeEndian (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_setPacked32Endian (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_setSdEndian (VCP2Handle hVcp2, Uint32 sdEnd)
CSL_IDEF_INLINE void VCP2_addPoly (VCP2_Poly *poly, VCP2_Params *params)
CSL_IDEF_INLINE Bool VCP2_statError (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statInFifo (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statOutFifo (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statPause (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statRun (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statSymProc (VCP2Handle hVcp2)
CSL_IDEF_INLINE Uint32 VCP2_statWaitIc (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_start (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_pause (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_unpause (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_stepTraceback (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_reset (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_getErrors (VCP2Handle hVcp2, VCP2_Errors *pVcpErr)
CSL_IDEF_INLINE Uint32 VCP2_statEmuHalt (VCP2Handle hVcp2)
CSL_IDEF_INLINE void VCP2_emuDisable (VCP2Handle hVcp2)

Function Documentation

CSL_IDEF_INLINE void VCP2_addPoly ( VCP2_Poly poly,
VCP2_Params params 
)

============================================================================
VCP2_addPoly

Description
This function is used to add either predefined or user defined Polynomials to the generated VCP2_Params.

Arguments

        pPoly           Pointer to the structure of type VCP2_Poly containing
                        the values of generator polynomials.
        pParams         Pointer to the structure of type VCP2_Params containing
                        the generated values for input configuration registers.
    

Return Value
None.

Pre Condition
None.

Post Condition
Writes the pParams structure passed as input with the result.

Writes
None

Example

        VCP2_Poly        poly = {VCP2_GEN_POLY_3, VCP2_GEN_POLY_1,
                                    VCP2_GEN_POLY_2, VCP2_GEN_POLY_3};
        VCP2_Params      params;
        VCP2_Baseparams  baseParams;
        
        ...

        VCP2_genParams (&baseParams, &params);
        VCP2_addPoly (&poly, &params);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_ceil ( Uint32  val,
Uint32  pwr2 
)

============================================================================
VCP2_ceil

Description
This function calculates the ceiling for a given value and a power of 2. The arguments follow the formula: ceilVal * 2^pwr2 = ceiling+ (val, pwr2).

Arguments

        val         Value to be augmented.
        pwr2        The power of two by which val must be divisible.
    

Return Value Uint32
Value The smallest number which when multiplied by 2^pwr2 is greater than val.

Pre Condition
None.

Post Condition
None.

Writes
None.

Example

        Uint32  numSysPar;
        numSysPar = VCP2_ceil ((frameLen * rate), 4);
    
============================================================================

CSL_Status VCP2_Close ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_Close

Description
Unreserves the VCP2 identified by the handle passed.

Arguments

        hVcp2           VCP2 handle returned by successful VCP2_init
     

Return Value CSL_Status

Pre Condition
VCP2_init must be called successfully before VCP2_Close can be called.

Post Condition
The VCP2 CSL APIs can not be called until the VCP2 CSL is reopened again using VCP2_init

Writes
None

Example

            VCP2Handle     hVcp2;
            ...
            VCP2_Close(hVcp2);
    
=============================================================================

CSL_IDEF_INLINE void VCP2_emuDisable ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_emuDisable

Description
This function disables the emulation/debug mode of VCP.

Arguments

        hVcp2       Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
VCP emulation control register is modified.

Writes
VCP2_VCPEMU_FREE=1

Example

        VCP2_emuDisable (hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_getBmEndian ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getBmEndian

Description
This function returns the value programmed into the VCPEND register for the branch metrics data for Big Endian mode indicating whether the data is in its native 8-bit format ('1') or 32-bit word packed ('0').

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Uint32
Value Branch metric memory format.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPEND_BM

Example

        If (VCP2_getBmEndian (hVcp2)) 
        {
            ...
        } // end if //
    
============================================================================

CSL_IDEF_INLINE void VCP2_getErrors ( VCP2Handle  hVcp2,
VCP2_Errors pVcpErr 
)

============================================================================
VCP2_getErrors

Description
This function will acquire the VCPERR register values and fill in the fields of VCP2_Error structure and pass it back as the results.

Arguments

    		hVcp2       Handle to VCP2 instance.
            pVcpErr     Pointer to the VCP2_Errors structure instance.

    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The fields of the VCP2_Errors structure indicate the respective errors if occurred. Writes VCPSTAT0 register, as a side effect. Clears ERR bit.

Reads
VCP2_VCPERR_TBNAERR, VCP2_VCPERR_FTLERR, VCP2_VCPERR_FCTLERR, VCP2_VCPERR_MAXMINERR, VCP2_VCPERR_E_SYMX, VCP2_VCPERR_E_SYMR

Affects
VCP2_VCPSTAT0_ERR=0

Example

        VCP2_Errors error;
        
        // check whether an error has occurred
        if (VCP2_statError (hVcp2)) 
        {
            VCP2_getErrors (hVcp2, &error);
        } // end if
    
============================================================================

CSL_IDEF_INLINE void VCP2_getIcConfig ( VCP2Handle  hVcp2,
VCP2_ConfigIc configIc 
)

============================================================================
VCP2_getIcConfig

Description
This function gets the current VCPIC register values and puts them in a structure of type VCP2_ConfigIc.

Arguments

        hVcp2           Handle to VCP2 instance.
        pConfigIc       Pointer to the structure of type VCP2_ConfigIc to hold
                        the values of VCPIC registers.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The structure of type VCP2_ConfigIc passed as arguement contains the values of the VCP configuration registers.

Reads
VCP2_VCPIC0, VCP2_VCPIC1, VCP2_VCPIC2, VCP2_VCPIC3, VCP2_VCPIC4, VCP2_VCPIC5

Example

            VCP2_ConfigIc    configIc;

            ...
            VCP2_getIcConfig (hVcp2, &configIc);

    
============================================================================

CSL_IDEF_INLINE Int16 VCP2_getMaxSm ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getMaxSm

Description
This function returns the final maximum state metric after the VCP has completed its decoding.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPOUT0_FMAXS

Example

        Int16   maxSm

        maxSm = VCP2_getMaxSm(hVcp2);
    
============================================================================

CSL_IDEF_INLINE Int16 VCP2_getMinSm ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getMinSm

Description
This function returns the final minimum state metric after the VCP has completed its decoding.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPOUT0_FMINS

Example

        Int16   minSm

        minSm = VCP2_getMinSm(hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_getNumInFifo ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getNumInFifo

Description
This function returns the count, number of symbols currently in the input FIFO.

Arguments

        hVcp2          Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPSTAT1_NSYMIF

Example

        Uint32 numSym;
        numSym = VCP2_getNumInFifo (hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_getNumOutFifo ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getNumOutFifo

Description
This function returns the count, number of symbols currently in the output FIFO.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPSTAT1_NSYMOF

Example

        Uint32  numSym;
        numSym = VCP2_getNumOutFifo (hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_getPeripheralID ( VCP2Handle  hVcp2,
VCP2_PID hPid 
)

============================================================================
VCP2_getPeripheralID

Description
This function returns the value programmed into the VCPPID register.

Arguments

        hVcp2           Handle to VCP2 instance.
        hPid            Handle to the PID structure that needs to
                        be populated with PID info retrieved. 
    

Return Value None

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition None

Reads
VCP2_VCPPID_TYPE, VCP2_VCPPID_CLASS, VCP2_VCPPID_REV

Example

        VCP2Handle      hVcp2;
        VCP2Obj         vcp2Obj;
        VCP2_PID        vcp2Pid;
                   
        ...
        
        hVcp2 = VCP2_init(&vcp2Obj, 0, &status);    
        
        ...
        
        VCP2_getPeripheralID (hVcp2, &vcp2Pid);            
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_getSdEndian ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getSdEndian

Description
This function returns the value programmed into the VCPEND register for the soft decision data for Big Endian mode indicating whether the data is in its native 8-bit format ('1') or 32-bit word packed ('0').

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPEND_SD

Example

        If (VCP2_getSdEndian (hVcp2)) 
        {
            ...
        } // end if
    
============================================================================

CSL_IDEF_INLINE Uint8 VCP2_getStateIndex ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getStateIndex

Description
This function returns an index for the final maximum state metric.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPOUT1_FMAXI

Example

        Uint8   index

        index = VCP2_getStateIndex(hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint8 VCP2_getYamBit ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_getYamBit

Description
This function returns the value of the Yamamoto bit after the VCP decoding.

Arguments

        hVcp2       Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The return bit value indicates,

Reads
VCP2_VCPOUT1_YAM

Example

        Uint8   yamBit

        yamBit = VCP2_getYamBit(hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_icConfig ( VCP2Handle  hVcp2,
VCP2_ConfigIc vcpConfigIc 
)

============================================================================
VCP2_icConfig

Description
This function programs the VCP input configuration registers with the values provided through the VCP2_ConfigIc structure.

Arguments

        hVcp2           Handle to VCP2 instance.
        pVcpConfigIc    Pointer to VCP2_ConfigIc structure instance
                        containing the input configuration register values.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
VCP input configuration registers are configured appropriately.

Writes
VCP2_VCPIC0, VCP2_VCPIC1, VCP2_VCPIC2, VCP2_VCPIC3, VCP2_VCPIC4, VCP2_VCPIC5

Example

        VCP2_ConfigIc    configIc;
        configIc.ic0  =  0xf0b07050;
        configIc.ic1  =  0x10320000;
        configIc.ic2  =  0x000007fa;
        configIc.ic3  =  0x00000054;
        configIc.ic4  =  0x00800800;
        configIc.ic5  =  0x51f3000c;
        ...
        VCP2_icConfig (hVcp2, &configIc);
    
============================================================================

CSL_IDEF_INLINE void VCP2_icConfigArgs ( VCP2Handle  hVcp2,
Uint32  ic0,
Uint32  ic1,
Uint32  ic2,
Uint32  ic3,
Uint32  ic4,
Uint32  ic5 
)

============================================================================
VCP2_icConfigArgs

Description
This function programs the VCP input configuration registers with the given values.

Arguments

        hVcp2       Handle to VCP2 instance.
        ic0         Value to program input configuration register 0.
        ic1         Value to program input configuration register 1.
        ic2         Value to program input configuration register 2.
        ic3         Value to program input configuration register 3.
        ic4         Value to program input configuration register 4.
        ic5         Value to program input configuration register 5.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Writes
VCP2_VCPIC0, VCP2_VCPIC1, VCP2_VCPIC2, VCP2_VCPIC3, VCP2_VCPIC4, VCP2_VCPIC5

Example

        Uint32 ic0, ic1, ic2, ic3, ic4, ic5;
        ...
        ic0  =  0xf0b07050;
        ic1  =  0x10320000;
        ic2  =  0x000007fa;
        ic3  =  0x00000054;
        ic4  =  0x00800800;
        ic5  =  0x51f3000c;
        ...
        VCP2_icConfigArgs (hVcp2, ic0, ic1, ic2, ic3, ic4, ic5);
    
============================================================================

VCP2Handle VCP2_init ( VCP2Obj pVcp2Obj,
int  instNum,
int *  pStatus 
)

============================================================================
VCP2_init

Description
Reserves the specified VCP2 for use. The device can be re-opened anytime after it has been normally closed, if so required. The VCP2 handle returned by this call is input as an essential argument for the rest of the APIs in VCP2 module.

Arguments

        vcp2Obj        Vcp2 Module Object pointer
        instNum        VCP2 instance number.
        status         Status of the function call
    

Return Value
VCP2Handle Valid Vcp2 handle will be returned if status value is equal to CSL_SOK.

Pre Condition
None

Post Condition
1. The status is returned in the status variable. If status returned is

2. Vcp2 object structure is populated

Writes
None

Example

            VCP2Handle     hVcp2;
            VCP2Obj        vcp2Obj;
            int            status;
            ...
            hVcp2 = VCP2_init(&vcp2Obj, CSL_VCP2_0, &status);
     
===========================================================================

CSL_IDEF_INLINE Uint32 VCP2_normalCeil ( Uint32  val1,
Uint32  val2 
)

============================================================================
VCP2_normalCeil

Description
Returns the value rounded to the nearest integer greater than or equal to (val1/val2)

Arguments

        val1        Value to be augmented.
        val2        Value by which val1 must be divisible.
    

Return Value Uint32

Pre Condition
None.

Post Condition
None.

Writes
None.

Example

        Uint32 framelen = 51200;
        Uint32  numSubFrame;

        ...

        // to calculate the number of sub frames for SP mode
        numSubFrame = VCP2_normalCeil (framelen, VCP2_SUB_FRAME_SIZE_MAX);
    
============================================================================

CSL_IDEF_INLINE void VCP2_pause ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_pause

Description
This function pauses the VCP by writing a pause command to the VCPEXE register.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.The VCP should be operating in debug/emulation mode.

Post Condition
VCP is paused.

Writes
VCP2_VCPEXE_COMMAND=2

Affects
VCP2_VCPSTAT0_PAUSE=1

Example

        VCP2_pause (hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_reset ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_reset

Description
This function sets all the VCP control registers to their default values.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
All registers in the VCP are reset except for the execution register, endian register, emulation register and other internal registers.

Writes
VCP2_VCPEXE_COMMAND=5

Example

           VCP2_reset (hVcp2);

    
============================================================================

CSL_IDEF_INLINE void VCP2_setBmEndian ( VCP2Handle  hVcp2,
Uint32  bmEnd 
)

============================================================================
VCP2_setBmEndian

Description
This function programs the VCP to view the format of the branch metrics data as either native 8-bit format ('1') or values packed into 32-bit words in little endian format ('0').

Arguments

        hVcp2           Handle to VCP2 instance.
        bmEnd           '1' for native 8-bit format and '0' for 32-bit word packed
                        format
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Writes
VCP2_VCPEND_BM

Example

        Uint32 bmEnd = VCP2_END_NATIVE;
        VCP2_setBmEndian (hVcp2, bmEnd);
    
============================================================================

CSL_IDEF_INLINE void VCP2_setNativeEndian ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_setNativeEndian

Description
This function programs the VCP to view the format of all data as native 8-bit format.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Writes
VCP2_VCPEND_BM=1, VCP2_VCPEND_SD=1

Example

        VCP2_setNativeEndian (hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_setPacked32Endian ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_setPacked32Endian

Description
This function programs the VCP to view the format of all data as packed data in 32-bit words.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Writes
VCP2_VCPEND_BM=0, VCP2_VCPEND_SD=0

Example

        VCP2_setPacked32Endian (hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_setSdEndian ( VCP2Handle  hVcp2,
Uint32  sdEnd 
)

============================================================================
VCP2_setSdEndian

Description
This function programs the VCP to view the format of the soft decision data as either native 8-bit format ('1') or values packed into 32-bit words in little endian format ('0').

Arguments

        hVcp2           Handle to VCP2 instance.
        sdEnd           '1' for native 8-bit format and '0' for 32-bit word packed
                        format
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Writes
VCP2_VCPEND_SD

Example

        Uint32 sdEnd = VCP2_END_NATIVE;
        VCP2_setSdEndian (hVcp2, sdEnd);
    
============================================================================

CSL_IDEF_INLINE void VCP2_start ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_start

Description
This function starts the VCP by writing a start command to the VCPEXE register.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
VCP is started.

Writes
VCP2_VCPEXE_COMMAND=1

Affects
VCP2_VCPSTAT0_RUN=1

Example

        VCP2_start (hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statEmuHalt ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statEmuHalt

Description
This function returns the EMUHALT bit status indicating whether the VCP halt is due to emulation or not.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_EMUHALT

Example

        If (VCP2_statEmuHalt (hVcp2)) 
        {
            ...
        }// end if
    
============================================================================

CSL_IDEF_INLINE Bool VCP2_statError ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statError

Description
This function returns a Boolean value indicating whether any VCP error has occurred.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Boolean value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_ERR

Example

        VCP2_Error error;
        
        // check whether an error has occurred
        if (VCP2_statError (hVcp2)) 
        {
            VCP2_getErrors (hVcp2, &error);
        } // end if
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statInFifo ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statInFifo

Description
This function returns the input FIFO's empty status flag. A '1' indicates that the input FIFO is empty and a '0' indicates it is not empty.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_IFEMP

Example

        If (VCP2_statInFifo (hVcp2)) 
        {
            ...
        } // end if
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statOutFifo ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statOutFifo

Description
This function returns the output FIFO's full status flag. A '1' indicates that the output FIFO is full and a '0' indicates it is not.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_OFFUL

Example

        If (VCP2_statOutFifo (hVcp2)) 
        {
            ...
        } // end if
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statPause ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statPause

Description
This function returns the PAUSE bit status indicating whether the VCP is paused or not.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_PAUSE

Example

        // Pause the VCP.
        VCP2_pause (hVcp2);
        
        // Wait for pause to take place
        while (! VCP2_statPause (hVcp2));
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statRun ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statRun

Description
This function returns the RUN bit status indicating whether the VCP is running or not.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_RUN

Example

        // start the VCP
        VCP2_start (hVcp2);
        
        // check that the VCP is running
        while (! VCP2_statRun (hVcp2));
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statSymProc ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statSymProc

Description
This function returns the number of symbols processed, NSYMPROC bitfield of VCP.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value Value

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
None.

Reads
VCP2_VCPSTAT0_NSYMPROC

Example

        Uint32 numSym;
        
        ...

        numSym = VCP2_statSymProc (hVcp2);
    
============================================================================

CSL_IDEF_INLINE Uint32 VCP2_statWaitIc ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_statWaitIc

Description
This function returns the WIC bit status indicating whether the VCP is waiting to receive new input configuration values.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value bitStatus

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.

Post Condition
The returned value indicates

Reads
VCP2_VCPSTAT0_WIC

Example

        If (VCP2_statWaitIc (hVcp2)) 
        {
            ...
        } // end if
    
============================================================================

CSL_IDEF_INLINE void VCP2_stepTraceback ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_stepTraceback

Description
This function un-pauses the VCP, previously paused by VCP2_pause() function, by writing the un-pause command to the VCPEXE register. This function restarts the VCP at the beginning of current traceback and halts at the next traceback (i.e Step Single Traceback).

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it. The VCP should be operating in debug/emulation mode.

Post Condition
VCP is restarted.

Writes
VCP2_VCPEXE_COMMAND=3

Example

        VCP2_stepTraceback (hVcp2);
    
============================================================================

CSL_IDEF_INLINE void VCP2_unpause ( VCP2Handle  hVcp2  ) 

============================================================================
VCP2_unpause

Description
This function un-pauses the VCP, previously paused by VCP2_pause() function, by writing the un-pause command to the VCPEXE register. This function restarts the VCP at the beginning of current traceback, and VCP will run to normal completion.

Arguments

        hVcp2           Handle to VCP2 instance.
    

Return Value
None.

Pre Condition
VCP2_init() must be called to initialize the VCP2 peripheral before doing any operations on it.The VCP should be operating in debug/emulation mode.

Post Condition
VCP is restarted.

Writes
VCP2_VCPEXE_COMMAND=4

Affects
VCP2_VCPSTAT0_PAUSE=0

Example

        VCP2_unpause (hVcp2);
    
============================================================================


Copyright 2011, Texas Instruments Incorporated