📄 usbendpointdescriptor.lst
字号:
###############################################################################
# #
# 18/Jul/2008 11:37:57 #
# 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\USBEndp #
# ointDescriptor.c #
# Command line = D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
# t-1.3-iar5-at91sam7se-ek\at91lib\usb\common\core\USBEndp #
# ointDescriptor.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\USBEndpointDescripto #
# r.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\USBEndpointDescriptor #
# .o #
# #
# #
###############################################################################
D:\rock\atarm\at91sam7se\software\usb-device-core-project-1.3-iar5-at91sam7se-ek\at91lib\usb\common\core\USBEndpointDescriptor.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: USBEndpointDescriptor implementation
36
37 About: Purpose
38 Implementation of the USBEndpointDescriptor class.
39 */
40
41 //------------------------------------------------------------------------------
42 // Headers
43 //------------------------------------------------------------------------------
44
45 #include "USBEndpointDescriptor.h"
46
47 //------------------------------------------------------------------------------
48 // Exported functions
49 //------------------------------------------------------------------------------
50 /*
51 Function: USBEndpointDescriptor_GetNumber
52 Returns the number of an endpoint given its descriptor.
53
54 Parameters:
55 endpoint - Pointer to a USBEndpointDescriptor instance.
56
57 Returns:
58 Endpoint number.
59 */
\ In section .text, align 4, keep-with-next
60 unsigned char USBEndpointDescriptor_GetNumber(
61 const USBEndpointDescriptor *endpoint)
62 {
63 return endpoint->bEndpointAddress & 0xF;
\ USBEndpointDescriptor_GetNumber:
\ 00000000 0200D0E5 LDRB R0,[R0, #+2]
\ 00000004 0F0010E2 ANDS R0,R0,#0xF
\ 00000008 1EFF2FE1 BX LR ;; return
64 }
65
66 /*
67 Function: USBEndpointDescriptor_GetDirection
68 Returns the direction of an endpoint given its descriptor.
69
70 Parameters:
71 endpoint - Pointer to a USBEndpointDescriptor instance.
72
73 Returns:
74 Endpoint direction (see <Endpoint directions>).
75 */
\ In section .text, align 4, keep-with-next
76 unsigned char USBEndpointDescriptor_GetDirection(
77 const USBEndpointDescriptor *endpoint)
78 {
\ USBEndpointDescriptor_GetDirection:
\ 00000000 0010B0E1 MOVS R1,R0
79 if ((endpoint->bEndpointAddress & 0x80) != 0) {
\ 00000004 0200D1E5 LDRB R0,[R1, #+2]
\ 00000008 800010E3 TST R0,#0x80
\ 0000000C 0100000A BEQ ??USBEndpointDescriptor_GetDirection_0
80
81 return USBEndpointDescriptor_IN;
\ 00000010 0100A0E3 MOV R0,#+1
\ 00000014 000000EA B ??USBEndpointDescriptor_GetDirection_1
82 }
83 else {
84
85 return USBEndpointDescriptor_OUT;
\ ??USBEndpointDescriptor_GetDirection_0:
\ 00000018 0000A0E3 MOV R0,#+0
\ ??USBEndpointDescriptor_GetDirection_1:
\ 0000001C 1EFF2FE1 BX LR ;; return
86 }
87 }
88
89 /*
90 Function: USBEndpointDescriptor_GetType
91 Returns the type of an endpoint given its descriptor.
92
93 Parameters:
94 endpoint - Pointer to a USBEndpointDescriptor instance.
95
96 Returns:
97 Endpoint type (see <Endpoint types>).
98 */
\ In section .text, align 4, keep-with-next
99 unsigned char USBEndpointDescriptor_GetType(
100 const USBEndpointDescriptor *endpoint)
101 {
102 return endpoint->bmAttributes & 0x3;
\ USBEndpointDescriptor_GetType:
\ 00000000 0300D0E5 LDRB R0,[R0, #+3]
\ 00000004 030010E2 ANDS R0,R0,#0x3
\ 00000008 1EFF2FE1 BX LR ;; return
103 }
104
105 /*
106 Function: USBEndpointDescriptor_GetMaxPacketSize
107 Returns the maximum size of a packet (in bytes) on an endpoint given
108 its descriptor.
109
110 Parameters:
111 endpoint - Pointer to a USBEndpointDescriptor instance.
112
113 Returns:
114 Maximum packet size of endpoint.
115 */
\ In section .text, align 4, keep-with-next
116 unsigned short USBEndpointDescriptor_GetMaxPacketSize(
117 const USBEndpointDescriptor *endpoint)
118 {
119 return endpoint->wMaxPacketSize;
\ USBEndpointDescriptor_GetMaxPacketSize:
\ 00000000 0510D0E5 LDRB R1,[R0, #+5]
\ 00000004 0420D0E5 LDRB R2,[R0, #+4]
\ 00000008 011492E1 ORRS R1,R2,R1, LSL #+8
\ 0000000C 0100B0E1 MOVS R0,R1
\ 00000010 1EFF2FE1 BX LR ;; return
120 }
121
Maximum stack usage in bytes:
Function .cstack
-------- -------
USBEndpointDescriptor_GetDirection
0
USBEndpointDescriptor_GetMaxPacketSize
0
USBEndpointDescriptor_GetNumber
0
USBEndpointDescriptor_GetType 0
Section sizes:
Function/Label Bytes
-------------- -----
USBEndpointDescriptor_GetNumber
12
USBEndpointDescriptor_GetDirection
32
USBEndpointDescriptor_GetType 12
USBEndpointDescriptor_GetMaxPacketSize
20
76 bytes in section .text
76 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -