📄 usbprinterdriver.lst
字号:
###############################################################################
# #
# 28/Apr/2009 09:28:26 #
# 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 = E:\workplace\bootloaderOK\at91lib\usb\device\usbprinter\ #
# USBPrinterDriver.c #
# Command line = E:\workplace\bootloaderOK\at91lib\usb\device\usbprinter\ #
# USBPrinterDriver.c -D at91sam7se512 -D flash -D #
# TRACE_LEVEL=4 -lC E:\workplace\bootloaderOK\at91sam7se-e #
# k\basic-dataflash-project\ewp\at91sam7se512_flash\List\ #
# --remarks --diag_suppress Pe826,Pe1375 -o #
# E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\at91sam7se512_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 "D:\Program #
# Files\arm\ARM\INC\DLib_Config_Full.h" -I #
# E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\..\..\..\at91lib/peripherals\ -I #
# E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\..\..\..\at91lib\ -I #
# E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\..\..\..\at91lib/memories\ -I #
# E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\..\..\..\at91lib/boards/at91sam7se-ek\ -I #
# "D:\Program Files\arm\ARM\INC\" --interwork --cpu_mode #
# arm -Oh #
# List file = E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\at91sam7se512_flash\List\USBPrinterDriver.ls #
# t #
# Object file = E:\workplace\bootloaderOK\at91sam7se-ek\basic-dataflash- #
# project\ewp\at91sam7se512_flash\Obj\USBPrinterDriver.o #
# #
# #
###############################################################################
E:\workplace\bootloaderOK\at91lib\usb\device\usbprinter\USBPrinterDriver.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 Title: USBPrinterDriver implementation
32
33 About: Purpose
34 Implementation of the USBPrinterDriver class methods.
35 */
36
37 //------------------------------------------------------------------------------
38 // Headers
39 //------------------------------------------------------------------------------
40
41 #include "USBPrinterDriver.h"
42 #include "USBPrinterDriverDescriptors.h"
43 #include <utility/trace.h>
44 #include <utility/assert.h>
45 #include <usb/device/core/USBDDriver.h>
46 //------------------------------------------------------------------------------
47 // Types
48 //------------------------------------------------------------------------------
49
50 //------------------------------------------------------------------------------
51 /// USB driver for a CDC class implementing a virtual COM serial connection.
52 //------------------------------------------------------------------------------
53 typedef struct {
54
55 /// Standard USBDDriver instance.
56 USBDDriver usbdDriver;
57
58 } USBPrinterDriver;
59
60 //------------------------------------------------------------------------------
61 // Internal variables
62 //------------------------------------------------------------------------------
63
64 /// Static instance of the CDC serial driver.
\ In section .bss, align 4
65 static USBPrinterDriver usbPrinterDriver;
\ usbPrinterDriver:
\ 00000000 DS8 12
66
67 //------------------------------------------------------------------------------
68 // Optional RequestReceived() callback re-implementation
69 //------------------------------------------------------------------------------
70 #if !defined(NOAUTOCALLBACK)
71
72 //------------------------------------------------------------------------------
73 /// Re-implemented callback, invoked when a new USB Request is received.
74 //------------------------------------------------------------------------------
\ In section .text, align 4, keep-with-next
75 void USBDCallbacks_RequestReceived(const USBGenericRequest *request)
76 {
\ USBDCallbacks_RequestReceived:
\ 00000000 01402DE9 PUSH {R0,LR}
77 USBPrinterDriver_RequestHandler(request);
78 }
\ 00000004 0050BDE8 POP {R12,LR}
\ 00000008 ........ B USBPrinterDriver_RequestHandler ;; tailcall
79
80 #endif
81
82 //------------------------------------------------------------------------------
83 // Exported functions
84 //------------------------------------------------------------------------------
85
86 //------------------------------------------------------------------------------
87 /// Initializes the USB Device CDC serial driver & USBD Driver.
88 //------------------------------------------------------------------------------
\ In section .text, align 4, keep-with-next
89 void USBPrinterDriver_Initialize()
90 {
\ USBPrinterDriver_Initialize:
\ 00000000 01402DE9 PUSH {R0,LR}
91 TRACE_INFO("USBPrinterDriver_Initialize\n\r");
\ 00000004 18009FE5 LDR R0,??USBPrinterDriver_Initialize_0 ;; `?<Constant "-I- USBPrinterDriver_...">`
\ 00000008 ........ BL printf
92 // Initialize the standard driver
93 USBDDriver_Initialize(&(usbPrinterDriver.usbdDriver),
94 &usbPrinterDriverDescriptors,
95 0); // Multiple settings for interfaces not supported
\ 0000000C 0020A0E3 MOV R2,#+0
\ 00000010 10109FE5 LDR R1,??USBPrinterDriver_Initialize_0+0x4 ;; usbPrinterDriverDescriptors
\ 00000014 ........ LDR R0,??DataTable1 ;; usbPrinterDriver
\ 00000018 ........ BL USBDDriver_Initialize
96
97 // Initialize the USB driver
98 USBD_Init();
99 }
\ 0000001C 0050BDE8 POP {R12,LR}
\ 00000020 ........ B USBD_Init ;; tailcall
\ ??USBPrinterDriver_Initialize_0:
\ 00000024 ........ DC32 `?<Constant "-I- USBPrinterDriver_...">`
\ 00000028 ........ DC32 usbPrinterDriverDescriptors
100
101 //------------------------------------------------------------------------------
102 /// Handles CDC-specific SETUP requests. Should be called from a
103 /// re-implementation of USBDCallbacks_RequestReceived() method.
104 /// \param Pointer to a USBGenericRequest instance.
105 //------------------------------------------------------------------------------
\ In section .text, align 4, keep-with-next
106 void USBPrinterDriver_RequestHandler(const USBGenericRequest *request)
107 {
\ USBPrinterDriver_RequestHandler:
\ 00000000 10402DE9 PUSH {R4,LR}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -