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