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

📄 csl_intcglobaldisable.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_intcGlobalDisable.c * *  @brief  File for functional layer of CSL API @a CSL_intcGlobalDisable() * *  Description *  - @a CSL_intcGlobalDisable() 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_intcGlobalDisable * *  @b Description *  @n Globally disable interrupts. *     The API disables the global interrupt by manipulating the processor's *     global interrupt enable/disable flag. If the user wishes to restore *     the enable-state at a later point, they may store the current state *     using the parameter, which could be used with CSL_intcGlobalRestore (). *     CSL_intcGlobalDisable () must be called from a privileged mode. * *  @b Arguments *  @verbatim        prevState   (Optional) Pointer to object that would store current                    stateObject that contains 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_intcGlobalDisable, ".text:csl_section:intc");CSL_Status CSL_intcGlobalDisable (    CSL_IntcGlobalEnableState      *prevState){    CSL_IntcGlobalEnableState  en;    en = ((CSL_IntcGlobalEnableState)_CSL_intc0DisableFIQ( ) << 1) |          (CSL_IntcGlobalEnableState)_CSL_intc0DisableIRQ( );    if (prevState) {        *prevState = en;    }    return CSL_SOK;}

⌨️ 快捷键说明

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