Rev 238 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
196 | killagreg | 1 | /******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** |
1 | ingob | 2 | * File Name : 91x_emi.h |
3 | * Author : MCD Application Team |
||
196 | killagreg | 4 | * Version : V2.1 |
5 | * Date : 12/22/2008 |
||
1 | ingob | 6 | * Description : This file contains all the functions prototypes for the |
196 | killagreg | 7 | * EMI firmware library. |
1 | ingob | 8 | ******************************************************************************** |
9 | * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
||
10 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
||
11 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
||
12 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
||
13 | * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
||
14 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
||
15 | *******************************************************************************/ |
||
16 | |||
17 | /* Define to prevent recursive inclusion -------------------------------------*/ |
||
18 | #ifndef __91x_EMI_H |
||
19 | #define __91x_EMI_H |
||
20 | |||
21 | /* Includes ------------------------------------------------------------------*/ |
||
22 | #include "91x_map.h" |
||
23 | |||
24 | /* Exported types ------------------------------------------------------------*/ |
||
25 | typedef struct |
||
26 | { |
||
27 | u32 EMI_Bank_IDCY; |
||
28 | |||
29 | u32 EMI_Bank_WSTRD; |
||
30 | |||
31 | u32 EMI_Bank_WSTWR; |
||
32 | |||
33 | u32 EMI_Bank_WSTROEN; |
||
34 | |||
35 | u32 EMI_Bank_WSTWEN; |
||
196 | killagreg | 36 | |
37 | u32 EMI_Bank_BRDCR; |
||
38 | |||
1 | ingob | 39 | u32 EMI_Bank_MemWidth ; |
40 | |||
41 | u32 EMI_Bank_WriteProtection; |
||
42 | |||
196 | killagreg | 43 | u32 EMI_Burst_and_PageModeRead_TransferLength; |
44 | |||
45 | u32 EMI_Burst_and_PageModeRead_Selection; |
||
46 | |||
47 | u32 EMI_BurstModeWrite_TransferLength; |
||
48 | |||
49 | u32 EMI_BurstModeWrite_Selection; |
||
50 | |||
51 | u32 EMI_AccessRead_Support; |
||
52 | |||
53 | u32 EMI_AccessWrite_Support; |
||
54 | |||
55 | u32 EMI_ByteLane_Selection; |
||
56 | |||
1 | ingob | 57 | } EMI_InitTypeDef; |
58 | |||
59 | /* Exported constants --------------------------------------------------------*/ |
||
60 | |||
61 | |||
62 | |||
63 | |||
196 | killagreg | 64 | /*Transfer length valid for both burst and page mode*/ |
65 | #define EMI_Read_4Data 0x00000000 /*4 transfers burst*/ |
||
66 | #define EMI_Read_8Data 0x00000400 /*8 transfers burst*/ |
||
67 | |||
68 | /*Transfer length valid only for burst mode*/ |
||
69 | #define EMI_Read_16Data 0x00000800 /*16 transfers burst*/ |
||
70 | #define EMI_Read_Continuous 0x00000C00 /* Continuous (synchron-*/ |
||
71 | /*ous only)*/ |
||
72 | |||
1 | ingob | 73 | /*Select or deselect the page mode read*/ |
196 | killagreg | 74 | #define EMI_NormalMode 0x00000000 /*Normal Mode*/ |
75 | #define EMI_Burst_and_PageModeRead 0x00000100 /*Page and burst Mode Read*/ |
||
1 | ingob | 76 | |
77 | |||
196 | killagreg | 78 | /* Write transfer length for Burst mode Write */ |
79 | #define EMI_Write_4Data 0x00000000 /*4 transfers burst*/ |
||
80 | #define EMI_Write_8Data 0x00040000 /*8 transfers burst*/ |
||
81 | #define EMI_Write_Continuous 0x000C0000 /* Continuous (synchron-*/ |
||
82 | /*ous only)*/ |
||
1 | ingob | 83 | |
196 | killagreg | 84 | /*Select or deselect the Burst(or page) mode Write*/ |
85 | #define EMI_NonBurstModeWrite 0x00000000 /*Non Burst Mode Write*/ |
||
86 | #define EMI_BurstModeWrite 0x00010000 /*Burst Mode Write*/ |
||
87 | |||
88 | /*Byte Lane feature */ |
||
89 | #define EMI_Byte_Select_disabled 0x00000000 /*Byte select disabled*/ |
||
90 | #define EMI_Byte_Select_enabled 0x00000001 /*Byte select enabled*/ |
||
91 | |||
92 | /*Read access feature*/ |
||
93 | #define EMI_Read_Asyn 0x00000000 /*Asynch access for read default)*/ |
||
94 | #define EMI_Read_Syn 0x00000200 /*Synch access for read*/ |
||
95 | |||
96 | |||
97 | /*Write access feature*/ |
||
98 | #define EMI_Write_Asyn 0x00000000 /*Asynch access for Write(default)*/ |
||
99 | #define EMI_Write_Syn 0x00020000 /*Synch access for Write*/ |
||
100 | |||
101 | |||
102 | /*Memory width*/ |
||
103 | #define EMI_Width_Byte 0x00000000 /*8 bits width*/ |
||
104 | #define EMI_Width_HalfWord 0x00000010 /*16 bits width*/ |
||
105 | |||
1 | ingob | 106 | /*Write protection feature */ |
196 | killagreg | 107 | #define EMI_Bank_NonWriteProtect 0x00000000 /*No write protection*/ |
108 | #define EMI_Bank_WriteProtect 0x00000008 /*bank is write protected*/ |
||
1 | ingob | 109 | |
110 | |||
111 | /* Exported macro ------------------------------------------------------------*/ |
||
112 | |||
113 | |||
114 | /* Exported functions ------------------------------------------------------- */ |
||
115 | |||
116 | void EMI_DeInit(void); |
||
117 | void EMI_Init( EMI_Bank_TypeDef* EMI_Bankx, EMI_InitTypeDef* EMI_InitStruct); |
||
118 | void EMI_StructInit(EMI_InitTypeDef* EMI_InitStruct); |
||
196 | killagreg | 119 | void EMI_BCLKCmd(FunctionalState NewState); |
1 | ingob | 120 | |
121 | #endif /* __EMI_H */ |
||
122 | |||
196 | killagreg | 123 | /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ |