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

📄 swi_handler_user.lst

📁 atmel at91SAM7a3 ADC sample
💻 LST
📖 第 1 页 / 共 4 页
字号:
   1              		.code	16   2              		.file	"swi_handler_user.c"  10              	.Ltext0:  11              		.section	.text.SWI_Handler_User,"ax",%progbits  12              		.align	2  13              		.global	SWI_Handler_User  14              		.code 16  15              		.thumb_func  17              	SWI_Handler_User:  18              	.LFB378:  19              		.file 1 "swi_handler_user.c"   1:swi_handler_user.c **** /* User SWI Handler for SWI's not handled in swi_handler.S */
   2:swi_handler_user.c **** 
   3:swi_handler_user.c **** #include <stdio.h>
   4:swi_handler_user.c **** #include "Board.h"
   5:swi_handler_user.c **** #include "dbgu.h"
   6:swi_handler_user.c **** 
   7:swi_handler_user.c **** unsigned long SWI_Handler_User(unsigned long reg0,
   8:swi_handler_user.c **** 	unsigned long reg1,
   9:swi_handler_user.c **** 	unsigned long reg2,
  10:swi_handler_user.c **** 	unsigned long swi_num )
  11:swi_handler_user.c **** {
  20              		.loc 1 11 0  21              	.LVL0:  22              		@ lr needed for prologue  12:swi_handler_user.c **** 	unsigned long res;
  13:swi_handler_user.c **** 
  14:swi_handler_user.c **** 	res = 0;
  15:swi_handler_user.c **** 	
  16:swi_handler_user.c **** 	switch (swi_num) {
  23              		.loc 1 16 0  24 0000 112B     		cmp	r3, #17  25 0002 12D0     		beq	.L4  26 0004 122B     		cmp	r3, #18  27 0006 1FD0     		beq	.L5  28 0008 102B     		cmp	r3, #16  29 000a 01D0     		beq	.L3  30 000c 0020     		mov	r0, #0  31              	.LVL1:  32 000e 1CE0     		b	.L6  33              	.LVL2:  34              	.L3:  35              	.LBB14:  36              	.LBB15:  37              		.file 2 "./common/lib_AT91SAM7A3.h"   1:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
   2:./common/lib_AT91SAM7A3.h **** //*         ATMEL Microcontroller Software Support  -  ROUSSET  -
   3:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
   4:./common/lib_AT91SAM7A3.h **** //* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
   5:./common/lib_AT91SAM7A3.h **** //* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   6:./common/lib_AT91SAM7A3.h **** //* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
   7:./common/lib_AT91SAM7A3.h **** //* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
   8:./common/lib_AT91SAM7A3.h **** //* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   9:./common/lib_AT91SAM7A3.h **** //* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  10:./common/lib_AT91SAM7A3.h **** //* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  11:./common/lib_AT91SAM7A3.h **** //* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  12:./common/lib_AT91SAM7A3.h **** //* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  13:./common/lib_AT91SAM7A3.h **** //* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
  15:./common/lib_AT91SAM7A3.h **** //* File Name           : lib_AT91SAM7A3.h
  16:./common/lib_AT91SAM7A3.h **** //* Object              : AT91SAM7A3 inlined functions
  17:./common/lib_AT91SAM7A3.h **** //* Generated           : AT91 SW Application Group  09/13/2005 (09:48:02)
  18:./common/lib_AT91SAM7A3.h **** //*
  19:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_MC_SAM.h/1.3/Wed Apr 28 09:02:35 2004//
  20:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_pdc.h/1.2/Tue Jul  2 12:29:40 2002//
  21:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_dbgu.h/1.1/Fri Jan 31 12:18:40 2003//
  22:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_shdwc_6122A.h/1.1/Wed Oct  6 13:06:00 2004//
  23:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_spi2.h/1.2/Tue Aug 23 15:43:14 2005//
  24:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_ssc.h/1.4/Fri Jan 31 12:19:20 2003//
  25:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_PWM_SAM.h/1.3/Wed Dec  3 10:23:10 2003//
  26:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_tc_1753b.h/1.1/Fri Jan 31 12:20:02 2003//
  27:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_pitc_6079A.h/1.2/Thu Nov  4 14:01:11 2004//
  28:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_adc.h/1.6/Fri Oct 17 08:12:38 2003//
  29:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_pmc_SAM.h/1.9/Tue Aug 30 13:03:40 2005//
  30:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_rstc_6098A.h/1.1/Wed Oct  6 09:39:19 2004//
  31:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_pio.h/1.3/Fri Jan 31 12:18:56 2003//
  32:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_rttc_6081A.h/1.1/Wed Oct  6 09:39:38 2004//
  33:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_twi.h/1.3/Mon Jul 19 13:37:30 2004//
  34:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_usart.h/1.5/Thu Nov 21 16:01:53 2002//
  35:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_mci.h/1.7/Thu May 27 08:47:43 2004//
  36:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_wdtc_6080A.h/1.1/Wed Oct  6 09:38:30 2004//
  37:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_udp.h/1.5/Mon Aug 29 08:17:54 2005//
  38:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_aic_6075b.h/1.2/Mon Jul 18 11:06:01 2005//
  39:./common/lib_AT91SAM7A3.h **** //* CVS Reference       : /lib_can_AT91.h/1.5/Tue Aug 23 15:42:51 2005//
  40:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
  41:./common/lib_AT91SAM7A3.h **** 
  42:./common/lib_AT91SAM7A3.h **** #ifndef lib_AT91SAM7A3_H
  43:./common/lib_AT91SAM7A3.h **** #define lib_AT91SAM7A3_H
  44:./common/lib_AT91SAM7A3.h **** 
  45:./common/lib_AT91SAM7A3.h **** /* *****************************************************************************
  46:./common/lib_AT91SAM7A3.h ****                 SOFTWARE API FOR AIC
  47:./common/lib_AT91SAM7A3.h ****    ***************************************************************************** */
  48:./common/lib_AT91SAM7A3.h **** #define AT91C_AIC_BRANCH_OPCODE ((void (*) ()) 0xE51FFF20) // ldr, pc, [pc, #-&F20]
  49:./common/lib_AT91SAM7A3.h **** 
  50:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  51:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_ConfigureIt
  52:./common/lib_AT91SAM7A3.h **** //* \brief Interrupt Handler Initialization
  53:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  54:./common/lib_AT91SAM7A3.h **** __inline unsigned int AT91F_AIC_ConfigureIt (
  55:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic,  // \arg pointer to the AIC registers
  56:./common/lib_AT91SAM7A3.h **** 	unsigned int irq_id,     // \arg interrupt number to initialize
  57:./common/lib_AT91SAM7A3.h **** 	unsigned int priority,   // \arg priority to give to the interrupt
  58:./common/lib_AT91SAM7A3.h **** 	unsigned int src_type,   // \arg activation and sense of activation
  59:./common/lib_AT91SAM7A3.h **** 	void (*newHandler) () ) // \arg address of the interrupt handler
  60:./common/lib_AT91SAM7A3.h **** {
  61:./common/lib_AT91SAM7A3.h **** 	unsigned int oldHandler;
  62:./common/lib_AT91SAM7A3.h ****     unsigned int mask ;
  63:./common/lib_AT91SAM7A3.h **** 
  64:./common/lib_AT91SAM7A3.h ****     oldHandler = pAic->AIC_SVR[irq_id];
  65:./common/lib_AT91SAM7A3.h **** 
  66:./common/lib_AT91SAM7A3.h ****     mask = 0x1 << irq_id ;
  67:./common/lib_AT91SAM7A3.h ****     //* Disable the interrupt on the interrupt controller
  68:./common/lib_AT91SAM7A3.h ****     pAic->AIC_IDCR = mask ;
  69:./common/lib_AT91SAM7A3.h ****     //* Save the interrupt handler routine pointer and the interrupt priority
  70:./common/lib_AT91SAM7A3.h ****     pAic->AIC_SVR[irq_id] = (unsigned int) newHandler ;
  71:./common/lib_AT91SAM7A3.h ****     //* Store the Source Mode Register
  72:./common/lib_AT91SAM7A3.h ****     pAic->AIC_SMR[irq_id] = src_type | priority  ;
  73:./common/lib_AT91SAM7A3.h ****     //* Clear the interrupt on the interrupt controller
  74:./common/lib_AT91SAM7A3.h ****     pAic->AIC_ICCR = mask ;
  75:./common/lib_AT91SAM7A3.h **** 
  76:./common/lib_AT91SAM7A3.h **** 	return oldHandler;
  77:./common/lib_AT91SAM7A3.h **** }
  78:./common/lib_AT91SAM7A3.h **** 
  79:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  80:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_EnableIt
  81:./common/lib_AT91SAM7A3.h **** //* \brief Enable corresponding IT number
  82:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  83:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_EnableIt (
  84:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic,      // \arg pointer to the AIC registers
  85:./common/lib_AT91SAM7A3.h **** 	unsigned int irq_id ) // \arg interrupt number to initialize
  86:./common/lib_AT91SAM7A3.h **** {
  87:./common/lib_AT91SAM7A3.h ****     //* Enable the interrupt on the interrupt controller
  88:./common/lib_AT91SAM7A3.h ****     pAic->AIC_IECR = 0x1 << irq_id ;
  89:./common/lib_AT91SAM7A3.h **** }
  90:./common/lib_AT91SAM7A3.h **** 
  91:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  92:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_DisableIt
  93:./common/lib_AT91SAM7A3.h **** //* \brief Disable corresponding IT number
  94:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
  95:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_DisableIt (
  96:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic,      // \arg pointer to the AIC registers
  97:./common/lib_AT91SAM7A3.h **** 	unsigned int irq_id ) // \arg interrupt number to initialize
  98:./common/lib_AT91SAM7A3.h **** {
  99:./common/lib_AT91SAM7A3.h ****     unsigned int mask = 0x1 << irq_id;
 100:./common/lib_AT91SAM7A3.h ****     //* Disable the interrupt on the interrupt controller
 101:./common/lib_AT91SAM7A3.h ****     pAic->AIC_IDCR = mask ;
 102:./common/lib_AT91SAM7A3.h ****     //* Clear the interrupt on the Interrupt Controller ( if one is pending )
 103:./common/lib_AT91SAM7A3.h ****     pAic->AIC_ICCR = mask ;
 104:./common/lib_AT91SAM7A3.h **** }
 105:./common/lib_AT91SAM7A3.h **** 
 106:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 107:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_ClearIt
 108:./common/lib_AT91SAM7A3.h **** //* \brief Clear corresponding IT number
 109:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 110:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_ClearIt (
 111:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic,     // \arg pointer to the AIC registers
 112:./common/lib_AT91SAM7A3.h **** 	unsigned int irq_id) // \arg interrupt number to initialize
 113:./common/lib_AT91SAM7A3.h **** {
 114:./common/lib_AT91SAM7A3.h ****     //* Clear the interrupt on the Interrupt Controller ( if one is pending )
 115:./common/lib_AT91SAM7A3.h ****     pAic->AIC_ICCR = (0x1 << irq_id);
 116:./common/lib_AT91SAM7A3.h **** }
 117:./common/lib_AT91SAM7A3.h **** 
 118:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 119:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_AcknowledgeIt
 120:./common/lib_AT91SAM7A3.h **** //* \brief Acknowledge corresponding IT number
 121:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 122:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_AcknowledgeIt (
 123:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic)     // \arg pointer to the AIC registers
 124:./common/lib_AT91SAM7A3.h **** {
 125:./common/lib_AT91SAM7A3.h ****     pAic->AIC_EOICR = pAic->AIC_EOICR;
 126:./common/lib_AT91SAM7A3.h **** }
 127:./common/lib_AT91SAM7A3.h **** 
 128:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 129:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_SetExceptionVector
 130:./common/lib_AT91SAM7A3.h **** //* \brief Configure vector handler
 131:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 132:./common/lib_AT91SAM7A3.h **** __inline unsigned int  AT91F_AIC_SetExceptionVector (
 133:./common/lib_AT91SAM7A3.h **** 	unsigned int *pVector, // \arg pointer to the AIC registers
 134:./common/lib_AT91SAM7A3.h **** 	void (*Handler) () )   // \arg Interrupt Handler
 135:./common/lib_AT91SAM7A3.h **** {
 136:./common/lib_AT91SAM7A3.h **** 	unsigned int oldVector = *pVector;
 137:./common/lib_AT91SAM7A3.h **** 
 138:./common/lib_AT91SAM7A3.h **** 	if ((unsigned int) Handler == (unsigned int) AT91C_AIC_BRANCH_OPCODE)
 139:./common/lib_AT91SAM7A3.h **** 		*pVector = (unsigned int) AT91C_AIC_BRANCH_OPCODE;
 140:./common/lib_AT91SAM7A3.h **** 	else
 141:./common/lib_AT91SAM7A3.h **** 		*pVector = (((((unsigned int) Handler) - ((unsigned int) pVector) - 0x8) >> 2) & 0x00FFFFFF) | 0x 142:./common/lib_AT91SAM7A3.h **** 
 143:./common/lib_AT91SAM7A3.h **** 	return oldVector;
 144:./common/lib_AT91SAM7A3.h **** }
 145:./common/lib_AT91SAM7A3.h **** 
 146:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 147:./common/lib_AT91SAM7A3.h **** //* \fn    AT91F_AIC_Trig
 148:./common/lib_AT91SAM7A3.h **** //* \brief Trig an IT
 149:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
 150:./common/lib_AT91SAM7A3.h **** __inline void  AT91F_AIC_Trig (
 151:./common/lib_AT91SAM7A3.h **** 	AT91PS_AIC pAic,     // \arg pointer to the AIC registers
 152:./common/lib_AT91SAM7A3.h **** 	unsigned int irq_id) // \arg interrupt number
 153:./common/lib_AT91SAM7A3.h **** {
 154:./common/lib_AT91SAM7A3.h **** 	pAic->AIC_ISCR = (0x1 << irq_id) ;
 155:./common/lib_AT91SAM7A3.h **** }

⌨️ 快捷键说明

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