Functions
csl_aif2Open.c File Reference

Antenna Interface 2 open CSL 3.x function. More...

#include <ti/csl/csl_aif2.h>

Functions

CSL_Aif2Handle CSL_aif2Open (CSL_Aif2Obj *paif2Obj, CSL_InstNum aif2Num, CSL_Aif2Param *paif2Param, CSL_Status *pStatus)
 Opens the instance of aif2 requested.

Detailed Description

Antenna Interface 2 open CSL 3.x function.

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


Function Documentation

CSL_Aif2Handle CSL_aif2Open ( CSL_Aif2Obj *  paif2Obj,
CSL_InstNum  aif2Num,
CSL_Aif2Param *  paif2Param,
CSL_Status *  pStatus 
)

Opens the instance of aif2 requested.

============================================================================
CSL_aif2Open Description
The open call sets up the data structures for the particular instance of aif2 device. The device can be re-opened anytime after it has been normally closed if so required. The handle returned by this call is input as an essential argument for rest of the APIs described for this module.

Arguments

           paif2LinkObj    Pointer to the object that holds reference to the
                          instance of aif2 requested after the call
                           
           aif2Num         Instance of aif2 to which a handle is requested
           
           paif2Param      Module specific parameters
 
           pStatus        pointer for returning status of the function call

     

Return Value CSL_aif2Handle Valid aif2 instance handle will be returned if status value is equal to CSL_SOK.

Pre Condition
aif2 must be successfully initialized via CSL_aif2Init() before calling this function. Memory for the CSL_aif2Obj must be allocated outside this call. This object must be retained while usage of this peripheral.

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

  • CSL_SOK Valid aif2 handle is returned
  • CSL_ESYS_FAIL The aif2 instance is invalid

2. aif2 object structure is populated

Writes
1. The status variable 2. aif2 object structure

Example:

          // handle for link 0
          CSL_aif2Handle handleaif2Link0;
          //  link object for link 0
          CSL_aif2LinkObj aif2LinkObj0;
          //aif2 module specific parameters
          CSL_aif2Param  aif2Param;
          // CSL status
          CSL_Status status;

          aif2Param.LinkIndex = CSL_aif2_LINK_0;
   
          // Open handle for link 0 - for use 
          handleaif2Link0 = CSL_aif2Open(&aif2LinkObj0, CSL_aif2, &aif2Param, &status);

          if ((handleaif2Link0 == NULL) || (status != CSL_SOK)) 
          {
             printf ("\nError opening CSL_aif2");
             exit(1);
          }
       

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

Parameters:
paif2ObjPointer to the object that holds reference to the instance of aif2 requested after the call
aif2NumInstance of aif2 to which a handle is requested
paif2ParamModule specific parameters;
pStatusThis returns the status (success/errors) of the call. Could be 'NULL' if the user does not want status information.

Copyright 2014, Texas Instruments Incorporated