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

📄 usbconfigurationdescriptor.lst

📁 ATmel的AT91sam7SE芯片 USB固件开发源代码
💻 LST
📖 第 1 页 / 共 2 页
字号:
###############################################################################
#                                                                             #
#                                                       18/Jul/2008  11:37:58 #
# IAR ARM ANSI C/C++ Compiler V5.11.0.20622/W32 EVALUATION                    #
# Copyright 1999-2007 IAR Systems. All rights reserved.                       #
#                                                                             #
#    Cpu mode     =  arm                                                      #
#    Endian       =  little                                                   #
#    Source file  =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91lib\usb\common\core\USBConf #
#                    igurationDescriptor.c                                    #
#    Command line =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91lib\usb\common\core\USBConf #
#                    igurationDescriptor.c -D at91sam7se512 -lC               #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\List\ --remarks -o        #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\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 "D:\Program   #
#                    Files\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\DLib_Config_Full.h" -I                #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\ -I                          #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\boards\at91sam7se-ek\ -I     #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\peripherals\ -I              #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\components\ -I               #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\usb\ -I "D:\Program          #
#                    Files\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\" --interwork --cpu_mode arm -On      #
#    List file    =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\List\USBConfigurationDesc #
#                    riptor.lst                                               #
#    Object file  =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\Obj\USBConfigurationDescr #
#                    iptor.o                                                  #
#                                                                             #
#                                                                             #
###############################################################################

D:\rock\atarm\at91sam7se\software\usb-device-core-project-1.3-iar5-at91sam7se-ek\at91lib\usb\common\core\USBConfigurationDescriptor.c
      1          /* ----------------------------------------------------------------------------
      2           *         ATMEL Microcontroller Software Support  -  ROUSSET  -
      3           * ----------------------------------------------------------------------------
      4           * Copyright (c) 2006, 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 disclaiimer below.
     13           * 
     14           * - Redistributions in binary form must reproduce the above copyright notice,
     15           * this list of conditions and the disclaimer below in the documentation and/or
     16           * other materials provided with the distribution. 
     17           * 
     18           * Atmel's name may not be used to endorse or promote products derived from
     19           * this software without specific prior written permission. 
     20           * 
     21           * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
     22           * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     23           * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
     24           * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
     25           * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     26           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     27           * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     28           * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     29           * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     30           * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31           * ----------------------------------------------------------------------------
     32           */
     33          
     34          /*
     35              Title: USBConfigurationDescriptor implementation
     36          
     37              About: Purpose
     38                  Implementation of the USBConfigurationDescriptor class.
     39          */
     40          
     41          //------------------------------------------------------------------------------
     42          //         Headers
     43          //------------------------------------------------------------------------------
     44          
     45          #include "USBConfigurationDescriptor.h"
     46          
     47          //------------------------------------------------------------------------------
     48          //         Exported functions
     49          //------------------------------------------------------------------------------
     50          /*
     51              Function: USBConfigurationDescriptor_GetTotalLength
     52                  Returns the total length of a configuration, i.e. including the 
     53                  descriptors following it.
     54          
     55              Parameters:
     56                  configuration - Pointer to a USBConfigurationDescriptor instance.
     57          
     58              Returns:
     59                  Total length (in bytes) of the configuration.
     60          */

   \                                 In section .text, align 4, keep-with-next
     61          unsigned int USBConfigurationDescriptor_GetTotalLength(
     62              const USBConfigurationDescriptor *configuration)
     63          {
     64              return configuration->wTotalLength;
   \                     USBConfigurationDescriptor_GetTotalLength:
   \   00000000   0310D0E5           LDRB     R1,[R0, #+3]
   \   00000004   0220D0E5           LDRB     R2,[R0, #+2]
   \   00000008   011492E1           ORRS     R1,R2,R1, LSL #+8
   \   0000000C   0100B0E1           MOVS     R0,R1
   \   00000010   1EFF2FE1           BX       LR               ;; return
     65          }
     66          
     67          /*
     68              Function: USBConfigurationDescriptor_GetNumInterfaces
     69                  Returns the number of interfaces in a configuration.
     70          
     71              Parameters:
     72                  configuration - Pointer to a USBConfigurationDescriptor instance.
     73          
     74              Returns:
     75                  Number of interfaces in configuration.
     76          */

   \                                 In section .text, align 4, keep-with-next
     77          unsigned char USBConfigurationDescriptor_GetNumInterfaces(
     78              const USBConfigurationDescriptor *configuration)
     79          {
     80              return configuration->bNumInterfaces;
   \                     USBConfigurationDescriptor_GetNumInterfaces:
   \   00000000   0400D0E5           LDRB     R0,[R0, #+4]
   \   00000004   1EFF2FE1           BX       LR               ;; return
     81          }
     82          
     83          /*
     84              Function: USBConfigurationDescriptor_IsSelfPowered
     85                  Indicates if the device is self-powered when in a given configuration.
     86          
     87              Parameters:
     88                  configuration - Pointer to a USBConfigurationDescriptor instance.
     89          
     90              Returns:
     91                  1 if the device is self-powered when in the given configuration;
     92                  otherwise 0.
     93          */

   \                                 In section .text, align 4, keep-with-next
     94          unsigned char USBConfigurationDescriptor_IsSelfPowered(
     95              const USBConfigurationDescriptor *configuration)
     96          {
   \                     USBConfigurationDescriptor_IsSelfPowered:
   \   00000000   0010B0E1           MOVS     R1,R0
     97              if ((configuration->bmAttributes & (1 << 6)) != 0) {
   \   00000004   0700D1E5           LDRB     R0,[R1, #+7]
   \   00000008   400010E3           TST      R0,#0x40
   \   0000000C   0100000A           BEQ      ??USBConfigurationDescriptor_IsSelfPowered_0
     98          
     99                  return 1;
   \   00000010   0100A0E3           MOV      R0,#+1
   \   00000014   000000EA           B        ??USBConfigurationDescriptor_IsSelfPowered_1
    100              }
    101              else {
    102          
    103                  return 0;
   \                     ??USBConfigurationDescriptor_IsSelfPowered_0:
   \   00000018   0000A0E3           MOV      R0,#+0
   \                     ??USBConfigurationDescriptor_IsSelfPowered_1:

⌨️ 快捷键说明

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