vt100: include pgmspace.h as we use PROGMEM macro
[aversive.git] / projects / microb2009 / tests / arm_test / pwm_config.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2005)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id: pwm_config.h,v 1.2 2009-01-23 23:10:25 zer0 Exp $
19  *
20  */
21
22 /* Droids-corp, Eirbot, Microb Technology 2005 - Zer0
23  * Config for PWM
24  */
25
26 #ifndef _PWM_CONFIG_
27 #define _PWM_CONFIG_
28
29 #define _PWM_CONFIG_VERSION_ 2
30
31 /* Which PWM are enabled ? */
32 #define PWM1A_ENABLED
33 #define PWM1B_ENABLED
34 /* #define PWM1C_ENABLED */
35 /* #define PWM3A_ENABLED */
36 /* #define PWM3B_ENABLED */
37 #define PWM3C_ENABLED
38
39 /** max value for PWM entry, default 12 bits > 4095 */
40 #define PWM_SIGNIFICANT_BITS 12
41
42 #define TIMER1_MODE     TIMER_16_MODE_PWM_10
43 #define TIMER1_PRESCALE TIMER1_PRESCALER_DIV_1
44
45 #define TIMER3_MODE     TIMER_16_MODE_PWM_10
46 #define TIMER3_PRESCALE TIMER3_PRESCALER_DIV_1
47
48
49 #define PWM1A_MODE       (PWM_SIGNED // | PWM_SIGN_INVERTED)
50 #define PWM1A_SIGN_PORT  PORTB
51 #define PWM1A_SIGN_BIT   0
52
53 #define PWM1B_MODE       (PWM_SIGNED)
54 #define PWM1B_SIGN_PORT  PORTB
55 #define PWM1B_SIGN_BIT   1
56
57 #define PWM3C_MODE       (PWM_SIGNED) /* left */
58 #define PWM3C_SIGN_PORT  PORTE
59 #define PWM3C_SIGN_BIT   4
60
61 /* #define PWM2_MODE       (PWM_SIGNED) */
62 /* #define PWM2_SIGN_PORT  PORTB */
63 /* #define PWM2_SIGN_BIT   2 */
64
65 #endif
66