# csl_vcp2.c File Reference

VCP2 API implementation. More...

`#include <ti/csl/csl_vcp2.h>`
`#include <ti/csl/csl_vcp2Aux.h>`

## Functions

Uint32 | VCP2GetBaseAddress (int vcp2Num, VCP2BaseAddress *pBaseAddress)
VCP2Handle | VCP2_init (VCP2Obj *pVcp2Obj, int instNum, int *pStatus)
CSL_Status | VCP2_Close (VCP2Handle hVcp2)

## Detailed Description

VCP2 API implementation.

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

  ============================================================================
  (C) Copyright 2008-2012, Texas Instruments, Inc.
  Use of this software is controlled by the terms and conditions found
  in the license agreement under which this software has been supplied. ===========================================================================

## Function Documentation

Uint32 VCP2GetBaseAddress | ( | int | vcp2Num,
|  | VCP2BaseAddress * | pBaseAddress |
| ) |  |  |

============================================================================
VCP2GetBaseAddress

Description
Function to get the base address of the peripheral instance. This function is used for getting the base address of the peripheral instance. This function will be called inside the VCP2_init() function call. This function is open for re-implementing if the user wants to modify the base address of the peripheral object to point to a different location and there by allow CSL initiated write/reads into peripheral. MMR's go to an alternate location.

Arguments

            vcp2Num         Specifies the instance of the VCP2 to be opened.
            pBaseAddress    Pointer to baseaddress structure containing base
                            address details.

Return Value CSL_Status

- CSL_OK Successful on getting the base address of vcp2
- CSL_ESYS_FAIL The instance number is invalid.
- CSL_ESYS_INVPARAMS Invalid parameter

Pre Condition
None

Post Condition
Base Address structure is populated and appropriate status is returned.

Writes
None

Example

            int          status;
            VCP2BaseAddress  baseAddress;

            ...
            status = VCP2GetBaseAddress(CSL_VCP2_0, &baseAddress);

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

Copyright 2012, Texas Instruments Incorporated