]> rtime.felk.cvut.cz Git - arc.git/blob - examples/switch_node/config/Port_Cfg.h
Initial commit.
[arc.git] / examples / switch_node / config / Port_Cfg.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16
17
18
19
20
21
22
23 /* 
24 * Module vendor:  Autocore
25 * Module version: 1.0.0
26 * Specification: Autosar v3.0.1, Final
27 *
28 */
29
30 // File generated on Mon Aug 17 14:11:22 CEST 2009\r
31 // File generated by org.autocore.modules.port.mpc5516\r
32 \r
33 #ifndef PORT_CFG_H_\r
34 #define PORT_CFG_H_\r
35 \r
36 #include "Std_Types.h"\r
37 \r
38 #define PORT_VERSION_INFO_API                           STD_ON\r
39 #define PORT_DEV_ERROR_DETECT                           STD_ON\r
40 #define PORT_PIN_DIRECTION_CHANGES_ALLOWED      STD_ON\r
41 \r
42 #define         BIT0                    (1<<15)\r
43 #define         BIT1                    (1<<14)\r
44 #define         BIT2                    (1<<13)\r
45 #define         BIT3                    (1<<12)\r
46 #define         BIT4                    (1<<11)\r
47 #define         BIT5                    (1<<10)\r
48 #define         BIT6                    (1<<9)\r
49 #define         BIT7                    (1<<8)\r
50 #define         BIT8                    (1<<7)\r
51 #define         BIT9                    (1<<6)\r
52 #define         BIT10                   (1<<5)\r
53 #define         BIT11                   (1<<4)\r
54 #define         BIT12                   (1<<3)\r
55 #define         BIT13                   (1<<2)\r
56 #define         BIT14                   (1<<1)\r
57 #define         BIT15                   (1<<0)\r
58 \r
59 #define         WPE_BIT                 BIT14\r
60 #define         WPS_BIT                 BIT15\r
61 #define         SRC0                    BIT12\r
62 #define         SRC1                    BIT13\r
63 \r
64 #define         PULL_UP                 (WPE_BIT|WPS_BIT)\r
65 #define         PULL_DOWN               (WPE_BIT)\r
66 #define         PULL_NONE               0\r
67 #define         SLEW_RATE_MIN   0\r
68 #define         SLEW_RATE_MED   BIT13\r
69 #define         SLEW_RATE_MAX   (BIT12|BIT13)\r
70 #define         HYS_ENABLE              BIT11\r
71 #define         ODE_ENABLE              BIT10\r
72 #define         IBE_ENABLE              BIT7\r
73 #define         OBE_ENABLE              BIT6\r
74 #define         PA_IO                   (0)\r
75 #define         PA_FUNC0                (0)\r
76 #define         PA_FUNC1                (BIT5)\r
77 #define         PA_FUNC2                (BIT4)\r
78 #define         PA_FUNC3                (BIT4|BIT5)\r
79 #define         PA_FUNC4                (BIT3)\r
80 \r
81 #define         PCR_RESET               (0)\r
82 #define         GPDO_RESET              (0)\r
83 \r
84 #define         GPDO_HIGH               (1)\r
85 \r
86 // Could also use an enum to name the pins here\r
87 typedef int Port_PinType;\r
88 \r
89 typedef struct\r
90 {\r
91         uint16_t padCnt;\r
92         const uint16_t *padConfig;\r
93         uint16_t outCnt;\r
94         const uint8_t *outConfig;\r
95 //      uint16_t inCnt;\r
96 //      const uint8_t *inConfig;\r
97 } Port_ConfigType;\r
98 \r
99 extern const Port_ConfigType PortConfigData;\r
100 \r
101 #endif /*PORT_CFG_H_*/\r