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

📄 context.s.svn-base

📁 RT-Thread是发展中的下一代微内核嵌入式实时操作系统
💻 SVN-BASE
字号:
/*
 * File      : context.S
 * This file is part of RT-Thread RTOS
 * COPYRIGHT (C) 2006, RT-Thread Development Team
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.fayfayspace.org/license/LICENSE.
 *
 * Change Logs:
 * Date           Author       Notes
 * 2006-02-24     Bernard      first version
 */

/*!
 * \addtogroup xgAT91RM9200
 */
/*@{*/

#define USERMODE	0x10
#define FIQMODE		0x11
#define IRQMODE		0x12
#define SVCMODE		0x13
#define ABORTMODE	0x17
#define UNDEFMODE	0x1b
#define MODEMASK	0x1f
#define NOINT		0xc0

/*!
 * \fn rt_base rt_hw_interrupt_disable(void)
 *
 * \brief disable interrupt
 *
 * call this function will disable interrupt and save the status to flag
 *
 * \return flag
 *
 * @see rt_hw_interrupt_enable
 */
.globl rt_hw_interrupt_disable
rt_hw_interrupt_disable:
	mrs r0, cpsr
	orr r1, r0, #NOINT
	msr cpsr_c, r1
	mov pc, lr

/*!
 * \fn void rt_hw_interrupt_enable(rt_base flag)
 *
 * \brief enable interrupt
 *
 * call this function will restore the saved flag.
 *
 * \param flag the saved flag
 *
 * @see rt_hw_interrupt_disable
 */
.globl rt_hw_interrupt_enable
rt_hw_interrupt_enable:
	msr cpsr, r0
	mov pc, lr

/*@}*/

⌨️ 快捷键说明

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