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

📄 csl_intceventdisable.c

📁 TI的DM6446的硬件平台搭建的相关例子
💻 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_intcEventDisable.c * *  @brief  File for functional layer of CSL API @a CSL_intcEventDisable() * *  Description *  - @a CSL_intcEventDisable() function definition * *  Path: \\(CSLPATH)\\soc\\davinci\\arm9\\src\\intc * *  Modification *  - Modified on: 2004/06/03 (Francis S) *  - Reason: Adapted to Hibari/Davinci * *  - 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_intcEventDisable * *  @b Description *  @n Disable an event. The API disables the specified event.If the user wishes *     to restore the enable-state of the event at a later point of time, they *     may store the current state using the parameter, which could be used *     with CSL_intcEventRestore (). *     Note: The function directly works on the event and hence it is *     not necessary to "open" the event to invoke the API. * *  @b Arguments *  @verbatim        eventId     Event-ID of interest        prevState   (Optional) Pointer to object that would store current state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_IntcEventEnableState    oldState;        CSL_intcEventDisable (CSL_INTC_EVENTID_I2C, &oldState);    @endverbatim * ============================================================================= */#pragma CODE_SECTION (CSL_intcEventDisable, ".text:csl_section:intc");CSL_Status CSL_intcEventDisable (    CSL_IntcEventId                eventId,    CSL_IntcEventEnableState      *prevState){    CSL_Status status = CSL_SOK;    CSL_IntcEventEnableState  oldState;    if ((eventId >= _CSL_INTC_EVENTID__INTC0START) &&        (eventId <= _CSL_INTC_EVENTID__INTC0END)) {        /* can enable/disable only FIQ and IRQ exceptions;         * so mete out preferential treatment to them         */        if (eventId == CSL_INTC_EVENTID_FIQ) {            oldState = (CSL_IntcEventEnableState) _CSL_intc0DisableFIQ( );        }        else if (eventId == CSL_INTC_EVENTID_IRQ) {            oldState = (CSL_IntcEventEnableState) _CSL_intc0DisableIRQ( );        }        else {            status = CSL_ESYS_NOTSUPPORTED;        }    }    else if ((eventId >= _CSL_INTC_EVENTID__INTC1START) &&             (eventId <= _CSL_INTC_EVENTID__INTC1END)) {        oldState = (CSL_IntcEventEnableState)                   _CSL_intc1Disable(eventId - _CSL_INTC_EVENTID__INTC1START);    }    else {        status = CSL_ESYS_NOTSUPPORTED;    }    if (prevState) {        *prevState = oldState;    }    return status;}

⌨️ 快捷键说明

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