⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_intchwsetup.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 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_intcHwSetup.c * *  @brief  File for functional layer of CSL API @a CSL_intcHwSetup() * *  Description *  - @a CSL_intcHwSetup() function definition * *  Path: \\(CSLPATH)\\soc\\davinci\\arm9\\src\\intc * *  Modification *  - Modified on: 2004/06/04 *  - Reason: Remove Level2 Interrupts * *  - Modified on: 2004/04/15 *  - Reason: creation * *  Date   2004/04/15 *  Author RG Kiran */#include <csl_intc.h>#include <csl_error.h>#include <csl_types.h>#include <_csl_intc0.h>#include <_csl_intc1.h>/** ============================================================================ *   @n@b CSL_intcHwSetup * *   @b Description *   @n  Sets up the interrupt controller for a particular event. *       CSL_intcHwSetup () API is used to configure the interrupt controller *       for the event identified by the handle. The user must instantiate *       and initialize a setup-structure with appropriate configuration *       parameters before passing it to the function. * *   @b Arguments *   @verbatim          hIntc        Handle to the INTC instance          hwSetup      Pointer to harware setup structure     @endverbatim * *   <b> Return Value </b>  CSL_Status *   @li        CSL_SOK                - Hardware setup successful *   @li        CSL_ESYS_BADHANDLE     - Invalid handle *   @li        CSL_ESYS_INVPARAMS     - Hardware structure is not properly                                         initialized *   @li        CSL_ESYS_NOTSUPPORTED  - Action not supported * * @b Example: * @verbatim        CSL_Status status = CSL_SOK;        CSL_IntcHwSetup setup = CSL_INTC_HWSETUP_DEFAULTS;        setup.priority = CSL_INTC_PRIORITY_DEFAULT;        setup.type = CSL_INTC_TYPE_IRQ;        status = CSL_intcHwSetup (hIntc, &setup);   @endverbatim * ============================================================================= */#pragma CODE_SECTION (CSL_intcHwSetup, ".text:csl_section:intc");CSL_Status CSL_intcHwSetup (    CSL_IntcHandle            hIntc,    CSL_IntcHwSetup          *hwSetup){    CSL_Status status = CSL_SOK;    if (hIntc == NULL) {        return CSL_ESYS_BADHANDLE;    }    if (hwSetup == NULL) {        return CSL_ESYS_INVPARAMS;    }    if ((hIntc->eventId >= _CSL_INTC_EVENTID__INTC1START) &&        (hIntc->eventId <= _CSL_INTC_EVENTID__INTC1END)) {        _CSL_intc1Setup(hIntc->eventId - _CSL_INTC_EVENTID__INTC1START,                        (_CSL_Intc1Setup *)hwSetup);    }    else if ((hIntc->eventId >= _CSL_INTC_EVENTID__INTC0START) &&             (hIntc->eventId <= _CSL_INTC_EVENTID__INTC0END)) {        /* set-up does not apply to the ARM exceptions */        status = CSL_ESYS_NOTSUPPORTED;    }    else {        status = CSL_ESYS_BADHANDLE;    }    return status;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -