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

📄 csl_intcglobalrestore.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_intcGlobalRestore.c * *  @brief  File for functional layer of CSL API @a CSL_intcGlobalRestore() * *  Description *  - @a CSL_intcGlobalRestore() function definition * *  Path: \\(CSLPATH)\\soc\\davinci\\arm9\\src\\intc * *  Modification *  - 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>/** ============================================================================ *  @n@b CSL_intcGlobalRestore * *  @b Description *  @n Restore global interrupt enable/disable to a previous state. *     The API restores the global interrupt enable/disable state to a previous *     state as recorded by the global-event-enable state passed as an argument. *     CSL_intcGlobalRestore () must be called from a privileged mode. * *  @b Arguments *  @verbatim        prevState   Object containing information about previous state    @endverbatim * *  <b> Return Value </b> CSL_Status *  @li                   CSL_SOK on success * *  @b Example: *  @verbatim        CSL_IntcGlobalEnableState   gieState;        CSL_intcGlobalDisable(&gieState);        // critical-section code //        CSL_intcGlobalRestore(gieState);    @endverbatim * ============================================================================= */#pragma CODE_SECTION (CSL_intcGlobalRestore, ".text:csl_section:intc");CSL_Status CSL_intcGlobalRestore (    CSL_IntcGlobalEnableState      prevState){    _CSL_intc0RestoreFIQ((_CSL_Intc0FiqEnableState)((prevState & 2) >> 1));    _CSL_intc0RestoreIRQ((_CSL_Intc0IrqEnableState)(prevState & 1));    return CSL_SOK;}

⌨️ 快捷键说明

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