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

📄 led.lst

📁 Tried to make CAN logger on AT91sam7X-ek, but have no idea how to implement FATFs... -( I m just a
💻 LST
📖 第 1 页 / 共 2 页
字号:
###############################################################################
#                                                                             #
#                                                       24/Apr/2009  23:50:11 #
# 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\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91lib\utilit #
#                    y\led.c                                                  #
#    Command line =  F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91lib\utilit #
#                    y\led.c -D at91sam7x128 -D flash -D TRACE_LEVEL=4 -lC    #
#                    F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\at91sam7x128_flash\List\      #
#                    --remarks --diag_suppress Pe826,Pe1375 -o                #
#                    F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\at91sam7x128_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\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\..\..\..\at91lib/peripherals\ #
#                     -I F:\Diplomovka\Atmel\getting-started-project-at91sam7 #
#                    x-ek-iar\getting-started-project-at91sam7x-ek\at91sam7x- #
#                    ek\getting-started-project\ewp\..\..\..\at91lib\ -I      #
#                    F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\..\..\..\at91lib/components\  #
#                    -I F:\Diplomovka\Atmel\getting-started-project-at91sam7x #
#                    -ek-iar\getting-started-project-at91sam7x-ek\at91sam7x-e #
#                    k\getting-started-project\ewp\..\..\..\at91lib/boards/at #
#                    91sam7x-ek\ -I "C:\Program Files (x86)\IAR               #
#                    Systems\Embedded Workbench 5.0 Evaluation\ARM\INC\"      #
#                    --interwork --cpu_mode arm -Oh                           #
#    List file    =  F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\at91sam7x128_flash\List\led.l #
#                    st                                                       #
#    Object file  =  F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek #
#                    -iar\getting-started-project-at91sam7x-ek\at91sam7x-ek\g #
#                    etting-started-project\ewp\at91sam7x128_flash\Obj\led.o  #
#                                                                             #
#                                                                             #
###############################################################################

F:\Diplomovka\Atmel\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91lib\utility\led.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 "led.h"
     35          #include <board.h>
     36          #include <pio/pio.h>
     37          
     38          //------------------------------------------------------------------------------
     39          //         Local Variables
     40          //------------------------------------------------------------------------------
     41          
     42          #ifdef PINS_LEDS

   \                                 In section .rodata, align 4
     43          static const Pin pinsLeds[] = {PINS_LEDS};
   \                     pinsLeds:
   \   00000000   0000080000F6       DC32 524288, 0FFFFF600H
   \              FFFF        
   \   00000008   03030000           DC8 3, 3, 0, 0
   \   0000000C   0000100000F6       DC32 1048576, 0FFFFF600H
   \              FFFF        
   \   00000014   03030000           DC8 3, 3, 0, 0
   \   00000018   0000200000F6       DC32 2097152, 0FFFFF600H
   \              FFFF        
   \   00000020   03030000           DC8 3, 3, 0, 0
   \   00000024   0000400000F6       DC32 4194304, 0FFFFF600H
   \              FFFF        
   \   0000002C   03030000           DC8 3, 3, 0, 0
     44          static const unsigned int numLeds = PIO_LISTSIZE(pinsLeds);
     45          #endif
     46          
     47          //------------------------------------------------------------------------------
     48          //         Global Functions
     49          //------------------------------------------------------------------------------
     50          
     51          //------------------------------------------------------------------------------
     52          /// Configures the pin associated with the given LED number. If the LED does
     53          /// not exist on the board, the function does nothing.
     54          /// \param led  Number of the LED to configure.
     55          /// \return 1 if the LED exists and has been configured; otherwise 0.
     56          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     57          unsigned char LED_Configure(unsigned int led)
     58          {
   \                     LED_Configure:
   \   00000000   00502DE9           PUSH     {R12,LR}
     59          #ifdef PINS_LEDS
     60              // Check that LED exists
     61              if (led >= numLeds) {
   \   00000004   040050E3           CMP      R0,#+4
     62          
     63                  return 0;
   \   00000008   0000A023           MOVCS    R0,#+0
   \   0000000C   0400002A           BCS      ??LED_Configure_0
     64              }
     65          
     66              // Configure LED
     67              return (PIO_Configure(&pinsLeds[led], 1));
   \   00000010   0110A0E3           MOV      R1,#+1
   \   00000014   0C20A0E3           MOV      R2,#+12
   \   00000018   ........           LDR      R3,??DataTable6  ;; pinsLeds
   \   0000001C   923020E0           MLA      R0,R2,R0,R3
   \   00000020   ........           BL       PIO_Configure
   \                     ??LED_Configure_0:
   \   00000024   0240BDE8           POP      {R1,LR}
   \   00000028   1EFF2FE1           BX       LR               ;; return
     68          #else
     69              return 0;
     70          #endif
     71          }
     72          
     73          //------------------------------------------------------------------------------
     74          /// Turns the given LED on if it exists; otherwise does nothing.
     75          /// \param led  Number of the LED to turn on.
     76          /// \return 1 if the LED has been turned on; 0 otherwise.
     77          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     78          unsigned char LED_Set(unsigned int led)
     79          {
   \                     LED_Set:
   \   00000000   00502DE9           PUSH     {R12,LR}
     80          #ifdef PINS_LEDS
     81              // Check if LED exists
     82              if (led >= numLeds) {
   \   00000004   040050E3           CMP      R0,#+4
     83          
     84                  return 0;
   \   00000008   0000A023           MOVCS    R0,#+0
   \   0000000C   0C00002A           BCS      ??LED_Set_0
     85              }
     86          
     87              // Turn LED on
     88              if (pinsLeds[led].type == PIO_OUTPUT_0) {

⌨️ 快捷键说明

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