]> rtime.felk.cvut.cz Git - arc.git/blob - examples/pwm_node2/config/Pwm_Cfg.h
Initial commit.
[arc.git] / examples / pwm_node2 / config / Pwm_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 /*\r
24  * Pwm_Cfg.h\r
25  *\r
26  *  Created on: 2009-jul-09\r
27  *      Author: nian\r
28  */\r
29 \r
30 #ifndef PWM_CFG_H_\r
31 #define PWM_CFG_H_\r
32 \r
33 /****************************************************************************\r
34  * Global configuration options and defines\r
35  */\r
36 \r
37 #define ON 1\r
38 #define OFF 0\r
39 \r
40 /*\r
41  * PWM003: The detection of development errors is configurable (ON/OFF) at\r
42  * pre-compile time. The switch PwmDevErorDetect shall activate or disable\r
43  * the detection of all development errors\r
44  */\r
45 #define PWM_DEV_EROR_DETECT ON\r
46 #define PWM_GET_OUTPUT_STATE ON\r
47 #define PWM_STATICALLY_CONFIGURED OFF\r
48 #define PWM_NOTIFICATION_SUPPORTED ON\r
49 \r
50 #define PWM_SET_PERIOD_AND_DUTY ON\r
51 \r
52 /*\r
53  * PWM132: Switch for enabling the update of duty cycle parameter at the end\r
54  * of the current period.\r
55  *\r
56  * Note: Currently only ON mode is supported.\r
57  */\r
58 #define PWM_DUTYCYCLE_UPDATED_ENDPERIOD ON\r
59 \r
60 /****************************************************************************\r
61  * Not defined in AUTOSAR.\r
62  */\r
63 #define PWM_ISR_PRIORITY 1\r
64 #define PWM_PRESCALER 64\r
65 /*\r
66  * Setting to ON freezes the current output state of a PWM channel when in\r
67  * debug mode.\r
68  */\r
69 #define PWM_FREEZE_ENABLE ON\r
70 \r
71 /****************************************************************************\r
72  * Enumeration of channels\r
73  * Maps a symbolic name to a hardware channel\r
74  */\r
75 typedef enum {\r
76 #if defined(CFG_BRD_MPC5516IT)\r
77     PWM_CHANNEL_1 = 12,\r
78 \r
79 #elif defined(CFG_BRD_MPC5567QRTECH)\r
80     PWM_CHANNEL_1 = 10, /* Emios channel 10 maps to PCR189 which\r
81                          * is available on pin 54 of the\r
82                          * ERNI 154822 connector\r
83                          */\r
84     PWM_CHANNEL_2 = 12, /* Channel 12 goes to PCR191, also\r
85                          * available on the ERNI 154822 connector\r
86                          */\r
87 #else\r
88 #warning "Unknown board or CFG_BRD_* undefined"\r
89 #endif\r
90     PWM_NUMBER_OF_CHANNELS = 1,\r
91 } Pwm_NamedChannelsType;\r
92 \r
93 #endif /* PWM_CFG_H_ */\r