]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc5516it/examples/led_rte/config/Port_Cfg.h
mpc5516, updated examples.
[arc.git] / boards / mpc5516it / examples / led_rte / config / Port_Cfg.h
1 /*\r
2 * Configuration of module: Port (Port_Cfg.h)\r
3 *\r
4 * Created by:              \r
5 * Copyright:               \r
6 *\r
7 * Configured for (MCU):    MPC551x\r
8 *\r
9 * Module vendor:           ArcCore\r
10 * Generator version:       2.0.2\r
11 *\r
12 * Generated by Arctic Studio (http://arccore.com) \r
13 */\r
14 \r
15
16 #if !(((PORT_SW_MAJOR_VERSION == 1) && (PORT_SW_MINOR_VERSION == 0)) )
17 #error Port: Configuration file expected BSW module version to be 1.0.*
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 #define PORT_VERSION_INFO_API                           STD_ON\r
27 #define PORT_DEV_ERROR_DETECT                           STD_ON\r
28 #define PORT_SET_PIN_MODE_API                           STD_ON\r
29 #define PORT_SET_PIN_DIRECTION_API              STD_ON\r
30 \r
31 #define         PORT_BIT0                       (1<<15)\r
32 #define         PORT_BIT1                       (1<<14)\r
33 #define         PORT_BIT2                       (1<<13)\r
34 #define         PORT_BIT3                       (1<<12)\r
35 #define         PORT_BIT4                       (1<<11)\r
36 #define         PORT_BIT5                       (1<<10)\r
37 #define         PORT_BIT6                       (1<<9)\r
38 #define         PORT_BIT7                       (1<<8)\r
39 #define         PORT_BIT8                       (1<<7)\r
40 #define         PORT_BIT9                       (1<<6)\r
41 #define         PORT_BIT10                      (1<<5)\r
42 #define         PORT_BIT11                      (1<<4)\r
43 #define         PORT_BIT12                      (1<<3)\r
44 #define         PORT_BIT13                      (1<<2)\r
45 #define         PORT_BIT14                      (1<<1)\r
46 #define         PORT_BIT15                      (1<<0)\r
47 \r
48 #define         PORT_WPE_BIT            PORT_BIT14\r
49 #define         PORT_WPS_BIT            PORT_BIT15\r
50 #define         PORT_SRC0                       PORT_BIT12\r
51 #define         PORT_SRC1                       PORT_BIT13\r
52 \r
53 #define         PORT_PULL_UP            (PORT_WPE_BIT|PORT_WPS_BIT)\r
54 #define         PORT_PULL_DOWN          (PORT_WPE_BIT)\r
55 #define         PORT_PULL_NONE          0\r
56 #define         PORT_SLEW_RATE_MIN      0\r
57 #define         PORT_SLEW_RATE_MED      PORT_BIT13\r
58 #define         PORT_SLEW_RATE_MAX      (PORT_BIT12|PORT_BIT13)\r
59 #define         PORT_HYS_ENABLE         PORT_BIT11\r
60 #define         PORT_ODE_ENABLE         PORT_BIT10\r
61 #define         PORT_IBE_ENABLE         PORT_BIT7\r
62 #define         PORT_OBE_ENABLE         PORT_BIT6\r
63 #define         PORT_IO                         (0)\r
64 #define         PORT_GPIO_APC           PORT_BIT2\r
65 #define         PORT_FUNC0                      (0)\r
66 #define         PORT_FUNC1                      (PORT_BIT5)\r
67 #define         PORT_FUNC2                      (PORT_BIT4)\r
68 #define         PORT_FUNC3                      (PORT_BIT4|PORT_BIT5)\r
69 #define         PORT_FUNC4                      (PORT_BIT3)\r
70 \r
71 #define         PORT_PCR_RESET          (0)\r
72 #define         PORT_GPDO_RESET         (0)\r
73 \r
74 #define         PORT_GPDO_HIGH          (1)\r
75 \r
76 \r
77 typedef uint16 Port_PinType;\r
78 \r
79 typedef struct\r
80 {\r
81         uint16_t padCnt;\r
82         const uint16_t *padConfig;\r
83         uint16_t outCnt;\r
84         const uint8_t *outConfig;\r
85 //      uint16_t inCnt;\r
86 //      const uint8_t *inConfig;\r
87 } Port_ConfigType;\r
88 \r
89 extern const Port_ConfigType PortConfigData;\r
90 \r
91 #define PORT_PIN_NAME_PD4               52      \r
92 #define PORT_PIN_NAME_PD5               53      \r
93 \r
94 #endif /* PORT_CFG_H_ */\r