remove CVS
[aversive.git] / projects / microb2009 / tests / atm2560 / main.h
1 /*  
2  *  Copyright Droids Corporation (2008)
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: main.h,v 1.1 2009-02-20 21:10:01 zer0 Exp $
19  *
20  */
21
22 #define LED1_ON()       sbi(PORTJ, 2)
23 #define LED1_OFF()      cbi(PORTJ, 2)
24
25 #define LED2_ON()       sbi(PORTJ, 3)
26 #define LED2_OFF()      cbi(PORTJ, 3)
27
28 #define ARM_MOT_PWM     (&arm.pwm1A)
29 #define ARM_ENC         ((void *)0)
30
31 #define LED_PRIO           170
32 #define TIME_PRIO          160
33 #define CS_PRIO            150
34
35 struct arm {
36 #define CS_ON 1
37         uint8_t flags;
38         struct cs cs_mot;
39         struct pid_filter pid_mot;
40         struct quadramp_filter qr_mot;
41
42         /* motors */
43         struct pwm_ng pwm1_2A;
44         struct pwm_ng pwm2_1A;
45         struct pwm_ng pwm3_1B;
46         struct pwm_ng pwm4_1C;
47
48         /* servos */
49         struct pwm_ng servo1;
50         struct pwm_ng servo2;
51         struct pwm_ng servo3;
52         struct pwm_ng servo4;
53         struct pwm_ng servo5;
54         struct pwm_ng servo6;
55 };
56
57 extern struct arm arm;