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

📄 pio_it.lst

📁 ATmel的AT91sam7SE芯片 USB固件开发源代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
    271              AIC_EnableIT(AT91C_ID_PIOE);
    272          #endif
    273          
    274          #if defined(AT91C_ID_PIOABCD)
    275              // Treat PIOABCD interrupts
    276              #if !defined(AT91C_ID_PIOA) \
    277               && !defined(AT91C_ID_PIOB) \
    278               && !defined(AT91C_ID_PIOC) \
    279               && !defined(AT91C_ID_PIOD)
    280          
    281                  trace_LOG(trace_DEBUG, "-D- PIO_Initialize: Configuring PIOABCD\n\r");
    282                  AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOABCD;
    283                  AT91C_BASE_PIOA->PIO_ISR;
    284                  AT91C_BASE_PIOA->PIO_IDR = 0xFFFFFFFF;
    285                  AIC_ConfigureIT(AT91C_ID_PIOABCD, priority, InterruptHandler);
    286                  AIC_EnableIT(AT91C_ID_PIOABCD);
    287              #endif
    288          #endif
    289          
    290          #if defined(AT91C_ID_PIOABCDE)
    291              // Treat PIOABCDE interrupts
    292              #if !defined(AT91C_ID_PIOA) \
    293               && !defined(AT91C_ID_PIOB) \
    294               && !defined(AT91C_ID_PIOC) \
    295               && !defined(AT91C_ID_PIOD) \
    296               && !defined(AT91C_ID_PIOE)
    297          
    298                  trace_LOG(trace_DEBUG, "-D- PIO_Initialize: Configuring PIOABCDE\n\r");
    299                  AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOABCDE;
    300                  AT91C_BASE_PIOA->PIO_ISR;
    301                  AT91C_BASE_PIOA->PIO_IDR = 0xFFFFFFFF;
    302                  AIC_ConfigureIT(AT91C_ID_PIOABCDE, priority, InterruptHandler);
    303                  AIC_EnableIT(AT91C_ID_PIOABCDE);
    304              #endif
    305          #endif
    306          
    307          #if defined(AT91C_ID_PIOCDE)
    308              // Treat PIOCDE interrupts
    309              #if !defined(AT91C_ID_PIOC) \
    310               && !defined(AT91C_ID_PIOD) \
    311               && !defined(AT91C_ID_PIOE)
    312          
    313                  trace_LOG(trace_DEBUG, "-D- PIO_Initialize: Configuring PIOC\n\r");
    314                  AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOCDE;
    315                  AT91C_BASE_PIOC->PIO_ISR;
    316                  AT91C_BASE_PIOC->PIO_IDR = 0xFFFFFFFF;
    317                  AIC_ConfigureIT(AT91C_ID_PIOCDE, priority, InterruptHandler);
    318                  AIC_EnableIT(AT91C_ID_PIOCDE);
    319              #endif
    320          #endif
    321          }
   \   000000D4   F840BDE8           POP      {R3-R7,LR}
   \   000000D8   1EFF2FE1           BX       LR               ;; return
   \                     ??PIO_InitializeInterrupts_0:
   \   000000DC   ........           DC32     InterruptHandler
    322          
    323          //------------------------------------------------------------------------------
    324          /// Configures an interrupt source.
    325          /// \param pPin  Interrupt source.
    326          /// \param handler  Desired interrupt handler for the source.
    327          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    328          void PIO_ConfigureIt(const Pin *pPin, void (*handler)(const Pin *))
    329          {
   \                     PIO_ConfigureIt:
   \   00000000   01402DE9           PUSH     {R0,LR}
    330              InterruptSource *pSource;
    331          
    332              trace_LOG(trace_DEBUG, "-D- PIO_ConfigureIt()\n\r");
    333          
    334              SANITY_CHECK(pPin);
    335              ASSERT(numSources < MAX_INTERRUPT_SOURCES,
    336                     "-F- PIO_ConfigureIt: Increase MAX_INTERRUPT_SOURCES\n\r");
    337          
    338              // Define new source
    339              trace_LOG(trace_DEBUG, "-D- PIO_ConfigureIt: Defining new source #%d.\n\r", numSources);
    340          
    341              pSource = &(pSources[numSources]);
   \   00000004   ........           LDR      R3,??DataTable9  ;; numSources
   \   00000008   003093E5           LDR      R3,[R3, #+0]
   \   0000000C   08C0A0E3           MOV      R12,#+8
   \   00000010   ........           LDR      LR,??DataTable10  ;; pSources
   \   00000014   9CE323E0           MLA      R3,R12,R3,LR
   \   00000018   0320B0E1           MOVS     R2,R3
    342              pSource->pPin = pPin;
   \   0000001C   000082E5           STR      R0,[R2, #+0]
    343              pSource->handler = handler;
   \   00000020   041082E5           STR      R1,[R2, #+4]
    344              numSources++;
   \   00000024   ........           LDR      R3,??DataTable9  ;; numSources
   \   00000028   003093E5           LDR      R3,[R3, #+0]
   \   0000002C   013093E2           ADDS     R3,R3,#+1
   \   00000030   ........           LDR      R12,??DataTable9  ;; numSources
   \   00000034   00308CE5           STR      R3,[R12, #+0]
    345          }
   \   00000038   0050BDE8           POP      {R12,LR}
   \   0000003C   1EFF2FE1           BX       LR               ;; return
    346          
    347          //------------------------------------------------------------------------------
    348          /// Enables the given interrupt source if it has been configured.
    349          /// \param pPin  Interrupt source to enable.
    350          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    351          void PIO_EnableIt(const Pin *pPin)
    352          {
   \                     PIO_EnableIt:
   \   00000000   01402DE9           PUSH     {R0,LR}
    353              trace_LOG(trace_DEBUG, "-D- PIO_EnableIt()\n\r");
    354          
    355              SANITY_CHECK(pPin);
    356          
    357          #ifndef NOASSERT
    358              unsigned int i = 0;
   \   00000004   0030A0E3           MOV      R3,#+0
   \   00000008   0320B0E1           MOVS     R2,R3
    359              unsigned char found = 0;
   \   0000000C   0030A0E3           MOV      R3,#+0
   \   00000010   0310B0E1           MOVS     R1,R3
    360              while ((i < numSources) && !found) {
   \                     ??PIO_EnableIt_0:
   \   00000014   ........           LDR      R3,??DataTable9  ;; numSources
   \   00000018   003093E5           LDR      R3,[R3, #+0]
   \   0000001C   030052E1           CMP      R2,R3
   \   00000020   0C00002A           BCS      ??PIO_EnableIt_1
   \   00000024   FF1011E2           ANDS     R1,R1,#0xFF      ;; Zero extend
   \   00000028   000051E3           CMP      R1,#+0
   \   0000002C   0900001A           BNE      ??PIO_EnableIt_1
    361          
    362                  if (pSources[i].pPin == pPin) {
   \   00000030   0830A0E3           MOV      R3,#+8
   \   00000034   ........           LDR      R12,??DataTable10  ;; pSources
   \   00000038   93C22CE0           MLA      R12,R3,R2,R12
   \   0000003C   00309CE5           LDR      R3,[R12, #+0]
   \   00000040   000053E1           CMP      R3,R0
   \   00000044   0100001A           BNE      ??PIO_EnableIt_2
    363          
    364                      found = 1;
   \   00000048   0130A0E3           MOV      R3,#+1
   \   0000004C   0310B0E1           MOVS     R1,R3
    365                  }
    366                  i++;
   \                     ??PIO_EnableIt_2:
   \   00000050   012092E2           ADDS     R2,R2,#+1
   \   00000054   EEFFFFEA           B        ??PIO_EnableIt_0
    367              }
    368              ASSERT(found, "-F- PIO_EnableIt: Interrupt source has not been configured\n\r");
    369          #endif
    370          
    371              pPin->pio->PIO_ISR;
   \                     ??PIO_EnableIt_1:
   \   00000058   043090E5           LDR      R3,[R0, #+4]
   \   0000005C   4C3093E5           LDR      R3,[R3, #+76]
    372              pPin->pio->PIO_IER = pPin->mask;
   \   00000060   04C090E5           LDR      R12,[R0, #+4]
   \   00000064   00E090E5           LDR      LR,[R0, #+0]
   \   00000068   40E08CE5           STR      LR,[R12, #+64]
    373          }
   \   0000006C   0050BDE8           POP      {R12,LR}
   \   00000070   1EFF2FE1           BX       LR               ;; return
    374          
    375          //------------------------------------------------------------------------------
    376          /// Disables a given interrupt source.
    377          /// \param pPin  Interrupt source to disable.
    378          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    379          void PIO_DisableIt(const Pin *pPin)
    380          {
    381              SANITY_CHECK(pPin);
    382          
    383              trace_LOG(trace_DEBUG, "-D- PIO_DisableIt()\n\r");
    384          
    385              pPin->pio->PIO_IDR = pPin->mask;
   \                     PIO_DisableIt:
   \   00000000   041090E5           LDR      R1,[R0, #+4]
   \   00000004   002090E5           LDR      R2,[R0, #+0]
   \   00000008   442081E5           STR      R2,[R1, #+68]
    386          }
   \   0000000C   1EFF2FE1           BX       LR               ;; return

   \                                 In section .text, align 4, keep-with-next
   \                     ??DataTable9:
   \   00000000   ........           DC32     numSources

   \                                 In section .text, align 4, keep-with-next
   \                     ??DataTable10:
   \   00000000   ........           DC32     pSources
    387          

   Maximum stack usage in bytes:

     Function                 .cstack
     --------                 -------
     InterruptHandler              8
     PIO_ConfigureIt               8
     PIO_DisableIt                 0
     PIO_EnableIt                  8
     PIO_InitializeInterrupts     24
     PioInterruptHandler          24


   Section sizes:

     Function/Label           Bytes
     --------------           -----
     pSources                   56
     numSources                  4
     PioInterruptHandler       188
     InterruptHandler           60
     PIO_InitializeInterrupts  224
     PIO_ConfigureIt            64
     PIO_EnableIt              116
     PIO_DisableIt              16
     ??DataTable9                4
     ??DataTable10               4

 
  60 bytes in section .bss
 676 bytes in section .text
 
 676 bytes of CODE memory
  60 bytes of DATA memory

Errors: none
Warnings: 1

⌨️ 快捷键说明

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