📄 stm32f10x_exti.lst
字号:
###############################################################################
# #
# 30/Jul/2008 11:02:20 #
# IAR ARM ANSI C/C++ Compiler V5.11.0.20622/W32 EVALUATION #
# Copyright 1999-2007 IAR Systems. All rights reserved. #
# #
# Cpu mode = thumb #
# Endian = little #
# Source file = E:\library\src\stm32f10x_exti.c #
# Command line = E:\library\src\stm32f10x_exti.c -D EMB_FLASH -lcN #
# E:\ELE\yten\pro\Release\List\ -o #
# E:\ELE\yten\pro\Release\Obj\ --no_cse --no_unroll #
# --no_inline --no_code_motion --no_tbaa --no_clustering #
# --no_scheduling --debug --endian little --cpu Cortex-M3 #
# -e --fpu None --dlib_config "C:\Program Files\IAR #
# Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\DLib_Config_Normal.h" -I #
# E:\ELE\yten\pro\ -I E:\ELE\yten\pro\..\LIBRARY\INC\ -I #
# "C:\Program Files\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\" -On #
# List file = E:\ELE\yten\pro\Release\List\stm32f10x_exti.lst #
# Object file = E:\ELE\yten\pro\Release\Obj\stm32f10x_exti.o #
# #
# #
###############################################################################
E:\library\src\stm32f10x_exti.c
1 /******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
2 * File Name : stm32f10x_exti.c
3 * Author : MCD Application Team
4 * Version : V1.0
5 * Date : 10/08/2007
6 * Description : This file provides all the EXTI firmware functions.
7 ********************************************************************************
8 * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
12 * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
14 *******************************************************************************/
15
16 /* Includes ------------------------------------------------------------------*/
17 #include "stm32f10x_exti.h"
18
19 /* Private typedef -----------------------------------------------------------*/
20 /* Private define ------------------------------------------------------------*/
21 #define EXTI_LineNone ((u32)0x00000) /* No interrupt selected */
22
23 /* Private macro -------------------------------------------------------------*/
24 /* Private variables ---------------------------------------------------------*/
25 /* Private function prototypes -----------------------------------------------*/
26 /* Private functions ---------------------------------------------------------*/
27
28 /*******************************************************************************
29 * Function Name : EXTI_DeInit
30 * Description : Deinitializes the EXTI peripheral registers to their default
31 * reset values.
32 * Input : None
33 * Output : None
34 * Return : None
35 *******************************************************************************/
36 void EXTI_DeInit(void)
37 {
38 EXTI->IMR = 0x00000000;
39 EXTI->EMR = 0x00000000;
40 EXTI->RTSR = 0x00000000;
41 EXTI->FTSR = 0x00000000;
42 EXTI->PR = 0x0007FFFF;
43 }
44
45 /*******************************************************************************
46 * Function Name : EXTI_Init
47 * Description : Initializes the EXTI peripheral according to the specified
48 * parameters in the EXTI_InitStruct.
49 * Input : - EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure
50 * that contains the configuration information for the EXTI
51 * peripheral.
52 * Output : None
53 * Return : None
54 *******************************************************************************/
55 void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct)
56 {
57 /* Check the parameters */
58 assert_param(IS_EXTI_MODE(EXTI_InitStruct->EXTI_Mode));
59 assert_param(IS_EXTI_TRIGGER(EXTI_InitStruct->EXTI_Trigger));
60 assert_param(IS_EXTI_LINE(EXTI_InitStruct->EXTI_Line));
61 assert_param(IS_FUNCTIONAL_STATE(EXTI_InitStruct->EXTI_LineCmd));
62
63 if (EXTI_InitStruct->EXTI_LineCmd != DISABLE)
64 {
65 *(u32 *)(EXTI_BASE + (u32)EXTI_InitStruct->EXTI_Mode)|= EXTI_InitStruct->EXTI_Line;
66
67 /* Clear Rising Falling edge configuration */
68 EXTI->RTSR &= ~EXTI_InitStruct->EXTI_Line;
69 EXTI->FTSR &= ~EXTI_InitStruct->EXTI_Line;
70
71 /* Select the trigger for the selected external interrupts */
72 if (EXTI_InitStruct->EXTI_Trigger == EXTI_Trigger_Rising_Falling)
73 {
74 /* Rising Falling edge */
75 EXTI->RTSR |= EXTI_InitStruct->EXTI_Line;
76 EXTI->FTSR |= EXTI_InitStruct->EXTI_Line;
77 }
78 else
79 {
80 *(u32 *)(EXTI_BASE + (u32)EXTI_InitStruct->EXTI_Trigger)|= EXTI_InitStruct->EXTI_Line;
81 }
82 }
83 else
84 {
85 /* Disable the selected external lines */
86 *(u32 *)(EXTI_BASE + (u32)EXTI_InitStruct->EXTI_Mode)&= ~EXTI_InitStruct->EXTI_Line;
87 }
88 }
89
90 /*******************************************************************************
91 * Function Name : EXTI_StructInit
92 * Description : Fills each EXTI_InitStruct member with its reset value.
93 * Input : - EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure
94 * which will be initialized.
95 * Output : None
96 * Return : None
97 *******************************************************************************/
98 void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct)
99 {
100 EXTI_InitStruct->EXTI_Line = EXTI_LineNone;
101 EXTI_InitStruct->EXTI_Mode = EXTI_Mode_Interrupt;
102 EXTI_InitStruct->EXTI_Trigger = EXTI_Trigger_Falling;
103 EXTI_InitStruct->EXTI_LineCmd = DISABLE;
104 }
105
106 /*******************************************************************************
107 * Function Name : EXTI_GenerateSWInterrupt
108 * Description : Generates a Software interrupt.
109 * Input : - EXTI_Line: specifies the EXTI lines to be enabled or
110 * disabled.
111 * This parameter can be:
112 * - EXTI_Linex: External interrupt line x where x(0..18)
113 * Output : None
114 * Return : None
115 *******************************************************************************/
116 void EXTI_GenerateSWInterrupt(u32 EXTI_Line)
117 {
118 /* Check the parameters */
119 assert_param(IS_EXTI_LINE(EXTI_Line));
120
121 EXTI->SWIER |= EXTI_Line;
122 }
123
124 /*******************************************************************************
125 * Function Name : EXTI_GetFlagStatus
126 * Description : Checks whether the specified EXTI line flag is set or not.
127 * Input : - EXTI_Line: specifies the EXTI lines flag to check.
128 * This parameter can be:
129 * - EXTI_Linex: External interrupt line x where x(0..18)
130 * Output : None
131 * Return : The new state of EXTI_Line (SET or RESET).
132 *******************************************************************************/
133 FlagStatus EXTI_GetFlagStatus(u32 EXTI_Line)
134 {
135 FlagStatus bitstatus = RESET;
136
137 /* Check the parameters */
138 assert_param(IS_GET_EXTI_LINE(EXTI_Line));
139
140 if ((EXTI->PR & EXTI_Line) != (u32)RESET)
141 {
142 bitstatus = SET;
143 }
144 else
145 {
146 bitstatus = RESET;
147 }
148 return bitstatus;
149 }
150
151 /*******************************************************************************
152 * Function Name : EXTI_ClearFlag
153 * Description : Clears the EXTI抯 line pending flags.
154 * Input : - EXTI_Line: specifies the EXTI lines flags to clear.
155 * This parameter can be:
156 * - EXTI_Linex: External interrupt line x where x(0..18)
157 * Output : None
158 * Return : None
159 *******************************************************************************/
160 void EXTI_ClearFlag(u32 EXTI_Line)
161 {
162 /* Check the parameters */
163 assert_param(IS_EXTI_LINE(EXTI_Line));
164
165 EXTI->PR = EXTI_Line;
166 }
167
168 /*******************************************************************************
169 * Function Name : EXTI_GetITStatus
170 * Description : Checks whether the specified EXTI line is asserted or not.
171 * Input : - EXTI_Line: specifies the EXTI lines to check.
172 * This parameter can be:
173 * - EXTI_Linex: External interrupt line x where x(0..18)
174 * Output : None
175 * Return : The new state of EXTI_Line (SET or RESET).
176 *******************************************************************************/
177 ITStatus EXTI_GetITStatus(u32 EXTI_Line)
178 {
179 ITStatus bitstatus = RESET;
180 u32 enablestatus = 0;
181
182 /* Check the parameters */
183 assert_param(IS_GET_EXTI_LINE(EXTI_Line));
184
185 enablestatus = EXTI->IMR & EXTI_Line;
186
187 if (((EXTI->PR & EXTI_Line) != (u32)RESET) && enablestatus)
188 {
189 bitstatus = SET;
190 }
191 else
192 {
193 bitstatus = RESET;
194 }
195 return bitstatus;
196 }
197
198 /*******************************************************************************
199 * Function Name : EXTI_ClearITPendingBit
200 * Description : Clears the EXTI抯 line pending bits.
201 * Input : - EXTI_Line: specifies the EXTI lines to clear.
202 * This parameter can be:
203 * - EXTI_Linex: External interrupt line x where x(0..18)
204 * Output : None
205 * Return : None
206 *******************************************************************************/
207 void EXTI_ClearITPendingBit(u32 EXTI_Line)
208 {
209 /* Check the parameters */
210 assert_param(IS_EXTI_LINE(EXTI_Line));
211
212 EXTI->PR = EXTI_Line;
213 }
214
215 /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function .cstack
-------- -------
EXTI_ClearFlag 0
EXTI_ClearITPendingBit 0
EXTI_DeInit 0
EXTI_GenerateSWInterrupt 0
EXTI_GetFlagStatus 0
EXTI_GetITStatus 0
EXTI_Init 0
EXTI_StructInit 0
Section sizes:
Function/Label Bytes
-------------- -----
EXTI_DeInit 40
EXTI_Init 114
EXTI_StructInit 18
EXTI_GenerateSWInterrupt 16
EXTI_GetFlagStatus 26
EXTI_ClearFlag 6
EXTI_GetITStatus 48
EXTI_ClearITPendingBit 6
??DataTable11 4
??DataTable13 4
??DataTable20 4
??DataTable22 4
290 bytes in section .text
290 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -