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

📄 pio_it.lst

📁 Tried to make CAN logger on AT91sam7X-ek, but have no idea how to implement FATFs... -( I m just a
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       25/May/2009  02:53:23 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM                #
# Copyright 1999-2008 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  arm                                                      #
#    Endian       =  little                                                   #
#    Source file  =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91lib\peripherals\pio\pio_it.c            #
#    Command line =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91lib\peripherals\pio\pio_it.c -D         #
#                    at91sam7x256 -D flash -D TRACE_LEVEL=4 -lC               #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\List\ --remarks --diag_suppress         #
#                    Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
#                    4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
#                    started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
#                    d-project\ewp\at91sam7x256_flash\Obj\ --no_cse           #
#                    --no_unroll --no_inline --no_code_motion --no_tbaa       #
#                    --no_clustering --no_scheduling --debug --endian=little  #
#                    --cpu=ARM7TDMI -e --fpu=None --dlib_config "C:\Program   #
#                    Files (x86)\IAR Systems\Embedded Workbench 5.0           #
#                    Evaluation\ARM\INC\DLib_Config_Full.h" -I                #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/peripherals\ -I                           #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
#                    25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
#                    ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
#                    rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I     #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/components\ -I                            #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/boards/at91sam7x-ek\ -I                   #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\external_libs/crc\ -I "C:\Program Files           #
#                    (x86)\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh      #
#    List file    =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\List\pio_it.lst                         #
#    Object file  =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\Obj\pio_it.o                            #
#                                                                             #
#                                                                             #
###############################################################################

F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91lib\peripherals\pio\pio_it.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          /// Disable traces for this file
     31          #undef TRACE_LEVEL
     32          #define TRACE_LEVEL 0
     33          
     34          //------------------------------------------------------------------------------
     35          //         Headers
     36          //------------------------------------------------------------------------------
     37          
     38          #include "pio_it.h"
     39          #include "pio.h"
     40          #include <board.h>
     41          #include <aic/aic.h>
     42          #include <utility/assert.h>

  #if (TRACE_LEVEL==0) && (DYNTRACE==0)
                           ^
"F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91lib\utility\trace.h",134  Remark[Pe193]: 
          zero used for undefined preprocessing identifier
     43          #include <utility/trace.h>
     44          
     45          //------------------------------------------------------------------------------
     46          //         Local definitions
     47          //------------------------------------------------------------------------------
     48          
     49          /// \exclude
     50          /// Maximum number of interrupt sources that can be defined. This
     51          /// constant can be increased, but the current value is the smallest possible
     52          /// that will be compatible with all existing projects.
     53          #define MAX_INTERRUPT_SOURCES       7
     54          
     55          //------------------------------------------------------------------------------
     56          //         Local types
     57          //------------------------------------------------------------------------------
     58          
     59          //------------------------------------------------------------------------------
     60          /// \exclude
     61          /// Describes a PIO interrupt source, including the PIO instance triggering the
     62          /// interrupt and the associated interrupt handler.
     63          //------------------------------------------------------------------------------
     64          typedef struct {
     65          
     66              /// Pointer to the source pin instance.
     67              const Pin *pPin;
     68          
     69              /// Interrupt handler.
     70              void (*handler)(const Pin *);
     71          
     72          } InterruptSource;
     73          
     74          //------------------------------------------------------------------------------
     75          //         Local variables
     76          //------------------------------------------------------------------------------
     77          
     78          /// List of interrupt sources.

   \                                 In section .bss, align 4
     79          static InterruptSource pSources[MAX_INTERRUPT_SOURCES];
   \                     pSources:
   \   00000000                      DS8 56
     80          
     81          /// Number of currently defined interrupt sources.

   \                                 In section .bss, align 4
     82          static unsigned int numSources;
   \                     numSources:
   \   00000000                      DS8 4
     83          
     84          //------------------------------------------------------------------------------
     85          //         Local functions
     86          //------------------------------------------------------------------------------
     87          
     88          //------------------------------------------------------------------------------
     89          /// Handles all interrupts on the given PIO controller.
     90          /// \param id  PIO controller ID.
     91          /// \param pPio  PIO controller base address.
     92          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     93          static void PioInterruptHandler(unsigned int id, AT91S_PIO *pPio)
     94          {
   \                     PioInterruptHandler:
   \   00000000   F8402DE9           PUSH     {R3-R7,LR}
   \   00000004   0040A0E1           MOV      R4,R0
     95              unsigned int status;
     96              unsigned int i;
     97          
     98              // Read PIO controller status
     99              status = pPio->PIO_ISR;
   \   00000008   4C0091E5           LDR      R0,[R1, #+76]
    100              status &= pPio->PIO_IMR;
   \   0000000C   481091E5           LDR      R1,[R1, #+72]
   \   00000010   005011E0           ANDS     R5,R1,R0
    101          
    102              // Check pending events
    103              if (status != 0) {
   \   00000014   1900000A           BEQ      ??PioInterruptHandler_0
    104          
    105                  TRACE_DEBUG("PIO interrupt on PIO controller #%d\n\r", id);
    106          
    107                  // Find triggering source
    108                  i = 0;
   \   00000018   0060A0E3           MOV      R6,#+0
   \   0000001C   ........           LDR      R7,??DataTable9  ;; pSources
    109                  while (status != 0) {
    110          
    111                      // There cannot be an unconfigured source enabled.
    112                      SANITY_CHECK(i < numSources);
   \                     ??PioInterruptHandler_1:
   \   00000020   ........           LDR      R0,??DataTable10  ;; numSources
   \   00000024   000090E5           LDR      R0,[R0, #+0]
   \   00000028   000056E1           CMP      R6,R0
   \   0000002C   0000003A           BCC      ??PioInterruptHandler_2
   \                     ??PioInterruptHandler_3:
   \   00000030   FEFFFFEA           B        ??PioInterruptHandler_3
    113          
    114                      // Source is configured on the same controller
    115                      if (pSources[i].pPin->id == id) {
   \                     ??PioInterruptHandler_2:
   \   00000034   000097E5           LDR      R0,[R7, #+0]
   \   00000038   0800D0E5           LDRB     R0,[R0, #+8]
   \   0000003C   040050E1           CMP      R0,R4
   \   00000040   0A00001A           BNE      ??PioInterruptHandler_4
    116          
    117                          // Source has PIOs whose statuses have changed
    118                          if ((status & pSources[i].pPin->mask) != 0) {
   \   00000044   000097E5           LDR      R0,[R7, #+0]
   \   00000048   000090E5           LDR      R0,[R0, #+0]
   \   0000004C   050010E1           TST      R0,R5
   \   00000050   0600000A           BEQ      ??PioInterruptHandler_4
    119          
    120                              TRACE_DEBUG("Interrupt source #%d triggered\n\r", i);
    121          
    122                              pSources[i].handler(pSources[i].pPin);
   \   00000054   000097E5           LDR      R0,[R7, #+0]
   \   00000058   041097E5           LDR      R1,[R7, #+4]
   \   0000005C   0FE0A0E1           MOV      LR,PC
   \   00000060   11FF2FE1           BX       R1
    123                              status &= ~(pSources[i].pPin->mask);
   \   00000064   000097E5           LDR      R0,[R7, #+0]
   \   00000068   000090E5           LDR      R0,[R0, #+0]

⌨️ 快捷键说明

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