OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_STM32F103_Keil/] [STM32F10xFWLib/] [inc/] [stm32f10x_exti.h] - Blame information for rev 582

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 582 jeremybenn
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
2
* File Name          : stm32f10x_exti.h
3
* Author             : MCD Application Team
4
* Date First Issued  : 09/29/2006
5
* Description        : This file contains all the functions prototypes for the
6
*                      EXTI firmware library.
7
********************************************************************************
8
* History:
9
* 04/02/2007: V0.2
10
* 02/05/2007: V0.1
11
* 09/29/2006: V0.01
12
********************************************************************************
13
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
14
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
15
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
16
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
17
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
18
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19
*******************************************************************************/
20
 
21
/* Define to prevent recursive inclusion -------------------------------------*/
22
#ifndef __STM32F10x_EXTI_H
23
#define __STM32F10x_EXTI_H
24
 
25
/* Includes ------------------------------------------------------------------*/
26
#include "stm32f10x_map.h"
27
 
28
/* Exported types ------------------------------------------------------------*/
29
/* EXTI mode enumeration -----------------------------------------------------*/
30
typedef enum
31
{
32
  EXTI_Mode_Interrupt = 0x00,
33
  EXTI_Mode_Event = 0x04
34
}EXTIMode_TypeDef;
35
 
36
#define IS_EXTI_MODE(MODE) ((MODE == EXTI_Mode_Interrupt) || (MODE == EXTI_Mode_Event))
37
 
38
/* EXTI Trigger enumeration --------------------------------------------------*/
39
typedef enum
40
{
41
  EXTI_Trigger_Rising = 0x08,
42
  EXTI_Trigger_Falling = 0x0C,
43
  EXTI_Trigger_Rising_Falling = 0x10
44
}EXTITrigger_TypeDef;
45
 
46
#define IS_EXTI_TRIGGER(TRIGGER) ((TRIGGER == EXTI_Trigger_Rising) || \
47
                                  (TRIGGER == EXTI_Trigger_Falling) || \
48
                                  (TRIGGER == EXTI_Trigger_Rising_Falling))
49
 
50
/* EXTI Init Structure definition --------------------------------------------*/
51
typedef struct
52
{
53
  u32 EXTI_Line;
54
  EXTIMode_TypeDef EXTI_Mode;
55
  EXTITrigger_TypeDef EXTI_Trigger;
56
  FunctionalState EXTI_LineCmd;
57
}EXTI_InitTypeDef;
58
 
59
/* Exported constants --------------------------------------------------------*/
60
/* EXTI Lines ----------------------------------------------------------------*/
61
#define EXTI_Line0       ((u32)0x00001)  /* External interrupt line 0 */
62
#define EXTI_Line1       ((u32)0x00002)  /* External interrupt line 1 */
63
#define EXTI_Line2       ((u32)0x00004)  /* External interrupt line 2 */
64
#define EXTI_Line3       ((u32)0x00008)  /* External interrupt line 3 */
65
#define EXTI_Line4       ((u32)0x00010)  /* External interrupt line 4 */
66
#define EXTI_Line5       ((u32)0x00020)  /* External interrupt line 5 */
67
#define EXTI_Line6       ((u32)0x00040)  /* External interrupt line 6 */
68
#define EXTI_Line7       ((u32)0x00080)  /* External interrupt line 7 */
69
#define EXTI_Line8       ((u32)0x00100)  /* External interrupt line 8 */
70
#define EXTI_Line9       ((u32)0x00200)  /* External interrupt line 9 */
71
#define EXTI_Line10      ((u32)0x00400)  /* External interrupt line 10 */
72
#define EXTI_Line11      ((u32)0x00800)  /* External interrupt line 11 */
73
#define EXTI_Line12      ((u32)0x01000)  /* External interrupt line 12 */
74
#define EXTI_Line13      ((u32)0x02000)  /* External interrupt line 13 */
75
#define EXTI_Line14      ((u32)0x04000)  /* External interrupt line 14 */
76
#define EXTI_Line15      ((u32)0x08000)  /* External interrupt line 15 */
77
#define EXTI_Line16      ((u32)0x10000)  /* External interrupt line 16
78
                                            Connected to the PVD Output */
79
#define EXTI_Line17      ((u32)0x20000)  /* External interrupt line 17 
80
                                            Connected to the RTC Alarm event */
81
#define EXTI_Line18      ((u32)0x40000)  /* External interrupt line 18 
82
                                            Connected to the USB Wakeup from
83
                                            suspend event */
84
 
85
#define IS_EXTI_LINE(LINE) (((LINE & (u32)0xFFF80000) == 0x00) && (LINE != (u16)0x00))
86
 
87
#define IS_GET_EXTI_LINE(LINE) ((LINE == EXTI_Line0) || (LINE == EXTI_Line1) || \
88
                            (LINE == EXTI_Line2) || (LINE == EXTI_Line3) || \
89
                            (LINE == EXTI_Line4) || (LINE == EXTI_Line5) || \
90
                            (LINE == EXTI_Line6) || (LINE == EXTI_Line7) || \
91
                            (LINE == EXTI_Line8) || (LINE == EXTI_Line9) || \
92
                            (LINE == EXTI_Line10) || (LINE == EXTI_Line11) || \
93
                            (LINE == EXTI_Line12) || (LINE == EXTI_Line13) || \
94
                            (LINE == EXTI_Line14) || (LINE == EXTI_Line15) || \
95
                            (LINE == EXTI_Line16) || (LINE == EXTI_Line17) || \
96
                            (LINE == EXTI_Line18))
97
 
98
/* Exported macro ------------------------------------------------------------*/
99
/* Exported functions ------------------------------------------------------- */
100
void EXTI_DeInit(void);
101
void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct);
102
void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct);
103
void EXTI_GenerateSWInterrupt(u32 EXTI_Line);
104
FlagStatus EXTI_GetFlagStatus(u32 EXTI_Line);
105
void EXTI_ClearFlag(u32 EXTI_Line);
106
ITStatus EXTI_GetITStatus(u32 EXTI_Line);
107
void EXTI_ClearITPendingBit(u32 EXTI_Line);
108
 
109
#endif /* __STM32F10x_EXTI_H */
110
 
111
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.