![]() |
![]() |
Functions | |
| CSL_RAC_Handle | CSL_RAC_open (CSL_RAC_Obj *pRac2Obj, int instNum, int *pStatus) |
| CSL_Status | CSL_RAC_close (CSL_RAC_Handle hRac2) |
| CSL_Status | CSL_RAC_getBaseAddr (CSL_InstNum racNum, CSL_RAC_BaseAddress *pBaseAddress) |
| CSL_Status CSL_RAC_close | ( | CSL_RAC_Handle | hRac2 | ) |
============================================================================
CSL_RAC_close
Description
Unreserves the RAC2 identified by the handle passed.
Arguments
hRac2 RAC2 handle returned by successful CSL_RAC_open
Return Value CSL_Status
Post Condition
The RAC2 CSL APIs can not be called until the RAC2 CSL is reopened again using CSL_RAC_open ()
Writes
None
Example
CSL_RAC_Handle hRac2;
...
CSL_RAC_close (hRac2);
| CSL_Status CSL_RAC_getBaseAddr | ( | CSL_InstNum | racNum, | |
| CSL_RAC_BaseAddress * | pBaseAddress | |||
| ) |
============================================================================
CSL_RAC_getBaseAddr
Description
This function is used for getting the base-address of the peripheral instance. This function will be called inside the @ CSL_RAC_open () function call.
Note: 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
racNum Specifies the instance of the RAC2 peripheral to be opened.
pBaseAddress Pointer to baseaddress structure containing base
address details.
Return Value
Success - CSL_SOK
Error - CSL_ESYS_FAIL (RAC2 Instance is invalid)
Pre Condition
None
Post Condition
Base Address structure is populated
Affects
None.
Example
CSL_Status status;
CSL_RAC_BaseAddress baseAddress;
// Get the RAC Instance A Information
status = CSL_RAC_getBaseAddr (0, &baseAddress);
| CSL_RAC_Handle CSL_RAC_open | ( | CSL_RAC_Obj * | pRac2Obj, | |
| int | instNum, | |||
| int * | pStatus | |||
| ) |
============================================================================
CSL_RAC_open
Description
Reserves the specified RAC2 for use. The device can be re-opened anytime after it has been normally closed, if so required. The RAC2 handle returned by this call is input as an essential argument for the rest of the APIs in RAC2 module.
Arguments
rac2Obj Rac2 Module Object pointer
instNum RAC2 instance number.
status Status of the function call
Return Value
CSL_RAC_Handle Valid Rac2 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
Writes
None
Example
CSL_RAC_Handle hRac2;
CSL_RAC_Obj rac2Obj;
int status;
...
hRac2 = CSL_RAC_open (&rac2Obj, CSL_RAC_A, &status);