📄 csl_dmaxgethwsetupfifoparam.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_dmaxGetHwSetupFifoParam.c * * @brief File for functional layer of CSL API @a * CSL_dmaxGetHwSetupFifoXFRParamEntry() * * Description * - The @a CSL_dmaxGetHwSetupFifoXFRParamEntry() * function definition & it's associated functions * * Modification 1 * - Modified on: 11/March/2005 * - Reason: created the sources * * @author asr. */#include <csl_dmax.h>/** ======================================================================= * @n@b CSL_dmaxGetHwSetupFifoXFRParamEntry * * @b Description * @n This function initializes the device registers with the appropriate * values provided through the HwSetup Data structure. After the * Setup is completed, the device is ready for operation. * For information passed through the HwSetup Data structure refer * @a CSL_dmaxHwSetup. * * @b Arguments * @verbatim * * paramEntry Pointer to Prameter Table Entry where data * is to be stored * * setup Pointer to a dmax FIFO Transfer Setup Object * * @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Successful completion of hardware * setup * @li CSL_ESYS_ INVPARAMS - Hardware structure is * not properly initialized * @li CSL_ESYS_ BADHANDLE - Invalid CSL handle * * * <b> Pre Condition </b> * @n Both CSL_dmaxInit() and a CSL_dmaxOpen() must be called * * <b> Post Condition </b> * @n DMAX registers are configured * * @b Modifies * @n DMAX registers * * @b Example * @verbatim CSL_DmaxParameterEntry paramEntry; CSL_dmaxHwSetup hwSetup; hwSetup.linearReload0 = paramEntry[0]; . . hwSetup.delayTabPtr1 = paramEntry[9]; CSL_dmaxGetHwSetupFifoXFRParamEntry(hDmax, &hwSetup); @endverbatim * * ============================================================================ */#pragma CODE_SECTION \
(CSL_dmaxGetHwSetupFifoXFRParamEntry, ".text:csl_section:dmax");CSL_Status CSL_dmaxGetHwSetupFifoXFRParamEntry ( CSL_DmaxParameterEntry *paramEntry, CSL_DmaxFifoParameterSetup *setup){ CSL_Status status; Uint32 *tmpPtr = (Uint32 *) paramEntry; status = CSL_SOK; setup->linearReload0 = tmpPtr[0]; setup->pfd = tmpPtr[1]; setup->count0 = CSL_FEXT (tmpPtr[2], DMAX_FIFORW_COUNT0); setup->count1 = CSL_FEXT (tmpPtr[2], DMAX_FIFORW_COUNT1); setup->linearIndx0 = tmpPtr[3]; setup->linearIndx1 = tmpPtr[4]; setup->count0 = CSL_FEXT (tmpPtr[5], DMAX_FIFORW_COUNT0); setup->count1 = CSL_FEXT (tmpPtr[5], DMAX_FIFORW_COUNT1); setup->linearReload0 = tmpPtr[6]; setup->linearReload1 = tmpPtr[7]; setup->delayTabPtr0 = tmpPtr[8]; setup->delayTabPtr1 = tmpPtr[9]; return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -