📄 syscalls.lst
字号:
1 .code 16 2 .file "syscalls.c" 10 .Ltext0: 11 .section .text._read_r,"ax",%progbits 12 .align 2 13 .global _read_r 14 .code 16 15 .thumb_func 17 _read_r: 18 .LFB378: 19 .file 1 "syscalls.c" 1:syscalls.c **** /***********************************************************************/
2:syscalls.c **** /* */
3:syscalls.c **** /* SYSCALLS.C: System Calls for the newlib */
4:syscalls.c **** /* most of this is from newlib-lpc and a Keil-demo */
5:syscalls.c **** /* */
6:syscalls.c **** /* These are "reentrant functions" as needed by */
7:syscalls.c **** /* the WinARM-newlib-config, see newlib-manual. */
8:syscalls.c **** /* Collected and modified by Martin Thomas */
9:syscalls.c **** /* */
10:syscalls.c **** /***********************************************************************/
11:syscalls.c ****
12:syscalls.c **** /* adapted for the SAM7 at91_lib DBGU - mthomas 4/2006 */
13:syscalls.c ****
14:syscalls.c **** #include <stdlib.h>
15:syscalls.c **** #include <reent.h>
16:syscalls.c **** #include <sys/stat.h>
17:syscalls.c ****
18:syscalls.c **** #include "Board.h"
19:syscalls.c ****
20:syscalls.c ****
21:syscalls.c **** _ssize_t _read_r(
22:syscalls.c **** struct _reent *r,
23:syscalls.c **** int file,
24:syscalls.c **** void *ptr,
25:syscalls.c **** size_t len)
26:syscalls.c **** {
20 .loc 1 26 0 21 .LVL0: 22 @ lr needed for prologue 23 0000 0448 ldr r0, .L8 24 .LVL1: 25 0002 0121 mov r1, #1 26 .LVL2: 27 .L3: 28 .LBB6: 29 .LBB7: 30 .file 2 "./common/lib_AT91SAM7A3.h" 1:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
2:./common/lib_AT91SAM7A3.h **** //* ATMEL Microcontroller Software Support - ROUSSET -
3:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
4:./common/lib_AT91SAM7A3.h **** //* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
5:./common/lib_AT91SAM7A3.h **** //* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6:./common/lib_AT91SAM7A3.h **** //* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
7:./common/lib_AT91SAM7A3.h **** //* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
8:./common/lib_AT91SAM7A3.h **** //* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9:./common/lib_AT91SAM7A3.h **** //* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
10:./common/lib_AT91SAM7A3.h **** //* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
11:./common/lib_AT91SAM7A3.h **** //* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
12:./common/lib_AT91SAM7A3.h **** //* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
13:./common/lib_AT91SAM7A3.h **** //* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
15:./common/lib_AT91SAM7A3.h **** //* File Name : lib_AT91SAM7A3.h
16:./common/lib_AT91SAM7A3.h **** //* Object : AT91SAM7A3 inlined functions
17:./common/lib_AT91SAM7A3.h **** //* Generated : AT91 SW Application Group 09/13/2005 (09:48:02)
18:./common/lib_AT91SAM7A3.h **** //*
19:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_MC_SAM.h/1.3/Wed Apr 28 09:02:35 2004//
20:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_pdc.h/1.2/Tue Jul 2 12:29:40 2002//
21:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_dbgu.h/1.1/Fri Jan 31 12:18:40 2003//
22:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_shdwc_6122A.h/1.1/Wed Oct 6 13:06:00 2004//
23:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_spi2.h/1.2/Tue Aug 23 15:43:14 2005//
24:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_ssc.h/1.4/Fri Jan 31 12:19:20 2003//
25:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_PWM_SAM.h/1.3/Wed Dec 3 10:23:10 2003//
26:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_tc_1753b.h/1.1/Fri Jan 31 12:20:02 2003//
27:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_pitc_6079A.h/1.2/Thu Nov 4 14:01:11 2004//
28:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_adc.h/1.6/Fri Oct 17 08:12:38 2003//
29:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_pmc_SAM.h/1.9/Tue Aug 30 13:03:40 2005//
30:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_rstc_6098A.h/1.1/Wed Oct 6 09:39:19 2004//
31:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_pio.h/1.3/Fri Jan 31 12:18:56 2003//
32:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_rttc_6081A.h/1.1/Wed Oct 6 09:39:38 2004//
33:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_twi.h/1.3/Mon Jul 19 13:37:30 2004//
34:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_usart.h/1.5/Thu Nov 21 16:01:53 2002//
35:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_mci.h/1.7/Thu May 27 08:47:43 2004//
36:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_wdtc_6080A.h/1.1/Wed Oct 6 09:38:30 2004//
37:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_udp.h/1.5/Mon Aug 29 08:17:54 2005//
38:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_aic_6075b.h/1.2/Mon Jul 18 11:06:01 2005//
39:./common/lib_AT91SAM7A3.h **** //* CVS Reference : /lib_can_AT91.h/1.5/Tue Aug 23 15:42:51 2005//
40:./common/lib_AT91SAM7A3.h **** //* ----------------------------------------------------------------------------
41:./common/lib_AT91SAM7A3.h ****
42:./common/lib_AT91SAM7A3.h **** #ifndef lib_AT91SAM7A3_H
43:./common/lib_AT91SAM7A3.h **** #define lib_AT91SAM7A3_H
44:./common/lib_AT91SAM7A3.h ****
45:./common/lib_AT91SAM7A3.h **** /* *****************************************************************************
46:./common/lib_AT91SAM7A3.h **** SOFTWARE API FOR AIC
47:./common/lib_AT91SAM7A3.h **** ***************************************************************************** */
48:./common/lib_AT91SAM7A3.h **** #define AT91C_AIC_BRANCH_OPCODE ((void (*) ()) 0xE51FFF20) // ldr, pc, [pc, #-&F20]
49:./common/lib_AT91SAM7A3.h ****
50:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
51:./common/lib_AT91SAM7A3.h **** //* \fn AT91F_AIC_ConfigureIt
52:./common/lib_AT91SAM7A3.h **** //* \brief Interrupt Handler Initialization
53:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
54:./common/lib_AT91SAM7A3.h **** __inline unsigned int AT91F_AIC_ConfigureIt (
55:./common/lib_AT91SAM7A3.h **** AT91PS_AIC pAic, // \arg pointer to the AIC registers
56:./common/lib_AT91SAM7A3.h **** unsigned int irq_id, // \arg interrupt number to initialize
57:./common/lib_AT91SAM7A3.h **** unsigned int priority, // \arg priority to give to the interrupt
58:./common/lib_AT91SAM7A3.h **** unsigned int src_type, // \arg activation and sense of activation
59:./common/lib_AT91SAM7A3.h **** void (*newHandler) () ) // \arg address of the interrupt handler
60:./common/lib_AT91SAM7A3.h **** {
61:./common/lib_AT91SAM7A3.h **** unsigned int oldHandler;
62:./common/lib_AT91SAM7A3.h **** unsigned int mask ;
63:./common/lib_AT91SAM7A3.h ****
64:./common/lib_AT91SAM7A3.h **** oldHandler = pAic->AIC_SVR[irq_id];
65:./common/lib_AT91SAM7A3.h ****
66:./common/lib_AT91SAM7A3.h **** mask = 0x1 << irq_id ;
67:./common/lib_AT91SAM7A3.h **** //* Disable the interrupt on the interrupt controller
68:./common/lib_AT91SAM7A3.h **** pAic->AIC_IDCR = mask ;
69:./common/lib_AT91SAM7A3.h **** //* Save the interrupt handler routine pointer and the interrupt priority
70:./common/lib_AT91SAM7A3.h **** pAic->AIC_SVR[irq_id] = (unsigned int) newHandler ;
71:./common/lib_AT91SAM7A3.h **** //* Store the Source Mode Register
72:./common/lib_AT91SAM7A3.h **** pAic->AIC_SMR[irq_id] = src_type | priority ;
73:./common/lib_AT91SAM7A3.h **** //* Clear the interrupt on the interrupt controller
74:./common/lib_AT91SAM7A3.h **** pAic->AIC_ICCR = mask ;
75:./common/lib_AT91SAM7A3.h ****
76:./common/lib_AT91SAM7A3.h **** return oldHandler;
77:./common/lib_AT91SAM7A3.h **** }
78:./common/lib_AT91SAM7A3.h ****
79:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
80:./common/lib_AT91SAM7A3.h **** //* \fn AT91F_AIC_EnableIt
81:./common/lib_AT91SAM7A3.h **** //* \brief Enable corresponding IT number
82:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
83:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_EnableIt (
84:./common/lib_AT91SAM7A3.h **** AT91PS_AIC pAic, // \arg pointer to the AIC registers
85:./common/lib_AT91SAM7A3.h **** unsigned int irq_id ) // \arg interrupt number to initialize
86:./common/lib_AT91SAM7A3.h **** {
87:./common/lib_AT91SAM7A3.h **** //* Enable the interrupt on the interrupt controller
88:./common/lib_AT91SAM7A3.h **** pAic->AIC_IECR = 0x1 << irq_id ;
89:./common/lib_AT91SAM7A3.h **** }
90:./common/lib_AT91SAM7A3.h ****
91:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
92:./common/lib_AT91SAM7A3.h **** //* \fn AT91F_AIC_DisableIt
93:./common/lib_AT91SAM7A3.h **** //* \brief Disable corresponding IT number
94:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
95:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_DisableIt (
96:./common/lib_AT91SAM7A3.h **** AT91PS_AIC pAic, // \arg pointer to the AIC registers
97:./common/lib_AT91SAM7A3.h **** unsigned int irq_id ) // \arg interrupt number to initialize
98:./common/lib_AT91SAM7A3.h **** {
99:./common/lib_AT91SAM7A3.h **** unsigned int mask = 0x1 << irq_id;
100:./common/lib_AT91SAM7A3.h **** //* Disable the interrupt on the interrupt controller
101:./common/lib_AT91SAM7A3.h **** pAic->AIC_IDCR = mask ;
102:./common/lib_AT91SAM7A3.h **** //* Clear the interrupt on the Interrupt Controller ( if one is pending )
103:./common/lib_AT91SAM7A3.h **** pAic->AIC_ICCR = mask ;
104:./common/lib_AT91SAM7A3.h **** }
105:./common/lib_AT91SAM7A3.h ****
106:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
107:./common/lib_AT91SAM7A3.h **** //* \fn AT91F_AIC_ClearIt
108:./common/lib_AT91SAM7A3.h **** //* \brief Clear corresponding IT number
109:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
110:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_ClearIt (
111:./common/lib_AT91SAM7A3.h **** AT91PS_AIC pAic, // \arg pointer to the AIC registers
112:./common/lib_AT91SAM7A3.h **** unsigned int irq_id) // \arg interrupt number to initialize
113:./common/lib_AT91SAM7A3.h **** {
114:./common/lib_AT91SAM7A3.h **** //* Clear the interrupt on the Interrupt Controller ( if one is pending )
115:./common/lib_AT91SAM7A3.h **** pAic->AIC_ICCR = (0x1 << irq_id);
116:./common/lib_AT91SAM7A3.h **** }
117:./common/lib_AT91SAM7A3.h ****
118:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
119:./common/lib_AT91SAM7A3.h **** //* \fn AT91F_AIC_AcknowledgeIt
120:./common/lib_AT91SAM7A3.h **** //* \brief Acknowledge corresponding IT number
121:./common/lib_AT91SAM7A3.h **** //*----------------------------------------------------------------------------
122:./common/lib_AT91SAM7A3.h **** __inline void AT91F_AIC_AcknowledgeIt (
123:./common/lib_AT91SAM7A3.h **** AT91PS_AIC pAic) // \arg pointer to the AIC registers
124:./common/lib_AT91SAM7A3.h **** {
125:./common/lib_AT91SAM7A3.h **** pAic->AIC_EOICR = pAic->AIC_EOICR;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -