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

📄 aic.lst

📁 IAR5.2下 AT91SAM9260 ARM 对 MCP2515 控制源化码
💻 LST
字号:
###############################################################################
#                                                                             #
#                                                       08/Mar/2009  17:38:35 #
# IAR ANSI C/C++ Compiler V5.20.2.21007/W32 EVALUATION for ARM                #
# Copyright 1999-2008 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  arm                                                      #
#    Endian       =  little                                                   #
#    Source file  =  E:\IAR\at91lib\peripherals\aic\aic.c                     #
#    Command line =  E:\IAR\at91lib\peripherals\aic\aic.c -D at91sam9260 -D   #
#                    sdram -lC E:\IAR\at91sam9260-ek\basic-twi-eeprom-project #
#                    \ewp\at91sam9260_sdram\List\ --remarks --diag_suppress   #
#                    Pe826,Pe1375 -o E:\IAR\at91sam9260-ek\basic-twi-eeprom-p #
#                    roject\ewp\at91sam9260_sdram\Obj\ --no_cse --no_unroll   #
#                    --no_inline --no_code_motion --no_tbaa --no_clustering   #
#                    --no_scheduling --debug --endian=little                  #
#                    --cpu=ARM926EJ-S -e --fpu=None --dlib_config             #
#                    "D:\Program Files\IAR Systems\Embedded Workbench 5.0     #
#                    Evaluation\ARM\INC\DLib_Config_Full.h" -I                #
#                    E:\IAR\at91sam9260-ek\basic-twi-eeprom-project\ewp\..\.. #
#                    \..\at91lib\ -I E:\IAR\at91sam9260-ek\basic-twi-eeprom-p #
#                    roject\ewp\..\..\..\at91lib\boards\at91sam9260-ek\ -I    #
#                    E:\IAR\at91sam9260-ek\basic-twi-eeprom-project\ewp\..\.. #
#                    \..\at91lib\peripherals\ -I                              #
#                    E:\IAR\at91sam9260-ek\basic-twi-eeprom-project\ewp\..\.. #
#                    \..\at91lib\components\ -I E:\IAR\at91sam9260-ek\basic-t #
#                    wi-eeprom-project\ewp\..\..\..\at91lib\usb\ -I           #
#                    "D:\Program Files\IAR Systems\Embedded Workbench 5.0     #
#                    Evaluation\ARM\INC\" --interwork --cpu_mode arm -On      #
#    List file    =  E:\IAR\at91sam9260-ek\basic-twi-eeprom-project\ewp\at91s #
#                    am9260_sdram\List\aic.lst                                #
#    Object file  =  E:\IAR\at91sam9260-ek\basic-twi-eeprom-project\ewp\at91s #
#                    am9260_sdram\Obj\aic.o                                   #
#                                                                             #
#                                                                             #
###############################################################################

E:\IAR\at91lib\peripherals\aic\aic.c
      1          /* ----------------------------------------------------------------------------
      2           *         ATMEL Microcontroller Software Support 
      3           * ----------------------------------------------------------------------------
      4           * Copyright (c) 2008, Atmel Corporation
      5           *
      6           * All rights reserved.
      7           *
      8           * Redistribution and use in source and binary forms, with or without
      9           * modification, are permitted provided that the following conditions are met:
     10           *
     11           * - Redistributions of source code must retain the above copyright notice,
     12           * this list of conditions and the disclaimer below.
     13           *
     14           * Atmel's name may not be used to endorse or promote products derived from
     15           * this software without specific prior written permission.
     16           *
     17           * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
     18           * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     19           * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
     20           * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
     21           * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     22           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     23           * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     24           * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     25           * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     26           * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27           * ----------------------------------------------------------------------------
     28           */
     29          
     30          //------------------------------------------------------------------------------
     31          //         Headers
     32          //------------------------------------------------------------------------------
     33          
     34          #include "aic.h"
     35          #include <board.h>
     36          
     37          //------------------------------------------------------------------------------
     38          //         Exported functions
     39          //------------------------------------------------------------------------------
     40          
     41          //------------------------------------------------------------------------------
     42          /// Configures the interrupt associated with the given source, using the
     43          /// specified mode and interrupt handler.
     44          /// \param source  Interrupt source to configure.
     45          /// \param mode  Triggering mode of the interrupt.
     46          /// \param handler  Interrupt handler function.
     47          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     48          void AIC_ConfigureIT(unsigned int source,
     49                               unsigned int mode,
     50                               void (*handler)( void ))
     51          {
     52              // Disable the interrupt first
     53              AT91C_BASE_AIC->AIC_IDCR = 1 << source;
   \                     AIC_ConfigureIT:
   \   00000000   0130A0E3           MOV      R3,#+1
   \   00000004   1330B0E1           LSLS     R3,R3,R0
   \   00000008   DBC0E0E3           MVN      R12,#+219
   \   0000000C   E0CECCE3           BIC      R12,R12,#0xE00
   \   00000010   00308CE5           STR      R3,[R12, #+0]
     54          
     55              // Configure mode and handler
     56              AT91C_BASE_AIC->AIC_SMR[source] = mode;
   \   00000014   0430A0E3           MOV      R3,#+4
   \   00000018   93001CE0           MULS     R12,R3,R0
   \   0000001C   403D5CE2           SUBS     R3,R12,#+4096
   \   00000020   001083E5           STR      R1,[R3, #+0]
     57              AT91C_BASE_AIC->AIC_SVR[source] = (unsigned int) handler;
   \   00000024   0430A0E3           MOV      R3,#+4
   \   00000028   93001CE0           MULS     R12,R3,R0
   \   0000002C   802F0CE5           STR      R2,[R12, #-3968]
     58          
     59              // Clear interrupt
     60              AT91C_BASE_AIC->AIC_ICCR = 1 << source;
   \   00000030   0130A0E3           MOV      R3,#+1
   \   00000034   1330B0E1           LSLS     R3,R3,R0
   \   00000038   D7C0E0E3           MVN      R12,#+215
   \   0000003C   E0CECCE3           BIC      R12,R12,#0xE00
   \   00000040   00308CE5           STR      R3,[R12, #+0]
     61          }
   \   00000044   1EFF2FE1           BX       LR               ;; return
     62          
     63          //*----------------------------------------------------------------------------
     64          //* \fn    AT91F_AIC_ConfigureIt
     65          //* \brief Interrupt Handler Initialization
     66          //*----------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     67          unsigned int AIC_ConfigureIt (
     68          	AT91PS_AIC pAic,  			// \arg pointer to the AIC registers
     69          	unsigned int irq_id,     		// \arg interrupt number to initialize
     70          	unsigned int priority,   		// \arg priority to give to the interrupt
     71          	unsigned int src_type,   		// \arg activation and sense of activation
     72          	void (*newHandler) (void) ) 	        // \arg address of the interrupt handler
     73          {
   \                     AIC_ConfigureIt:
   \   00000000   70402DE9           PUSH     {R4-R6,LR}
   \   00000004   00C0B0E1           MOVS     R12,R0
   \   00000008   10E09DE5           LDR      LR,[SP, #+16]
     74              unsigned int oldHandler;
     75              unsigned int mask ;
     76          
     77              oldHandler = pAic->AIC_SVR[irq_id];
   \   0000000C   0450A0E3           MOV      R5,#+4
   \   00000010   95C126E0           MLA      R6,R5,R1,R12
   \   00000014   805096E5           LDR      R5,[R6, #+128]
   \   00000018   0500B0E1           MOVS     R0,R5
     78          
     79              mask = 0x1 << irq_id ;
   \   0000001C   0150A0E3           MOV      R5,#+1
   \   00000020   1551B0E1           LSLS     R5,R5,R1
   \   00000024   0540B0E1           MOVS     R4,R5
     80              //* Disable the interrupt on the interrupt controller
     81              pAic->AIC_IDCR = mask ;
   \   00000028   24418CE5           STR      R4,[R12, #+292]
     82              //* Save the interrupt handler routine pointer and the interrupt priority
     83              pAic->AIC_SVR[irq_id] = (unsigned int) newHandler ;
   \   0000002C   0450A0E3           MOV      R5,#+4
   \   00000030   95C126E0           MLA      R6,R5,R1,R12
   \   00000034   80E086E5           STR      LR,[R6, #+128]
     84              //* Store the Source Mode Register
     85              pAic->AIC_SMR[irq_id] = src_type | priority  ;
   \   00000038   0450A0E3           MOV      R5,#+4
   \   0000003C   95C126E0           MLA      R6,R5,R1,R12
   \   00000040   035092E1           ORRS     R5,R2,R3
   \   00000044   005086E5           STR      R5,[R6, #+0]
     86              //* Clear the interrupt on the interrupt controller
     87              pAic->AIC_ICCR = mask ;
   \   00000048   28418CE5           STR      R4,[R12, #+296]
     88          
     89              return oldHandler;
   \   0000004C   7080BDE8           POP      {R4-R6,PC}       ;; return
     90          }
     91                  
     92          
     93          //------------------------------------------------------------------------------
     94          /// Enables interrupts coming from the given (unique) source.
     95          /// \param source  Interrupt source to enable.
     96          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     97          void AIC_EnableIT(unsigned int source)
     98          { 
     99              //* Enable the interrupt on the interrupt controller
    100              AT91C_BASE_AIC->AIC_IECR = 1 << source;
   \                     AIC_EnableIT:
   \   00000000   0110A0E3           MOV      R1,#+1
   \   00000004   1110B0E1           LSLS     R1,R1,R0
   \   00000008   DF20E0E3           MVN      R2,#+223
   \   0000000C   E02EC2E3           BIC      R2,R2,#0xE00
   \   00000010   001082E5           STR      R1,[R2, #+0]
    101          }
   \   00000014   1EFF2FE1           BX       LR               ;; return
    102          
    103          //------------------------------------------------------------------------------
    104          /// Disables interrupts coming from the given (unique) source.
    105          /// \param source  Interrupt source to enable.
    106          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    107          void AIC_DisableIT(unsigned int source)
    108          {
    109              //* Disable the interrupt on the interrupt controller
    110              AT91C_BASE_AIC->AIC_IDCR = 1 << source;
   \                     AIC_DisableIT:
   \   00000000   0110A0E3           MOV      R1,#+1
   \   00000004   1110B0E1           LSLS     R1,R1,R0
   \   00000008   DB20E0E3           MVN      R2,#+219
   \   0000000C   E02EC2E3           BIC      R2,R2,#0xE00
   \   00000010   001082E5           STR      R1,[R2, #+0]
    111              //* Clear the interrupt on the Interrupt Controller ( if one is pending )
    112              AT91C_BASE_AIC->AIC_ICCR = 1 << source; 
   \   00000014   0110A0E3           MOV      R1,#+1
   \   00000018   1110B0E1           LSLS     R1,R1,R0
   \   0000001C   D720E0E3           MVN      R2,#+215
   \   00000020   E02EC2E3           BIC      R2,R2,#0xE00
   \   00000024   001082E5           STR      R1,[R2, #+0]
    113            
    114          }
   \   00000028   1EFF2FE1           BX       LR               ;; return
    115          

   Maximum stack usage in bytes:

     Function        .cstack
     --------        -------
     AIC_ConfigureIT      0
     AIC_ConfigureIt      0
     AIC_DisableIT        0
     AIC_EnableIT         0


   Section sizes:

     Function/Label  Bytes
     --------------  -----
     AIC_ConfigureIT   72
     AIC_ConfigureIt   80
     AIC_EnableIT      24
     AIC_DisableIT     44

 
 220 bytes in section .text
 
 220 bytes of CODE memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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