1 /******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
\r
2 * File Name : 91x_gpio.h
\r
3 * Author : MCD Application Team
\r
4 * Date First Issued : 05/18/2006 : Version 1.0
\r
5 * Description : This file contains all the functions prototypes for the
\r
6 * GPIO software library.
\r
7 ********************************************************************************
\r
9 * 05/24/2006 : Version 1.1
\r
10 * 05/18/2006 : Version 1.0
\r
11 ********************************************************************************
\r
12 * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
\r
13 * CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS
\r
14 * A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
\r
15 * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
\r
16 * OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
\r
17 * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
\r
18 *******************************************************************************/
\r
20 /* Define to prevent recursive inclusion ------------------------------------ */
\r
25 /* Includes ------------------------------------------------------------------*/
\r
26 #include "91x_map.h"
\r
28 /* GPIO Init structure definition */
\r
34 u8 GPIO_IPConnected;
\r
38 /* Bit_SET and Bit_RESET enumeration */
\r
45 /* Exported constants --------------------------------------------------------*/
\r
46 #define GPIO_Pin_None 0x00
\r
47 #define GPIO_Pin_0 0x01
\r
48 #define GPIO_Pin_1 0x02
\r
49 #define GPIO_Pin_2 0x04
\r
50 #define GPIO_Pin_3 0x08
\r
51 #define GPIO_Pin_4 0x10
\r
52 #define GPIO_Pin_5 0x20
\r
53 #define GPIO_Pin_6 0x40
\r
54 #define GPIO_Pin_7 0x80
\r
55 #define GPIO_Pin_All 0xFF
\r
57 #define GPIO_PinInput 0x00
\r
58 #define GPIO_PinOutput 0x01
\r
60 #define GPIO_Type_PushPull 0x00
\r
61 #define GPIO_Type_OpenCollector 0x01
\r
63 #define GPIO_IPConnected_Disable 0x00
\r
64 #define GPIO_IPConnected_Enable 0x01
\r
66 #define GPIO_InputAlt1 0x00
\r
67 #define GPIO_OutputAlt1 0x01
\r
68 #define GPIO_OutputAlt2 0x02
\r
69 #define GPIO_OutputAlt3 0x03
\r
71 #define GPIO_ANAChannel0 0x01
\r
72 #define GPIO_ANAChannel1 0x02
\r
73 #define GPIO_ANAChannel2 0x04
\r
74 #define GPIO_ANAChannel3 0x08
\r
75 #define GPIO_ANAChannel4 0x10
\r
76 #define GPIO_ANAChannel5 0x20
\r
77 #define GPIO_ANAChannel6 0x40
\r
78 #define GPIO_ANAChannel7 0x80
\r
79 #define GPIO_ANAChannelALL 0xFF
\r
81 void GPIO_DeInit(GPIO_TypeDef* GPIOx);
\r
82 void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
\r
83 void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
\r
84 u8 GPIO_ReadBit(GPIO_TypeDef* GPIOx, u8 GPIO_Pin);
\r
85 u8 GPIO_Read(GPIO_TypeDef* GPIOx);
\r
86 void GPIO_WriteBit(GPIO_TypeDef* GPIOx, u8 GPIO_Pin, BitAction BitVal);
\r
87 void GPIO_Write(GPIO_TypeDef* GPIOx, u8 PortVal);
\r
88 void GPIO_EMIConfig(FunctionalState NewState);
\r
89 void GPIO_ANAPinConfig(u8 GPIO_ANAChannel, FunctionalState NewState);
\r
91 #endif /* _91x_GPIO_H */
\r
93 /******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
\r