📄 csl_intceventrestore.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_intcEventRestore.c * * @brief File for functional layer of CSL API @a CSL_intcEventRestore() * * Description * - @a CSL_intcEventRestore() 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_intcEventRestore * * @b Description * @n Restore the event to a previous enabled/disabled state. * The API restores the specified event to a previous enable-state * as recorded by the event-enable state passed as an argument. * 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 Object that contains information about previous state @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK on success * * @b Example: * @verbatim CSL_intcEventRestore(CSL_INTC_EVENTID_I2C, oldState); @endverbatim * ============================================================================= */#pragma CODE_SECTION (CSL_intcEventRestore, ".text:csl_section:intc");CSL_Status CSL_intcEventRestore ( CSL_IntcEventId eventId, CSL_IntcEventEnableState prevState){ CSL_Status status = CSL_SOK; 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) { _CSL_intc0RestoreFIQ((_CSL_Intc0FiqEnableState) prevState); } else if (eventId == CSL_INTC_EVENTID_IRQ) { _CSL_intc0RestoreIRQ((_CSL_Intc0IrqEnableState) prevState); } else { status = CSL_ESYS_NOTSUPPORTED; } } else if ((eventId >= _CSL_INTC_EVENTID__INTC1START) && (eventId <= _CSL_INTC_EVENTID__INTC1END)) { _CSL_intc1Restore(eventId - _CSL_INTC_EVENTID__INTC1START, (_CSL_Intc1EventEnableState) prevState); } else { status = CSL_ESYS_NOTSUPPORTED; } return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -