2 * Copyright Droids Corporation (2009)
3 * Olivier Matz <zer0@droids-corp.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * Revision : $Id: main.c,v 1.8 2009-05-02 10:08:09 zer0 Exp $
25 /********************** LEDs */
26 #define LED_TOGGLE(port, bit) do { \
27 if (port & _BV(bit)) \
34 #define LED1_PORT PORTE
37 #define LED2_PORT PORTE
40 #define LED3_PORT PORTB
43 #define LED1_ON() sbi(LED1_PORT, LED1_BIT)
44 #define LED1_OFF() cbi(LED1_PORT, LED1_BIT)
45 #define LED1_TOGGLE() LED1_TOGGLE(LED_PORT, LED1_BIT)
46 #define LED2_ON() sbi(LED2_PORT, LED2_BIT)
47 #define LED2_OFF() cbi(LED2_PORT, LED2_BIT)
48 #define LED2_TOGGLE() LED_TOGGLE(LED2_PORT, LED2_BIT)
49 #define LED3_ON() sbi(LED3_PORT, LED3_BIT)
50 #define LED3_OFF() cbi(LED3_PORT, LED3_BIT)
51 #define LED3_TOGGLE() LED_TOGGLE(LED3_PORT, LED3_BIT)
53 #define LED_PORT PORTD
58 #define LED1_ON() sbi(LED_PORT, LED1_BIT)
59 #define LED1_OFF() cbi(LED_PORT, LED1_BIT)
60 #define LED1_TOGGLE() LED_TOGGLE(LED_PORT, LED1_BIT)
61 #define LED2_ON() sbi(LED_PORT, LED2_BIT)
62 #define LED2_OFF() cbi(LED_PORT, LED2_BIT)
63 #define LED2_TOGGLE() LED_TOGGLE(LED_PORT, LED2_BIT)
64 #define LED3_ON() sbi(LED_PORT, LED3_BIT)
65 #define LED3_OFF() cbi(LED_PORT, LED3_BIT)
66 #define LED3_TOGGLE() LED_TOGGLE(LED_PORT, LED3_BIT)
71 char prompt[RDLINE_PROMPT_SIZE];
72 struct pwm_ng pwm_motor;
73 struct pid_filter pid;
78 extern struct beacon_tsop beacon_tsop;