📄 csl_pmxhwsetupraw.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_pmxHwSetupRaw.c
*
* @brief File for functional layer of CSL API @a CSL_pmxHwSetupRaw()
*
* Path: \\(CSLPATH)\\ipmodules\\pmx\\src
*
* Description
* - The @a CSL_pmxHwSetupRaw() function definition & it's associated functions
*
*/
/* ============================================================================
* Copyright (c) Texas Instruments Inc 2002, 2003, 2004
*
* Use of this software is controlled by the terms and conditions found in the
* license agreement under which this software has been supplied.
* ===========================================================================
*/
/* =============================================================================
* Revision History
* ===============
* 20-dec-2004 BRN File Created.
* =============================================================================
*/
#include <csl_pmx.h>
/** ============================================================================
* @n@b CSL_pmxHwSetupRaw
*
* @b Description
* @n This function initializes the device registers with the register-values
* provided through the config data structure.
*
* @b Arguments
* @verbatim
hPmx Handle to the PMX instance
config Pointer to the config structure containing the
device register values
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Configuration successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Configuration structure
* pointer is not properly
* initialized
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The registers of the specified PMX instance will be setup
* according to the values passed through the config structure
*
* @b Modifies
* @n Hardware registers of the specified PMX instance
*
* @b Example
* @verbatim
CSL_PmxHandle hPmx;
CSL_PmxConfig config = CSL_PMX_CONFIG_DEFAULTS;
CSL_Status status;
...
status = CSL_pmxHwSetupRaw (hPmx, &config);
...
@endverbatim
* ===========================================================================
*/
#pragma CODE_SECTION (CSL_pmxHwSetupRaw, ".text:csl_section:pmx");
CSL_Status CSL_pmxHwSetupRaw (
CSL_PmxHandle hPmx,
CSL_PmxConfig *config
)
{
if (hPmx == NULL)
return CSL_ESYS_BADHANDLE;
if (config == NULL)
return CSL_ESYS_INVPARAMS;
/* PINMUX0 Register */
hPmx->regs->PinMux0 = config->PINMUX0;
/* PINMUX1 Register */
hPmx->regs->PinMux1 = config->PINMUX1;
return CSL_SOK;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -