]> rtime.felk.cvut.cz Git - arc.git/blob - boards/ti_tms570ls/config/Port_Cfg.h
More work on PORT driver for Cortex R4.
[arc.git] / boards / ti_tms570ls / config / Port_Cfg.h
1 /*\r
2  * Configuration of module Port (Port_Cfg.h)\r
3  *\r
4  * Created by: \r
5  * Configured for (MCU): TMS570\r
6  *\r
7  * Module vendor: ArcCore\r
8  * Module version: 2.0.2\r
9  *\r
10  * \r
11  * Generated by Arctic Studio (http://arccore.com) \r
12  *           on Fri Dec 10 08:23:08 CET 2010\r
13  */\r
14 \r
15
16 #if (PORT_SW_MAJOR_VERSION != 1) 
17 #error "Port: Configuration file version differs from BSW version."
18 #endif
19
20 \r
21 #ifndef PORT_CFG_H_\r
22 #define PORT_CFG_H_\r
23 \r
24 #include "Std_Types.h"\r
25 \r
26 \r
27 /** Build version info API */\r
28 #define PORT_VERSION_INFO_API                           STD_ON\r
29 /** Enable Development Error Trace */\r
30 #define PORT_DEV_ERROR_DETECT                           STD_ON\r
31 /** Build change pin direction API */\r
32 #define PORT_SET_PIN_DIRECTION_API              STD_ON\r
33 /** Allow Pin mode changes during runtime */\r
34 #define PORT_SET_PIN_MODE_API               STD_ON\r
35 \r
36 #define PORT_NUMBER_OF_PINS     10\r
37 \r
38 #define PORT_FUNC               (1 << 1)\r
39 #define PORT_FUNC_NO    (0 << 1)\r
40 #define PORT_PULL_NONE  (1 << 2)\r
41 #define PORT_PULL_UP    (1 << 3)\r
42 #define PORT_PULL_DOWN  (0 << 3)\r
43 #define PORT_ODE_ENABLE (1 << 4)\r
44 #define PORT_DIRECTION_CHANGEABLE (1 << 5)\r
45 \r
46 /** HW specific symbolic names of pins */\r
47 /** @req PORT013 */\r
48 typedef enum\r
49 {\r
50         PORT_PIN_DCAN1_TX = 0x0800,\r
51         PORT_PIN_DCAN1_RX = 0x0801,\r
52         PORT_PIN_DCAN2_TX = 0x0900,\r
53         PORT_PIN_DCAN2_RX = 0x0901,\r
54         PORT_PIN_DCAN3_TX = 0x0a00,\r
55         PORT_PIN_DCAN3_RX = 0x0a01,\r
56         PORT_PIN_GIOA0 = 0x0000,\r
57         PORT_PIN_GIOA3 = 0x0003,\r
58         PORT_PIN_GIOA4 = 0x0004,\r
59         PORT_PIN_GIOA5 = 0x0005,  \r
60 } Port_PinType;\r
61 \r
62 typedef struct {\r
63         Port_PinType pin;\r
64         uint8 conf;\r
65 } Port_ConfiguredPinType;\r
66 \r
67 /** Top level configuration container */\r
68 /** @req PORT073 */\r
69 typedef struct\r
70 {\r
71   const Port_ConfiguredPinType pins[PORT_NUMBER_OF_PINS];\r
72 } Port_ConfigType;\r
73 \r
74 /** Instance of the top level configuration container */\r
75 extern const Port_ConfigType PortConfigData;\r
76 \r
77 \r
78 #endif /*PORT_CFG_H_*/\r