]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_AT91FR40008_GCC/ebi.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / ARM7_AT91FR40008_GCC / ebi.h
1 //*-----------------------------------------------------------------------------\r
2 //*         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
3 //*-----------------------------------------------------------------------------\r
4 //* The software is delivered "AS IS" without warranty or condition of any\r
5 //* kind, either express, implied or statutory. This includes without\r
6 //* limitation any warranty or condition with respect to merchantability or\r
7 //* fitness for any particular purpose, or against the infringements of\r
8 //* intellectual property rights of others.\r
9 //*-----------------------------------------------------------------------------\r
10 //* File Name           : ebi.h\r
11 //* Object              : External Bus Interface Definition File\r
12 //* Translator          : ARM Software Development Toolkit V2.11a\r
13 //*\r
14 //* 1.0 03/11/97 JCZ    : Creation\r
15 //* 2.0 21/10/98 JCZ    : Clean up\r
16 //*-----------------------------------------------------------------------------\r
17 \r
18 #ifndef ebi_h\r
19 #define ebi_h\r
20 \r
21 /*----------------------------------------*/\r
22 /* Memory Controller Interface Definition */\r
23 /*----------------------------------------*/\r
24 \r
25 typedef struct\r
26 {\r
27     at91_reg        EBI_CSR[8] ;        /* Chip Select Register */\r
28     at91_reg        EBI_RCR ;           /* Remap Control Register */\r
29     at91_reg        EBI_MCR ;           /* Memory Control Register */\r
30 } StructEBI ;\r
31 \r
32 /*-----------------------*/\r
33 /* Chip Select Registers */\r
34 /*-----------------------*/\r
35 \r
36 /* Data Bus Width */\r
37 #define DataBus16               (1<<0)\r
38 #define DataBus8                (2<<0)\r
39 #define DBW                     (3<<0)\r
40 \r
41 /* Number of Wait States */\r
42 #define B_NWS                   2\r
43 #define WaitState1              (0<<B_NWS)\r
44 #define WaitState2              (1<<B_NWS)\r
45 #define WaitState3              (2<<B_NWS)\r
46 #define WaitState4              (3<<B_NWS)\r
47 #define WaitState5              (4<<B_NWS)\r
48 #define WaitState6              (5<<B_NWS)\r
49 #define WaitState7              (6<<B_NWS)\r
50 #define WaitState8              (7<<B_NWS)\r
51 #define NWS                     (7<<B_NWS)\r
52 \r
53 /* Wait State Enable */\r
54 #define WaitStateDisable        (0<<5)\r
55 #define WaitStateEnable         (1<<5)\r
56 #define WSE                     (1<<5)\r
57 \r
58 /* Page size */\r
59 #define PageSize1M              (0<<7)\r
60 #define PageSize4M              (1<<7)\r
61 #define PageSize16M             (2<<7)\r
62 #define PageSize64M             (3<<7)\r
63 #define PAGES                   (3<<7)\r
64 \r
65 /* Number of Data Float Output Time Clock Cycle */\r
66 #define B_TDF                   9\r
67 #define tDF_0cycle              (0<<B_TDF)\r
68 #define tDF_1cycle              (1<<B_TDF)\r
69 #define tDF_2cycle              (2<<B_TDF)\r
70 #define tDF_3cycle              (3<<B_TDF)\r
71 #define tDF_4cycle              (4<<B_TDF)\r
72 #define tDF_5cycle              (5<<B_TDF)\r
73 #define tDF_6cycle              (6<<B_TDF)\r
74 #define tDF_7cycle              (7<<B_TDF)\r
75 #define TDF                     (7<<B_TDF)\r
76 \r
77 /* Byte Access Type */\r
78 #define ByteWriteAccessType (0<<12)\r
79 #define ByteSelectAccessType    (1<<12)\r
80 #define BAT                     1<<12)\r
81 \r
82 /* Chip Select Enable */\r
83 #define CSEnable                (1<<13)\r
84 #define CSDisable               (0<<13)\r
85 #define CSE                     (1<<13)\r
86 \r
87 #define BA                      ((u_int)(0xFFF)<<20)\r
88 \r
89 /*-------------------------*/\r
90 /* Memory Control Register */\r
91 /*-------------------------*/\r
92 \r
93 /* Address Line Enable */\r
94 #define ALE                     (7<<0)\r
95 #define BankSize16M             (0<<0)\r
96 #define BankSize8M              (4<<0)\r
97 #define BankSize4M              (5<<0)\r
98 #define BankSize2M              (6<<0)\r
99 #define BankSize1M              (7<<0)\r
100 \r
101 /* Data Read Protocol */\r
102 #define StandardReadProtocol    (0<<4)\r
103 #define EarlyReadProtocol       (1<<4)\r
104 #define DRP                     (1<<4)\r
105 \r
106 /*------------------------*/\r
107 /* Remap Control Register */\r
108 /*------------------------*/\r
109 \r
110 #define RCB                     (1<<0)\r
111 \r
112 /*--------------------------------*/\r
113 /* Device Dependancies Definition */\r
114 /*--------------------------------*/\r
115 \r
116 #ifdef AT91M40400\r
117 /* External Bus Interface User Interface BAse Address */\r
118 #define EBI_BASE            ((StructEBI *) 0xFFE00000)\r
119 #endif\r
120 \r
121 #endif /* ebi_h */\r