]> rtime.felk.cvut.cz Git - arc.git/blob - examples/pwm_node/config/Pwm_Cfg.c
Initial commit.
[arc.git] / examples / pwm_node / config / Pwm_Cfg.c
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.c\r
25  *\r
26  *  Created on: 2009-jul-09\r
27  *      Author: nian\r
28  */\r
29 \r
30 #include "Pwm.h"\r
31 #include "Pwm_Cfg.h"\r
32 \r
33 extern void MyPwmNotificationRoutine(void);\r
34 \r
35 const Pwm_ConfigType PwmConfig = {\r
36         .Channels = {\r
37                 PWM_CHANNEL_CONFIG(PWM_CHANNEL_1, 3000, 0x6000, PWM_CHANNEL_PRESCALER_4, PWM_HIGH),\r
38                 PWM_CHANNEL_CONFIG(PWM_CHANNEL_2, 2000, 0x2000, PWM_CHANNEL_PRESCALER_2, PWM_LOW)\r
39         },\r
40 #if PWM_NOTIFICATION_SUPPORTED==ON\r
41         .NotificationHandlers = {\r
42                         MyPwmNotificationRoutine, // PWM_CHANNEL_1\r
43                         NULL                      // PWM_CHANNEL_2\r
44         }\r
45 #endif\r
46 };\r