📄 csl_bwmngmtopen.c
字号:
/* ============================================================================
* Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005
*
* Use of this software is controlled by the terms and conditions found in the
* license agreement under which this software has been supplied.
* ===========================================================================
*/
/** @file csl_bwmngmtOpen.c
*
* @brief File for functional layer of CSL API @a CSL_bwmngmtOpen()
*
* Description
* - The @a CSL_bwmngmtOpen() function definition & it's associated functions
*
* PATH \\(CSLPATH)\\ipmodules\\bwmngmt\\src
*
* @date 3 June, 2004
* @author Chad Courtney
*/
/* =============================================================================
* Revision History
* ===============
* 11-Apr-2005 Brn updated the file for doxygen compatibiliy
* 03-Aug-2005 Brn Butification
* =============================================================================
*/
#include <csl_bwmngmt.h>
/** ===========================================================================
* @n@b CSL_bwmngmtOpen
*
* @b Description
* This function populates the peripheral data object for the instance
* and returns a handle to the instance.
* The open call sets up the data structures for the particular instance
* of BWMNGMT device. The device can be re-opened anytime after it has
* been normally closed if so required. BWMNGMT Hardware setup will be
* performed at the end of the open call only if the HwSetup Pointer
* supplied was non- NULL. The handle returned by this call is input as
* an essential argument for rest of the APIs described for this module.
*
* @b Arguments
* @verbatim
*
pBwmngmtObj Pointer to the BWMNGMT instance object
bwmngmtNum Instance of the BWMNGMT to be opened.
pBwmngmtParam Pointer to module specific parameters
pStatus pointer for returning status of the function call
* @endverbatim
*
* <b> Return Value </b> CSL_BwmngmtHandle
* Valid BWMNGMT instance handle will be returned if status value is
* equal to CSL_SOK.
*
* @b Example
* @verbatim
* CSL_status status;
* CSL_BwmngmtObj bwmngmtObj;
* CSL_BwmngmtHandle hBwmngmt;
*
* hBwmngmt = CSL_bwmngmtOpen (&bwmngmtObj,
* CSL_BWMNGMT_PER_CNT,
* NULL,
* &status
* );
* @endverbatim
* ===========================================================================
*/
#pragma CODE_SECTION (CSL_bwmngmtOpen, ".text:csl_section:bwmngmt");
CSL_BwmngmtHandle CSL_bwmngmtOpen (
/** Pointer to the handle object - to be allocated by the user
*/
CSL_BwmngmtObj *hBwmngmtObj,
/** Specifies the instance of BWMNGMT to be opened */
CSL_InstNum bwmngmtNum,
/** Module specific parameters;
* Currently there are none; the user should pass 'NULL'
*/
CSL_BwmngmtParam *pBwmParam,
/** This returns the status (success/errors) of the call.
* Could be 'NULL' if the user does not want status information.
*/
CSL_Status *pStatus
)
{
/* bandwidth Management number */
hBwmngmtObj->bwmngmtNum = bwmngmtNum;
hBwmngmtObj->regs = (CSL_BwmngmtRegsOvly)CSL_BWMNGMT_REGS;
if (pStatus)
*pStatus = CSL_SOK;
return hBwmngmtObj;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -