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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM9_STR91X_IAR/] [Library/] [include/] [91x_gpio.h] - Blame information for rev 595

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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