tux-droid-svn Mailing List for Tux Droid CE (Page 222)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Paul_R <c2m...@c2...> - 2007-09-05 11:58:09
|
Author: Paul_R Date: 2007-09-05 13:58:09 +0200 (Wed, 05 Sep 2007) New Revision: 480 Added: firmware/tuxaudio/branches/audio_cleanup/ Log: Added a new branch for refactoring the audio and flash sections. Copied: firmware/tuxaudio/branches/audio_cleanup (from rev 479, firmware/tuxaudio/trunk) |
From: jaguarondi <c2m...@c2...> - 2007-09-05 09:45:42
|
Author: jaguarondi Date: 2007-09-05 11:45:34 +0200 (Wed, 05 Sep 2007) New Revision: 479 Modified: firmware/tuxcore/trunk/Doxyfile firmware/tuxcore/trunk/Makefile firmware/tuxcore/trunk/bootloader.c firmware/tuxcore/trunk/communication.c firmware/tuxcore/trunk/communication.h firmware/tuxcore/trunk/config.c firmware/tuxcore/trunk/config.h firmware/tuxcore/trunk/global.c firmware/tuxcore/trunk/global.h firmware/tuxcore/trunk/i2c.c firmware/tuxcore/trunk/i2c.h firmware/tuxcore/trunk/ir.c firmware/tuxcore/trunk/ir.h firmware/tuxcore/trunk/led.c firmware/tuxcore/trunk/led.h firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/motors.h firmware/tuxcore/trunk/parser.c firmware/tuxcore/trunk/parser.h firmware/tuxcore/trunk/sensors.c firmware/tuxcore/trunk/sensors.h firmware/tuxcore/trunk/standalone.c firmware/tuxcore/trunk/standalone.h firmware/tuxcore/trunk/svnrev.tmpl.h firmware/tuxcore/trunk/version.h Log: * Added license headers in Doxyfile and Makefile. * Corrected the subversion $Id:$ keyword in all files, the end $ was missing. Modified: firmware/tuxcore/trunk/Doxyfile =================================================================== --- firmware/tuxcore/trunk/Doxyfile 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/Doxyfile 2007-09-05 09:45:34 UTC (rev 479) @@ -1,5 +1,25 @@ -# Doxyfile 1.5.2 +# Doxyfile 1.5.2 - Doxygen configuration file for TUXCORE +# +# TUXCORE - Firmware for the 'core' CPU of tuxdroid +# Copyright (C) 2007 C2ME S.A. <tux...@c2...> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# $Id:$ + # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/Makefile 2007-09-05 09:45:34 UTC (rev 479) @@ -1,5 +1,25 @@ -# Makefile for the 'core' CPU of Tux Droid +# Makefile - GNU Makefile for TUXCORE +# +# TUXCORE - Firmware for the 'core' CPU of tuxdroid +# Copyright (C) 2007 C2ME S.A. <tux...@c2...> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# $Id:$ + ## General Flags PROJECT = tuxcore MCU = atmega88 Modified: firmware/tuxcore/trunk/bootloader.c =================================================================== --- firmware/tuxcore/trunk/bootloader.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/bootloader.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/io.h> #include <avr/boot.h> Modified: firmware/tuxcore/trunk/communication.c =================================================================== --- firmware/tuxcore/trunk/communication.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/communication.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxcore/trunk/communication.h =================================================================== --- firmware/tuxcore/trunk/communication.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/communication.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef COMMUNICATION_H #define COMMUNICATION_H Modified: firmware/tuxcore/trunk/config.c =================================================================== --- firmware/tuxcore/trunk/config.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/config.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/eeprom.h> #include "common/config.h" Modified: firmware/tuxcore/trunk/config.h =================================================================== --- firmware/tuxcore/trunk/config.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/config.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef CONFIG_H #define CONFIG_H Modified: firmware/tuxcore/trunk/global.c =================================================================== --- firmware/tuxcore/trunk/global.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/global.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <inttypes.h> #include <avr/io.h> Modified: firmware/tuxcore/trunk/global.h =================================================================== --- firmware/tuxcore/trunk/global.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/global.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef GLOBAL_H #define GLOBAL_H Modified: firmware/tuxcore/trunk/i2c.c =================================================================== --- firmware/tuxcore/trunk/i2c.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/i2c.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxcore/trunk/i2c.h =================================================================== --- firmware/tuxcore/trunk/i2c.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/i2c.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef I2C_H #define I2C_H Modified: firmware/tuxcore/trunk/ir.c =================================================================== --- firmware/tuxcore/trunk/ir.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/ir.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/interrupt.h> #include <avr/io.h> Modified: firmware/tuxcore/trunk/ir.h =================================================================== --- firmware/tuxcore/trunk/ir.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/ir.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef IR_H #define IR_H Modified: firmware/tuxcore/trunk/led.c =================================================================== --- firmware/tuxcore/trunk/led.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/led.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include "global.h" #include "led.h" Modified: firmware/tuxcore/trunk/led.h =================================================================== --- firmware/tuxcore/trunk/led.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/led.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ /** \defgroup led Leds Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/main.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ /** \file main.c \brief Tuxcore main functions Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/motors.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/interrupt.h> #include <avr/io.h> Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/motors.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ /** \defgroup movements Movements Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/parser.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxcore/trunk/parser.h =================================================================== --- firmware/tuxcore/trunk/parser.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/parser.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef PARSER_H #define PARSER_H Modified: firmware/tuxcore/trunk/sensors.c =================================================================== --- firmware/tuxcore/trunk/sensors.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/sensors.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/interrupt.h> #include <avr/io.h> Modified: firmware/tuxcore/trunk/sensors.h =================================================================== --- firmware/tuxcore/trunk/sensors.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/sensors.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef SENSORS_H #define SENSORS_H Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/standalone.c 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxcore/trunk/standalone.h =================================================================== --- firmware/tuxcore/trunk/standalone.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/standalone.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef STANDALONE_H #define STANDALONE_H Modified: firmware/tuxcore/trunk/svnrev.tmpl.h =================================================================== --- firmware/tuxcore/trunk/svnrev.tmpl.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/svnrev.tmpl.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ /* This file is a template to generate svnrev.h automatically. * SubWCRev performs keyword susbstitution whith SVN information. Modified: firmware/tuxcore/trunk/version.h =================================================================== --- firmware/tuxcore/trunk/version.h 2007-09-05 09:17:54 UTC (rev 478) +++ firmware/tuxcore/trunk/version.h 2007-09-05 09:45:34 UTC (rev 479) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id$ */ #ifndef VERSION_H #define VERSION_H |
From: jaguarondi <c2m...@c2...> - 2007-09-05 09:18:40
|
Author: jaguarondi Date: 2007-09-05 11:17:54 +0200 (Wed, 05 Sep 2007) New Revision: 478 Modified: firmware/tuxcore/trunk/fifo.c firmware/tuxcore/trunk/fifo.h Log: * Restored the license headers on the fifo module. Modified: firmware/tuxcore/trunk/fifo.c =================================================================== --- firmware/tuxcore/trunk/fifo.c 2007-09-04 08:18:27 UTC (rev 477) +++ firmware/tuxcore/trunk/fifo.c 2007-09-05 09:17:54 UTC (rev 478) @@ -1,10 +1,24 @@ /* - * Copyright (c) 2006, C2ME S.A. - * All rights reserved. + * TUXCORE - Firmware for the 'core' CPU of tuxdroid + * Copyright (C) 2007 C2ME S.A. <tux...@c2...> * - * $Id$ + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* $Id$ */ + #include <inttypes.h> #include "fifo.h" Modified: firmware/tuxcore/trunk/fifo.h =================================================================== --- firmware/tuxcore/trunk/fifo.h 2007-09-04 08:18:27 UTC (rev 477) +++ firmware/tuxcore/trunk/fifo.h 2007-09-05 09:17:54 UTC (rev 478) @@ -1,10 +1,24 @@ /* - * Copyright (c) 2006, C2ME S.A. - * All rights reserved. + * TUXCORE - Firmware for the 'core' CPU of tuxdroid + * Copyright (C) 2007 C2ME S.A. <tux...@c2...> * - * $Id$ + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* $Id$ */ + #ifndef _FIFO_H_ #define _FIFO_H_ |
From: Paul_R <c2m...@c2...> - 2007-09-04 08:18:57
|
Author: Paul_R Date: 2007-09-04 10:18:27 +0200 (Tue, 04 Sep 2007) New Revision: 477 Modified: firmware/tuxcore/trunk/led.c firmware/tuxcore/trunk/led.h firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/standalone.c Log: Fix bugs #6 & #9 All the leds commands are buffered before to be applied on the output port. This allows user to change the leds status when the eyes are closed. - Added a buffer (led_backup) to store the last leds state. - Added a function (setLeds) to refresh the output port with the value of 'led_backup'. Modified: firmware/tuxcore/trunk/led.c =================================================================== --- firmware/tuxcore/trunk/led.c 2007-09-03 14:57:56 UTC (rev 476) +++ firmware/tuxcore/trunk/led.c 2007-09-04 08:18:27 UTC (rev 477) @@ -23,7 +23,17 @@ #include "led.h" uint8_t led_delay, led_blinking_pw, led_blinking_cnt; /* led blinking registers */ +/** + \brief blinkLeds function + \ingroup led + \param cnt number of blinks before stop + \param pulse_width blink frequency + + The eyes will start until 'cnt' blink are executed. 'cnt' can be up to 256. + 'pulse_width' can be used to change the blink frequency. + */ + void blinkLeds(uint8_t cnt, uint8_t pulse_width) { if (led_delay) /* cancel the blink if one is already happening */ @@ -38,3 +48,32 @@ led_blinking_pw = pulse_width; led_blinking_cnt = cnt; } + +/** + \brief Refresh led port \ingroup led + + \param mk Temp variable used to store the leds status. + + This function check the value of mk for both leds, and puts the value into the + output port. + + When the eyes are closed, the leds are switched off. To make possible to + change the leds status during the eyes are closed, the value is buffered. A + reveived command when the eyes are closed will be applied when the eyes + will reopened. + + This function is called when eyes are opened, and they're not blinking. + */ + +void setLeds(uint8_t mk) +{ + if (mk & LED_R_MK) + LED_PT |= LED_R_MK; + else + LED_PT &= ~LED_R_MK; + + if (mk & LED_L_MK) + LED_PT |= LED_L_MK; + else + LED_PT &= ~LED_L_MK; +} Modified: firmware/tuxcore/trunk/led.h =================================================================== --- firmware/tuxcore/trunk/led.h 2007-09-03 14:57:56 UTC (rev 476) +++ firmware/tuxcore/trunk/led.h 2007-09-04 08:18:27 UTC (rev 477) @@ -19,6 +19,21 @@ /* $Id: */ +/** \defgroup led Leds + + The led module contains all the function necessary to drive eyes leds and + manage the remote control. +*/ + +/** \file led.h + \ingroup movements +*/ + +/** \file led.c + \ingroup movements +*/ + + #ifndef LED_H #define LED_H @@ -27,49 +42,64 @@ /** \brief Turn both LEDs on \ingroup led + */ -#define turnLedsOn() (LED_PT |= LED_MK) +#define turnLedsOn() (led_backup |= LED_MK) /** \brief Turn both LEDs off \ingroup led + + This declaration is used to switch off the led when the eyes are opened. + + It may be used everywhere when the eyes must be off. */ -#define turnLedsOff() (LED_PT &= ~LED_MK) +#define turnLedsOff() (led_backup &= ~LED_MK) /** + \brief Turn both LEDs off when eyes are closed + \ingroup led + + This declaration is used to switch off the leds when eyes are closed. In + this case, led_backup must not be changed. + If not, the last value will be + lost, and the led status will not be restored when the eyes will be + reopened. + + \note This declaration is used only in the standalone_behavior.c. It souldn't + be used elsewhere. + */ +#define turnLedsOffbEyes() (LED_PT &= ~LED_MK) + +/** \brief Turn left LED on \ingroup led */ -#define turnLeftLedOn() (LED_PT |= LED_L_MK) +#define turnLeftLedOn() (led_backup |= LED_L_MK) /** \brief Turn right LED on \ingroup led */ -#define turnRightLedOn() (LED_PT |= LED_R_MK) +#define turnRightLedOn() (led_backup |= LED_R_MK) /** \brief Turn left LED off \ingroup led */ -#define turnLeftLedOff() (LED_PT &= ~LED_L_MK) +#define turnLeftLedOff() (led_backup &= ~LED_L_MK) /** \brief Turn right LED off \ingroup led */ -#define turnRightLedOff() (LED_PT &= ~LED_R_MK) +#define turnRightLedOff() (led_backup &= ~LED_R_MK) /** \brief read led's status \ingroup led */ #define readLeds() (LED_PIN & LED_MK) -/** - \brief set led's status - \ingroup led - */ -#define setLeds(mk) (LED_PT |= mk) /** \brief blink leds @@ -80,23 +110,29 @@ The result looks like a blinking of the leds. */ void blinkLeds(uint8_t cnt, uint8_t pulse_width); - +void setLeds (uint8_t mk); /** \brief toggle leds \ingroup led + + The led_toggle command is bufferised to prevent a bug : + + Without this buffer, if an odd number of blink is received, the leds will blink, but at the end of this sequence, the previous state (stored before the blinking sequence) is restored. + + The visible result is that tux has executed an even number of blink. */ -#define toggleLeds() (LED_PT ^= LED_MK) +#define toggleLeds() (led_backup ^= LED_MK) /** \brief toggle left led \ingroup led */ -#define toggleLeftLed() (LED_PT ^= LED_L_MK) +#define toggleLeftLed() (led_backup ^= LED_L_MK) /** \brief toggle right led \ingroup led */ -#define toggleRightLed() (LED_PT ^= LED_R_MK) +#define toggleRightLed() (led_backup ^= LED_R_MK) #endif Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-09-03 14:57:56 UTC (rev 476) +++ firmware/tuxcore/trunk/motors.c 2007-09-04 08:18:27 UTC (rev 477) @@ -117,6 +117,11 @@ */ ISR(SIG_PIN_CHANGE2) { + if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) + cond_flags.eyes_closed = 1; + else + cond_flags.eyes_closed = 0; + if (eyesPosCnt) { eyesPosCnt--; @@ -125,11 +130,7 @@ stopEyes(); runIEyes(); eyesStpCnt = EYES_ICLOSE_DLY; - if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) - cond_flags.eyes_closed = 1; - else - cond_flags.eyes_closed = 0; - } + } } } Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-09-03 14:57:56 UTC (rev 476) +++ firmware/tuxcore/trunk/standalone.c 2007-09-04 08:18:27 UTC (rev 477) @@ -188,24 +188,6 @@ irSendRC5(0x04, tux_ir_id); ir_send_flg = 0; } - - /* Turn off the leds when the eyes are closed */ - if (tux_config.led_off_when_closed_eyes) - { - if (test_mode) - return; - if (cond_flags.eyes_closed) - { - if (!led_backup) - led_backup = readLeds(); - turnLedsOff(); - } - else if (led_backup) - { - setLeds(led_backup); - led_backup = 0; - } - } } void standalone_behavior(void) @@ -218,6 +200,11 @@ if (!event_timer) eventTriggering(); + if (cond_flags.eyes_closed) + turnLedsOffbEyes(); + else + setLeds(led_backup); + if ((!test_mode) || (test_mode == BT_REMOTE)) { /* Disable spinning when plugged */ |
From: jaguarondi <c2m...@c2...> - 2007-09-03 14:57:59
|
Author: jaguarondi Date: 2007-09-03 16:57:56 +0200 (Mon, 03 Sep 2007) New Revision: 476 Added: firmware/tuxaudio/tags/0.3.0/ firmware/tuxcore/tags/0.3.0/ Log: * TAG: v0.3.0 of tuxcore and tuxaudio. These early versions were released for the production of February 2007. Copied: firmware/tuxaudio/tags/0.3.0 (from rev 70, firmware/tuxaudio/trunk) Property changes on: firmware/tuxaudio/tags/0.3.0 ___________________________________________________________________ Name: svn:externals + common -r 70 http://svn.tuxisalive.com/firmware/tuxdefs Copied: firmware/tuxcore/tags/0.3.0 (from rev 70, firmware/tuxcore/trunk) Property changes on: firmware/tuxcore/tags/0.3.0 ___________________________________________________________________ Name: svn:externals + common -r 70 http://svn.tuxisalive.com/firmware/tuxdefs |
From: Paul_R <c2m...@c2...> - 2007-09-03 09:19:12
|
Author: Paul_R Date: 2007-09-03 09:42:36 +0200 (Mon, 03 Sep 2007) New Revision: 475 Modified: firmware/tuxcore/trunk/motors.c Log: Fix bug #7 : open/close eyes command Addied some tests to know the eyes position (open / close / unknown), and to execute the correct movement. Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-08-31 09:52:42 UTC (rev 474) +++ firmware/tuxcore/trunk/motors.c 2007-09-03 07:42:36 UTC (rev 475) @@ -106,9 +106,10 @@ When the signal is switching from high to low (switch pushed), the eyes are closed. Due to the mechanical properties of the head gearbox, as soon as the signal rises from low to high the eyes are considered opened + \note Only the eyes_closed_switch trig the interruption. - So we count when the switch is pushed (eyes closed) and when the switch is - released (eyes opened) to know the number of movements that occurs + So we count when the switch is pushed (eyes closed) and when the switch is + released (eyes opened) to know the number of movements that occurs The movement counter eyesPosCnt is decreased and when null, the head motor is switched backwards and will be stopped by timer0 overflow after the @@ -334,12 +335,12 @@ The condition to lower the wings is that they aren't already in the lower position. If this condition is respected, a single movement is executed by the waveWings function. - If the wings was in the lower position and has been raised manually, the wings can't be lowered directly. - They must pass by the high position (raiseWings function) before being able to be lowered. + If the wings was in the lower position and has been raised manually, the wings can't be lowered directly. They must pass by the high position + (raiseWings function) before being able to be lowered. - \note Implement conditions to be able to lower wings without pass by the high position increase code size and complicate the code. - This implementation need to toggle the motor sense when two or more same commands are repeated. - The mecanical position when the motor is switched off is important. So, the braking delay couldn't be the same in both sense. + \note Implement conditions to be able to lower wings without pass by the high position increase code size and complicate the code. This implementation + need to toggle the motor sense when two or more same commands are repeated. + The mecanical position when the motor is switched off is important. So, the braking delay couldn't be the same in both sense. */ void lowerWings(void) @@ -370,11 +371,31 @@ \ingroup eyes Open the eyes if they are closed. + + The eyes can be in three different states and should have a different behavior in all states. + - Eyes opened - no movement is required. + - Eyes closed - Just one movement is required to open the eyes. + - indeterminated - two movements are required. + + To prevent that the motor can be activated when the eyes are opened and to + stop the eyes in the open state by sending the open_eyes_cmd when they're + blinking, eyesPosCnt is initalised but the blinkEyes function isn't call. + If the motor is running, it will execute two movements before stop. If the motor + isn't switched on, nothing happens. + + \note XXX The computer side (API, daemon) must know than eyesPosCnt can be + not null with the motor switched off. */ void openEyes(void) { - if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) + if ((PSW_EYES_PIN & PSW_EYES_O_MK) && (PSW_EYES_PIN & PSW_EYES_C_MK)) + blinkEyes(2); + + else if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) blinkEyes(1); + + else + eyesPosCnt = 2; } /** @@ -382,11 +403,20 @@ \ingroup eyes Close the eyes if they are opened. + + When the close_eyes_cmd is received, if the eyes are closed, nothing happens. + But, when the eyes are blinking, this command must stop the eyes in the + closed position. To do this, eyesPosCnt is initialised, but the blinkEyes + function isn't call. So, if the command is received when the eyes are + blinking, two movements are executed before the motor is stopped. */ void closeEyes(void) { if (PSW_EYES_PIN & PSW_EYES_C_MK) blinkEyes(1); + + else + eyesPosCnt = 2; } /** |
From: Paul_R <c2m...@c2...> - 2007-08-31 09:52:46
|
Author: Paul_R Date: 2007-08-31 11:52:42 +0200 (Fri, 31 Aug 2007) New Revision: 474 Modified: firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/motors.h Log: Add doxygen comments to the flippers functions. Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-08-31 07:12:08 UTC (rev 473) +++ firmware/tuxcore/trunk/motors.c 2007-08-31 09:52:42 UTC (rev 474) @@ -37,7 +37,7 @@ /** \brief Wings position interrupt - \ingroup wings + \ingroup flippers This interrupt stops the wings when the desired number of movements have been executed. In order to stop the wings quickly and block the motor, we need to @@ -266,16 +266,16 @@ } /** - \brief Start waving the wings up and down - \ingroup wings - \param cnt number of movements before the wings will stop - \param pwm pwm value between 1 (slow) and 5 (fast) + \brief Start waving the wings up and down \ingroup flippers \param cnt + number of movements before the wings will stop \param pwm pwm value between + 1 (slow) and 5 (fast) - The wings will start waving until 'cnt' movements are executed. A movement is - raising or lowering the wings. 'cnt' can be up to 256. If 'cnt' is null, waving will run indefinitely. - pwm can be used to change the speed of the motor although it's more directed - to the power delivered to the motor. It's possible that the smallest values - won't deliver enough power to even start the motor. + The wings will start waving until 'cnt' movements are executed. A movement + is raising or lowering the wings. 'cnt' can be up to 256. If 'cnt' is null, + waving will run indefinitely. pwm can be used to change the speed of the + motor although it's more directed to the power delivered to the motor. It's + possible that the smallest values won't deliver enough power to even start + the motor. */ void waveWings(uint8_t cnt, uint8_t pwm) { @@ -285,6 +285,15 @@ MOT_WINGS_BW_PT &= ~MOT_WINGS_BW_MK; wingsPwmMask |= MOT_WINGS_FW_MK; } +/** + \brief Reset wings + \ingroup flippers + + This function reset the wings position. wings_tim is used to determine the + wings positions. Times needed to raise or lower the wings are not the same. + If two movements are executed, wings_tim allow to determine the shorter + time, and then to know if wings are up or low. + */ void resetWings(void) { @@ -294,15 +303,23 @@ /** - \brief Raise wings - \ingroup wings - \param none + \brief Raise wings \ingroup flippers + + The condition to raise the wings is that they aren't already in the upper + position. If this condition is respected, a single movement is executed by + the waveWings function. - The condition to raise the wings is that they aren't already in the upper position. - If this condition is respected, a single movement is executed by the waveWings function. - Note : if the wings was in the higher position and has been lowered manually, the wings can't be raised directly. - They must pass by the low position (lowerWings function) before being able to be raised. - */ + If the wings was in the higher position and has been lowered manually, the + wings can't be raised directly. They must pass by the low position + (lowerWings function) before being able to be raised. + + \note Implement conditions to be able to raise wings without pass by the low + position increase code size and complicate the code. This implementation + need to toggle the motor sense when two or more same commands are repeated. + The mecanical position when the motor is switched off is important. So, the + braking delay couldn't be the same in both sense. + */ + void raiseWings(void) { if (gStatus.pos == 0) @@ -312,12 +329,18 @@ /** \brief Lower wings - \ingroup wings + \ingroup flippers The condition to lower the wings is that they aren't already in the lower position. If this condition is respected, a single movement is executed by the waveWings function. - Note : if the wings was in the lower position and has been raised manually, the wings can't be lowered directly. + + If the wings was in the lower position and has been raised manually, the wings can't be lowered directly. They must pass by the high position (raiseWings function) before being able to be lowered. + + \note Implement conditions to be able to lower wings without pass by the high position increase code size and complicate the code. + This implementation need to toggle the motor sense when two or more same commands are repeated. + The mecanical position when the motor is switched off is important. So, the braking delay couldn't be the same in both sense. + */ void lowerWings(void) { Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-08-31 07:12:08 UTC (rev 473) +++ firmware/tuxcore/trunk/motors.h 2007-08-31 09:52:42 UTC (rev 474) @@ -19,6 +19,42 @@ /* $Id: */ +/** \defgroup movements Movements + + The motor module contains all the functions necessery to control the movements of tux. +*/ + +/** \defgroup eyes Eyes + \ingroup movements + + This group contains all the functions to control the eyes. +*/ + +/** \defgroup mouth Mouth + \ingroup movements + + This group contains all the functions to control the mouth. +*/ + +/** \defgroup flippers Flippers + \ingroup movements + + This group contains all the functions to control the flippers. +*/ + +/** \defgroup spin Spin + \ingroup movements + + This group contains all the functions to control the spinning. +*/ + +/** \file motors.h + \ingroup movements +*/ + +/** \file motors.c + \ingroup movements +*/ #ifndef MOTORS_H #define MOTORS_H @@ -29,7 +65,7 @@ enum spin_direction { LEFT, RIGHT }; -/* counters to stop eye/mouth and wings at timer int */ +/* counters to stop eye/mouth and flippers at timer int */ extern uint8_t wingsStpCnt, wingsPosCnt, wingsPwm; extern uint8_t wings_tim, wings_prev_tim; extern uint8_t eyesStpCnt, eyesPosCnt; @@ -133,8 +169,8 @@ #define runIMouth() (MOT_MOUTH_PT &= ~MOT_MOUTH_MK); (MOT_MOUTH_PT |= MOT_IMOUTH_MK) /** - \brief Stop the wings motor - \ingroup wings + \brief Stop the flippers motor + \ingroup flippers */ static inline void stopWings(void) __attribute__ ((always_inline)); void stopWings(void) @@ -146,9 +182,9 @@ /** \brief Start wing motor backwards - \ingroup wings + \ingroup flippers - Used to brake the wings motor only + Used to brake the flippers motor only */ #define runWingsFw() {(MOT_WINGS_BW_PT &= ~MOT_WINGS_BW_MK); (MOT_WINGS_FW_PT |= MOT_WINGS_FW_MK);} #define runWingsBw() {(MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK); (MOT_WINGS_BW_PT |= MOT_WINGS_BW_MK);} @@ -179,7 +215,7 @@ \ingroup primitives * XXX Change group name * This function should be called from a timer interrupt that will fix the PWM - * resolution. + * resolution. * The PWM period will be PWM_PERIOD times * the timer period. * The braking time is dependant on the timer period too. */ @@ -190,7 +226,7 @@ static inline void motor_control(void) __attribute__ ((always_inline)); void motor_control(void) { - /* Wings PWM + /* Flippers PWM * Pulse is stopped here */ if (pwm_tim == wingsPwm) MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK; @@ -207,9 +243,9 @@ if (pwm_tim++ == PWM_PERIOD) { pwm_tim = 0; - PORTB |= pwmMaskB; /* spin and wings */ + PORTB |= pwmMaskB; /* spin and flippers */ } - /* Wings timer to stop the wings in any position */ + /* Flippers timer to stop the flippers in any position */ if (wings_tim) { wings_tim--; @@ -219,7 +255,7 @@ } } - /* Wings braking (motor reversed) delay */ + /* Flippers braking (motor reversed) delay */ if (wingsStpCnt) { wingsStpCnt--; @@ -253,11 +289,11 @@ /* spin braking (motor reversed) delay */ if (spinStpCnt) { - spinStpCnt--; - if (!spinStpCnt) - { - stopSpinMot(); - } + spinStpCnt--; + if (!spinStpCnt) + { + stopSpinMot(); + } } } #endif |
From: Paul_R <c2m...@c2...> - 2007-08-31 07:13:00
|
Author: Paul_R Date: 2007-08-31 09:12:08 +0200 (Fri, 31 Aug 2007) New Revision: 473 Modified: firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/motors.h firmware/tuxcore/trunk/parser.c firmware/tuxcore/trunk/standalone.c firmware/tuxdefs/commands.h Log: Fix bug #8 : Wings movements Add two commands to raise/lower the wings (RAISE_WINGS_CMD - 0x39 / LOWER_WINGS_CMD - 0x3A) Add two functions to raise/lower the wings Add a test to prevent the toggle of the wings position's flag when the motor is not running. Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-08-28 17:48:17 UTC (rev 472) +++ firmware/tuxcore/trunk/motors.c 2007-08-31 07:12:08 UTC (rev 473) @@ -54,7 +54,10 @@ { if (~PSW_WINGS_PIN & PSW_WINGS_MK) /* we only count when the switch is pushed, not released */ { - gStatus.pos ^= GSTATUS_POS_W0; /* toggle wigs position */ + /* This test prevent the toggle when the wings are pushed. The wings + * motor must be switched on (wingsPwm <> 0) to toggle the position */ + if (wingsPwm) + gStatus.pos ^= GSTATUS_POS_W0; /* toggle wigs position */ if (wings_tim) /* if we need to reposition the wings */ { @@ -62,12 +65,14 @@ { if ((wings_prev_tim) && (wings_tim < (wings_prev_tim - WINGS_TIM_DIFF))) /* wings are down */ { + /* Position reached so init gStatus.pos bit to lower position */ gStatus.pos &= ~GSTATUS_POS_W0; wings_tim = 0; /* reset timers */ wings_prev_tim = 0; } else /* continue */ { + /* Unknow position, execute another movement to determine it */ wings_prev_tim = wings_tim; wings_tim = WINGS_TIM_RESET; return; @@ -287,7 +292,40 @@ waveWings(2, 5); /* the first movement is to be sure the timer doesn't start counting from any unknown poistion and that the motors are in regime */ } + /** + \brief Raise wings + \ingroup wings + \param none + + The condition to raise the wings is that they aren't already in the upper position. + If this condition is respected, a single movement is executed by the waveWings function. + Note : if the wings was in the higher position and has been lowered manually, the wings can't be raised directly. + They must pass by the low position (lowerWings function) before being able to be raised. + */ +void raiseWings(void) +{ + if (gStatus.pos == 0) + waveWings(1,5); +} + + +/** + \brief Lower wings + \ingroup wings + + The condition to lower the wings is that they aren't already in the lower position. + If this condition is respected, a single movement is executed by the waveWings function. + Note : if the wings was in the lower position and has been raised manually, the wings can't be lowered directly. + They must pass by the high position (raiseWings function) before being able to be lowered. + */ +void lowerWings(void) +{ + if (gStatus.pos == 1) + waveWings(1,5); +} + +/** \brief Blink the eyes \ingroup eyes @@ -383,12 +421,10 @@ angle += 1; } spinDirection = LEFT; - spinPwmMask &= ~MOT_SPIN_MK; spinPosCnt = angle; spinPwm = pwm; - spinPwmMask &= ~MOT_SPIN_R_MK; /* XXX This line can be deleted ? */ + spinPwmMask &= ~MOT_SPIN_R_MK; spinPwmMask |= MOT_SPIN_L_MK; - // runSpinLeft(); } void spinRight(uint8_t angle, uint8_t pwm) @@ -402,7 +438,6 @@ spinDirection = RIGHT; spinPosCnt = angle; spinPwm = pwm; - spinPwmMask &= ~MOT_SPIN_L_MK; /* XXX */ + spinPwmMask &= ~MOT_SPIN_L_MK; spinPwmMask |= MOT_SPIN_R_MK; - // runSpinRight(); } Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-08-28 17:48:17 UTC (rev 472) +++ firmware/tuxcore/trunk/motors.h 2007-08-31 07:12:08 UTC (rev 473) @@ -71,6 +71,8 @@ void spinRight(uint8_t angle, uint8_t pwm); void waveWings(uint8_t cnt, uint8_t pwm); +void lowerWings(void); +void raiseWings(void); void resetWings(void); void stopEyes(void); void blinkEyes(uint8_t cnt); @@ -224,6 +226,7 @@ if (!wingsStpCnt) { stopWings(); + wingsPwm = 0; } } Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-08-28 17:48:17 UTC (rev 472) +++ firmware/tuxcore/trunk/parser.c 2007-08-31 07:12:08 UTC (rev 473) @@ -104,6 +104,14 @@ { waveWings(command[1], command[2]); } + else if (command[0] == RAISE_WINGS_CMD) + { + raiseWings(); + } + else if (command[0] == LOWER_WINGS_CMD) + { + lowerWings(); + } else if (command[0] == RESET_WINGS_CMD) { resetWings(); Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-08-28 17:48:17 UTC (rev 472) +++ firmware/tuxcore/trunk/standalone.c 2007-08-31 07:12:08 UTC (rev 473) @@ -300,7 +300,7 @@ moveMouth(mov_nbr); break; case K_DOWN: - waveWings(mov_nbr, wingsPwm); + waveWings(mov_nbr, 5); break; case K_LEFT: spinLeft(mov_nbr, spinPwm); Modified: firmware/tuxdefs/commands.h =================================================================== --- firmware/tuxdefs/commands.h 2007-08-28 17:48:17 UTC (rev 472) +++ firmware/tuxdefs/commands.h 2007-08-31 07:12:08 UTC (rev 473) @@ -165,6 +165,8 @@ /* 2nd parameter: pwm value between 1 (slow) and 5 (fast) */ #define STOP_WINGS_CMD 0x30 /* stop the wings motor */ #define RESET_WINGS_CMD 0x31 /* reset the wings in the low position */ +#define RAISE_WINGS_CMD 0x39 /* move the wings in the upper position */ +#define LOWER_WINGS_CMD 0x3A /* move the wings in the lower position */ #define SPIN_LEFT_CMD 0x82 /* spin left of a given angle */ /* 1st parameter: angle to turn, the unit is approximately 1/8th of a turn */ |
From: jaguarondi <c2m...@c2...> - 2007-08-28 17:49:01
|
Author: jaguarondi Date: 2007-08-28 19:48:17 +0200 (Tue, 28 Aug 2007) New Revision: 472 Modified: firmware/tuxaudio/trunk/main.c firmware/tuxaudio/trunk/varis.c Log: * main.c: * varis.c: * BUG: there was an uncomplete 'if' before the powering of the microphone, it's now fixed and the bursts have been limited to 20 which sounds good on the 2 samples I have here. The sleep conditions are commented and need to be fixed. Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-08-28 17:33:35 UTC (rev 471) +++ firmware/tuxaudio/trunk/main.c 2007-08-28 17:48:17 UTC (rev 472) @@ -336,24 +336,25 @@ { sendSensorsFlag = 0; if (pre_sleep_delay > 1) - /* There's a delay before sleep is actually called otherwise - * some commands can't be executed */ + /* There's a delay before the sleep function is actually called + * otherwise other commands on the stack can't be executed */ pre_sleep_delay--; + /* stop sending sensor status in sleep as the i2C should be + * stopped at this time */ else - /* stop sending sensor status in sleep as the i2C should be - * stopped at this time */ sendSensors(); /* wait for all status to be sent before going to sleep */ - if (isFifoEmpty(statusFifo)) + /* TODO fix these conditions for the sleep */ + //if (isFifoEmpty(statusFifo)) /* wait for audio commands to be processed */ - if (!audioBufIdx && !flashPlay) + //if (!audioBufIdx && !flashPlay) if (power_on_reset_delay) /* XXX to move to a proper loop or timer after or before main() */ { - uint8_t tmp; + uint8_t volatile j; - DDRD ^= 0x02; - for (tmp = 0; tmp < 0xFF; tmp++) ; + DDRD |= 0x02; + for (j = 0; j < 0xFF; j++) ; power_on_reset_delay--; if (!power_on_reset_delay) { @@ -364,6 +365,7 @@ DDRD &= ~0x02; } } + sendCommands(); /* Send commands on I2C */ if (audioBufIdx) Modified: firmware/tuxaudio/trunk/varis.c =================================================================== --- firmware/tuxaudio/trunk/varis.c 2007-08-28 17:33:35 UTC (rev 471) +++ firmware/tuxaudio/trunk/varis.c 2007-08-28 17:48:17 UTC (rev 472) @@ -64,7 +64,7 @@ unsigned char sendSensorsCmpt, sendSensorsFlag; unsigned char audio_level, battery_level; -uint8_t power_on_reset_delay = 0x3F; +uint8_t power_on_reset_delay = 20; volatile unsigned char spiCommandFlasg = 0; |
From: jaguarondi <c2m...@c2...> - 2007-08-28 17:33:38
|
Author: jaguarondi Date: 2007-08-28 19:33:35 +0200 (Tue, 28 Aug 2007) New Revision: 471 Modified: firmware/tuxaudio/trunk/main.c Log: * Removed some production test code from main.c. Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-08-28 15:19:53 UTC (rev 470) +++ firmware/tuxaudio/trunk/main.c 2007-08-28 17:33:35 UTC (rev 471) @@ -369,92 +369,9 @@ if (audioBufIdx) audioIntParser(); - /* Event manager */ - if (test_mode == AT_NOSTATUSUP) - resetFifo(statusFifo); /* flush the stack */ - if (test_mode == AT_MBTEST) - { - if (read_status() == 0x1C) - battery_level = 0xFF; - else - battery_level = read_status(); //0xFE; - sendSensors(); - test_mode = AT_MBTEST1; - } - if (test_mode == AT_MBTEST1) - { - uint8_t i; - - /* Check the shortcuts here */ - { - cli(); - /* PORTB */ - DDRB = 0x00; - PORTB = 0xFF; /* all pull-up */ - while ((PINB & 0xC7) != 0xC7) ; - DDRC &= ~0x0B; /* check only PC0 and PC1 */ - PORTC |= 0x0B; /* all pull-up */ - while ((PINC & 0x0B) != 0x0B) ; - DDRD = 0x00; - PORTD = 0xFF; /* all pull-up */ - while ((PIND & 0xDD) != 0xDD) ; - for (i = 0; i < 8; i++) - { - if (i == 3) - i = 6; - PORTB = (uint8_t) ~ _BV(i); - DDRB = (uint8_t) _BV(i); - while ((PINB & 0xC7) != ((~_BV(i)) & 0xC7)) ; - while ((PINC & 0x0B) != 0x0B) ; - while ((PIND & 0xDD) != 0xDD) ; - } - PORTB = 0xFF; - /* PORTC */ - for (i = 0; i < 4; i++) - { - PORTC &= ~_BV(i); - DDRC |= _BV(i); - while ((PINB & 0xC7) != 0xC7) ; - while ((PINC & 0x0B) != ((~_BV(i)) & 0x0B)) ; - while ((PIND & 0xDD) != 0xDD) ; - PORTC |= _BV(i); - DDRC &= ~_BV(i); - } - /* PORTD */ - for (i = 0; i < 8; i++) - { - PORTD = ~_BV(i); - DDRD = _BV(i); - while ((PINB & 0xC7) != 0xC7) ; - while ((PINC & 0x0B) != 0x0B) ; - while ((PIND & 0xDD) != ((~_BV(i)) & 0xDD)) ; - } - - /* Check capacitors */ - PORTC &= ~(_BV(PC1) | _BV(PC0)); - DDRC |= (_BV(PC1) | _BV(PC0)); - for (i = 0; i < 2; i++) - _delay_ms(5); - DDRC &= ~(_BV(PC1) | _BV(PC0)); - PORTC |= (_BV(PC1) | _BV(PC0)); - _delay_ms(1); - if (PINC & (_BV(PC1) | _BV(PC0))) - audio_level = 0xFE; - else - audio_level = 0xFF; - init_avr(); // Init AVR - sei(); - } - - // audio_level = PINB; - // battery_level = PIND; - sendSensors(); - PORTD &= ~_BV(PD0); /* set the IR power low */ - test_mode = AT_AUDIOLINK; /* go to audio link mode */ - } - + /* Send information to the computer. */ if (info_flg) - send_info(); /* send information to the computer */ + send_info(); /* Sleep mode */ if (pre_sleep_delay == 1) |
From: Paul_R <c2m...@c2...> - 2007-08-28 15:20:42
|
Author: Paul_R Date: 2007-08-28 17:19:53 +0200 (Tue, 28 Aug 2007) New Revision: 470 Modified: firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/motors.h Log: Moved the code which controls the motors from main.c to the motors module. Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-28 12:59:08 UTC (rev 469) +++ firmware/tuxcore/trunk/main.c 2007-08-28 15:19:53 UTC (rev 470) @@ -71,7 +71,6 @@ uint8_t t4ms_tim; /* 4ms main tick timer */ uint8_t t100ms_tim; /* 100ms tick timer */ uint8_t t1s_tim; /* 1s tick timer */ -uint8_t pwm_tim; /* pwm timer */ #if (DBG_STACK) /* @@ -100,77 +99,8 @@ { t4ms_tim++; - /* Wings PWM - * Pulse is stopped here */ - if (pwm_tim == wingsPwm) - MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK; + motor_control(); - /* Spin PWM - * Pulse is stopped here */ - if (pwm_tim == spinPwm) - MOT_SPIN_PT &= ~MOT_SPIN_MK; - - /* PWM motor management - * Pulse is set here when pwm_tim is at maximum and is - * reset when pwm_tim equals the PWM value set by the user - * */ - if (pwm_tim++ == 5) - { - pwm_tim = 0; - PORTB |= pwmMaskB; /* spin and wings */ - } - - /* Wings timer to stop the wings in any position */ - if (wings_tim) - { - wings_tim--; - if (!wings_tim) - { - stopWings(); - } - } - - /* Wings braking (motor reversed) delay */ - if (wingsStpCnt) - { - wingsStpCnt--; - if (!wingsStpCnt) - { - stopWings(); - } - } - - /* eyes braking (motor reversed) delay */ - if (eyesStpCnt) - { - eyesStpCnt--; - if (!eyesStpCnt) - { - stopEyes(); - } - } - - /* mouth braking (motor reversed) delay */ - if (mouthStpCnt) - { - mouthStpCnt--; - if (!mouthStpCnt) - { - stopMouth(); - } - } - - /* spin braking (motor reversed) delay */ - if (spinStpCnt) - { - spinStpCnt--; - if (!spinStpCnt) - { - spinPwmMask &= ~MOT_SPIN_MK; - stopSpinMot(); - } - } - /* Every 100ms, update status and send it to the computer */ if (t4ms_tim == 25) { Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-08-28 12:59:08 UTC (rev 469) +++ firmware/tuxcore/trunk/motors.h 2007-08-28 15:19:53 UTC (rev 470) @@ -36,9 +36,6 @@ extern uint8_t mouthStpCnt, mouthPosCnt, mouth_pos; extern uint8_t spinPosCnt, spinStpCnt, spinPwm; -/* counter to disable spin interrupts at PC int */ -extern volatile uint8_t intt_spin_cnt; - /* switches interrupts vector for timer debounce */ extern volatile uint8_t int_sw_flags; @@ -158,8 +155,12 @@ \brief Stop the spinning motor \ingroup primitives */ -#define stopSpinMot() (MOT_SPIN_PT &= ~MOT_SPIN_MK) - +static inline void stopSpinMot(void) __attribute__ ((always_inline)); +void stopSpinMot(void) +{ + spinPwmMask &= ~MOT_SPIN_MK; + MOT_SPIN_PT &= ~MOT_SPIN_MK; +} /** \brief Start spinning to the left \ingroup primitives @@ -171,5 +172,89 @@ \ingroup primitives */ #define runSpinRight() (MOT_SPIN_L_PT &= ~MOT_SPIN_L_MK); (MOT_SPIN_R_PT |= MOT_SPIN_R_MK) +/** + \brief Control the PWM of the spinning & flippers and motor braking. + \ingroup primitives + * XXX Change group name + * This function should be called from a timer interrupt that will fix the PWM + * resolution. + * The PWM period will be PWM_PERIOD times * the timer period. + * The braking time is dependant on the timer period too. + */ +#define PWM_PERIOD 5 +uint8_t static pwm_tim; + +static inline void motor_control(void) __attribute__ ((always_inline)); +void motor_control(void) +{ + /* Wings PWM + * Pulse is stopped here */ + if (pwm_tim == wingsPwm) + MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK; + + /* Spin PWM + * Pulse is stopped here */ + if (pwm_tim == spinPwm) + MOT_SPIN_PT &= ~MOT_SPIN_MK; + + /* PWM motor management + * Pulse is set here when pwm_tim is at maximum and is + * reset when pwm_tim equals the PWM value set by the user + */ + if (pwm_tim++ == PWM_PERIOD) + { + pwm_tim = 0; + PORTB |= pwmMaskB; /* spin and wings */ + } + /* Wings timer to stop the wings in any position */ + if (wings_tim) + { + wings_tim--; + if (!wings_tim) + { + stopWings(); + } + } + + /* Wings braking (motor reversed) delay */ + if (wingsStpCnt) + { + wingsStpCnt--; + if (!wingsStpCnt) + { + stopWings(); + } + } + + /* eyes braking (motor reversed) delay */ + if (eyesStpCnt) + { + eyesStpCnt--; + if (!eyesStpCnt) + { + stopEyes(); + } + } + + /* mouth braking (motor reversed) delay */ + if (mouthStpCnt) + { + mouthStpCnt--; + if (!mouthStpCnt) + { + stopMouth(); + } + } + + /* spin braking (motor reversed) delay */ + if (spinStpCnt) + { + spinStpCnt--; + if (!spinStpCnt) + { + stopSpinMot(); + } + } +} #endif |
From: Paul_R <c2m...@c2...> - 2007-08-28 13:00:00
|
Author: Paul_R Date: 2007-08-28 14:59:08 +0200 (Tue, 28 Aug 2007) New Revision: 469 Modified: firmware/tuxcore/trunk/global.h firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/motors.h Log: Fix bug #4 : spin movements - Add test to determine if the rotation is reversed, to prevent wrong rotation angle. - Add routine to brake the motor when final position is reached. Modified: firmware/tuxcore/trunk/global.h =================================================================== --- firmware/tuxcore/trunk/global.h 2007-08-23 12:41:48 UTC (rev 468) +++ firmware/tuxcore/trunk/global.h 2007-08-28 12:59:08 UTC (rev 469) @@ -169,6 +169,7 @@ #define MOUTH_OPEN_DLY 2 /* 4ms unit */ #define MOUTH_ICLOSE_DLY 8 /* 4ms unit */ #define SPIN_INTT_DLY 10 /* 4ms unit */ +#define SPIN_STOP_DLY 10 /* 4ms unit */ #define WINGS_STOP_DLY 4 /* 4ms unit */ /* Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-23 12:41:48 UTC (rev 468) +++ firmware/tuxcore/trunk/main.c 2007-08-28 12:59:08 UTC (rev 469) @@ -160,6 +160,17 @@ } } + /* spin braking (motor reversed) delay */ + if (spinStpCnt) + { + spinStpCnt--; + if (!spinStpCnt) + { + spinPwmMask &= ~MOT_SPIN_MK; + stopSpinMot(); + } + } + /* Every 100ms, update status and send it to the computer */ if (t4ms_tim == 25) { Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-08-23 12:41:48 UTC (rev 468) +++ firmware/tuxcore/trunk/motors.c 2007-08-28 12:59:08 UTC (rev 469) @@ -30,7 +30,7 @@ uint8_t wings_tim, wings_prev_tim; /* timer for absolute position of the wings */ uint8_t eyesStpCnt, eyesPosCnt; //, eyesPwm; uint8_t mouthStpCnt, mouthPosCnt, mouth_pos; //, mouthPwm; -uint8_t spinPosCnt, spinPwm = 5; +uint8_t spinPosCnt, spinStpCnt, spinPwm = 5, spinDirection; /* pwm mask registers */ uint8_t pwmMaskB; @@ -176,7 +176,7 @@ This interrupt stops the spinning motor when the desired number of movements have been executed. - The switch is pushed each XXX degrees. We set the interrupt in falling edge + The switch is pushed each 90 degrees. We set the interrupt in falling edge mode so there's no interrupt generated when the switch is released. */ ISR(SIG_INTERRUPT1) @@ -184,12 +184,16 @@ if (spinPosCnt) { spinPosCnt--; + if (!spinPosCnt) { - { - spinPwmMask &= ~MOT_SPIN_MK; - stopSpinMot(); - } + spinPwmMask &= ~MOT_SPIN_MK; + stopSpinMot(); + spinStpCnt = SPIN_STOP_DLY; + if (spinDirection == LEFT) + spinPwmMask |= MOT_SPIN_R_MK; + else + spinPwmMask |= MOT_SPIN_L_MK; } } } @@ -286,6 +290,7 @@ /** \brief Blink the eyes \ingroup eyes + \param cnt number of movements before the wings will stop \note Any mouth command is cancelled @@ -371,18 +376,33 @@ void spinLeft(uint8_t angle, uint8_t pwm) { + /* Check if direction is changing and if pos. switch isn't push. Then, + * increment angle value to prevent too short rotation */ + if (spinDirection == RIGHT && (PSW_SPIN_PIN & PSW_SPIN_MK)) + { + angle += 1; + } + spinDirection = LEFT; + spinPwmMask &= ~MOT_SPIN_MK; spinPosCnt = angle; spinPwm = pwm; - spinPwmMask &= ~MOT_SPIN_R_MK; + spinPwmMask &= ~MOT_SPIN_R_MK; /* XXX This line can be deleted ? */ spinPwmMask |= MOT_SPIN_L_MK; // runSpinLeft(); } void spinRight(uint8_t angle, uint8_t pwm) { + /* Check if direction is changing and if pos. switch isn't push. Then, + * increment angle value to prevent too short rotation */ + if (spinDirection == LEFT && (PSW_SPIN_PIN & PSW_SPIN_MK)) + { + angle += 1; + } + spinDirection = RIGHT; spinPosCnt = angle; spinPwm = pwm; - spinPwmMask &= ~MOT_SPIN_L_MK; + spinPwmMask &= ~MOT_SPIN_L_MK; /* XXX */ spinPwmMask |= MOT_SPIN_R_MK; // runSpinRight(); } Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-08-23 12:41:48 UTC (rev 468) +++ firmware/tuxcore/trunk/motors.h 2007-08-28 12:59:08 UTC (rev 469) @@ -26,13 +26,15 @@ #define WINGS_TIM_DIFF 0x10 enum mouth_pos_s { OPEN, CLOSE, UNDEFINED }; +enum spin_direction +{ LEFT, RIGHT }; /* counters to stop eye/mouth and wings at timer int */ extern uint8_t wingsStpCnt, wingsPosCnt, wingsPwm; extern uint8_t wings_tim, wings_prev_tim; extern uint8_t eyesStpCnt, eyesPosCnt; extern uint8_t mouthStpCnt, mouthPosCnt, mouth_pos; -extern uint8_t spinPosCnt, spinPwm; +extern uint8_t spinPosCnt, spinStpCnt, spinPwm; /* counter to disable spin interrupts at PC int */ extern volatile uint8_t intt_spin_cnt; |
From: jaguarondi <c2m...@c2...> - 2007-08-23 12:42:47
|
Author: jaguarondi Date: 2007-08-23 14:41:48 +0200 (Thu, 23 Aug 2007) New Revision: 468 Added: firmware/tuxcore/trunk/doc/ firmware/tuxcore/trunk/doc/main_flowchart.dia firmware/tuxcore/trunk/doc/main_flowchart.png Modified: firmware/tuxcore/trunk/main.c Log: * Added the mainpage of the doxygen documentation and a high-level flowchart of tuxcore firmware. Added: firmware/tuxcore/trunk/doc/main_flowchart.dia =================================================================== (Binary files differ) Property changes on: firmware/tuxcore/trunk/doc/main_flowchart.dia ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: firmware/tuxcore/trunk/doc/main_flowchart.png =================================================================== (Binary files differ) Property changes on: firmware/tuxcore/trunk/doc/main_flowchart.png ___________________________________________________________________ Name: svn:mime-type + image/png Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-21 16:48:58 UTC (rev 467) +++ firmware/tuxcore/trunk/main.c 2007-08-23 12:41:48 UTC (rev 468) @@ -19,6 +19,18 @@ /* $Id: */ +/** \file main.c + \brief Tuxcore main functions +*/ +/** \mainpage Tuxcore firmware documentation of the Tux Droid open source robot + +\section SVN SVN repository +http://svn.tuxisalive.com/firmware/tuxcore/trunk + +\section flowchart Flowchart +\image html main_flowchart.png +*/ + #include <avr/interrupt.h> #include <avr/io.h> #include <avr/pgmspace.h> |
From: jaguarondi <c2m...@c2...> - 2007-08-21 16:49:00
|
Author: jaguarondi Date: 2007-08-21 18:48:58 +0200 (Tue, 21 Aug 2007) New Revision: 467 Modified: firmware/tuxcore/trunk/Makefile firmware/tuxcore/trunk/bootloader.c firmware/tuxcore/trunk/fifo.h firmware/tuxcore/trunk/main.c Log: * Chopped a couple of long lines. More to come. Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2007-08-21 16:31:40 UTC (rev 466) +++ firmware/tuxcore/trunk/Makefile 2007-08-21 16:48:58 UTC (rev 467) @@ -42,7 +42,8 @@ endif CWARN = -Wall -Wstrict-prototypes CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -CFLAGS = $(COMMON) $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) +CFLAGS = $(COMMON) $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) \ + $(CSTANDARD) $(CEXTRA) CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d ## Assembly specific flags @@ -66,7 +67,8 @@ ## Objects that must be built in order to link -OBJECTS = main.o sensors.o motors.o global.o led.o communication.o i2c.o fifo.o ir.o parser.o config.o standalone.o +OBJECTS = main.o sensors.o motors.o global.o led.o communication.o i2c.o \ + fifo.o ir.o parser.o config.o standalone.o ## Objects explicitly added by the user LINKONLYOBJECTS = @@ -117,7 +119,8 @@ ##Link $(TARGET): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) \ + -o $(TARGET) $(BOOTLOADER): bootloader.o $(CC) $(BL_LDFLAGS) bootloader.o -o $(BOOTLOADER) @@ -159,7 +162,9 @@ ## Clean target .PHONY: clean clean: - -rm -rf $(OBJECTS) svnrev.h tuxcore.elf dep/* tuxcore.hex tuxcore.eep tuxcore.lss tuxcore.map bootloader.o tuxcore_bl.hex tuxcore_bl.lss tuxcore_bl.map tuxcore_bl.elf svnrev.h dep + -rm -rf $(OBJECTS) svnrev.h tuxcore.elf dep/* tuxcore.hex tuxcore.eep \ + tuxcore.lss tuxcore.map bootloader.o tuxcore_bl.hex tuxcore_bl.lss \ + tuxcore_bl.map tuxcore_bl.elf svnrev.h dep ## Other dependencies @@ -168,6 +173,7 @@ ## Generate doxygen documentation .PHONY: doc REVISION = $(shell sed -n "s/\#define SVN_REV\> *//p" svnrev.h) +URL = $(shell sed -n "s/\#define SVN_URL\> *//p" svnrev.h) # if we're in a tag folder, we don't show 'UNRELEASED' ifeq ($(shell sed -n "s/\#define SVN_URL\> *//p" svnrev.h | grep tags),) UNRELEASED = "UNRELEASED " @@ -186,13 +192,18 @@ tuxup $(PROJECT).hex $(PROJECT).eep progisp: $(PROJECT).hex $(PROJECT).eep - $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep + $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e \ + -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep progisp_bl: $(PROJECT).hex $(PROJECT).eep $(PROJECT)_bl.hex - $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -D -U flash:w:$(PROJECT)_bl.hex + $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e \ + -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -D \ + -U flash:w:$(PROJECT)_bl.hex progstk: $(PROJECT).hex $(PROJECT).eep - $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep + $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex \ + -U eeprom:w:$(PROJECT).eep progstk_bl: $(PROJECT).hex $(PROJECT).eep $(PROJECT)_bl.hex - $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -D -U flash:w:$(PROJECT)_bl.hex + $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex \ + -U eeprom:w:$(PROJECT).eep -D -U flash:w:$(PROJECT)_bl.hex Modified: firmware/tuxcore/trunk/bootloader.c =================================================================== --- firmware/tuxcore/trunk/bootloader.c 2007-08-21 16:31:40 UTC (rev 466) +++ firmware/tuxcore/trunk/bootloader.c 2007-08-21 16:48:58 UTC (rev 467) @@ -47,11 +47,12 @@ uint8_t i, twStatus, eeprom_flg = 0; volatile uint16_t _count = 0; - for (_count = 0; _count < 0xFFFF; _count++) ; /* wait for the head button to stabilize */ - if (SW_HD_PIN & SW_HD_MK) /* if head is not pushed at startup */ + /* Wait for the head button to stabilize. */ + for (_count = 0; _count < 0xFFFF; _count++) ; + if (SW_HD_PIN & SW_HD_MK) /* if head is not pushed at startup */ jump_to_application(); - LED_DDR |= LED_L_MK; /* light on left led */ + LED_DDR |= LED_L_MK; /* light on left led */ LED_PT |= LED_L_MK; TWBR = (F_CPU / 100000UL - 16) / 2; /* twi intialisation */ @@ -60,35 +61,36 @@ TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); for (;;) { - i2cWaitForComplete(); /* wait the I2C address */ + i2cWaitForComplete(); /* wait the I2C address */ if ((twStatus = TW_STATUS) != TW_SR_SLA_ACK) while (1) ; TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); - i2cWaitForComplete(); /* wait the high byte of the page address */ + i2cWaitForComplete(); /* wait the high byte of the page address */ if ((twStatus = TW_STATUS) != TW_SR_DATA_ACK) while (1) ; pageAddress.b[1] = TWDR; TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); - i2cWaitForComplete(); /* wait the low byte of the page address */ + i2cWaitForComplete(); /* wait the low byte of the page address */ if ((twStatus = TW_STATUS) != TW_SR_DATA_ACK) while (1) ; pageAddress.b[0] = TWDR; if (pageAddress.w & 0x003F) - while (1) ; /* incorrect page address */ - if (pageAddress.w >= 0x8000) /* eeprom programming */ + while (1) ; /* incorrect page address */ + if (pageAddress.w >= 0x8000) /* eeprom programming */ { - eeprom_flg = 1; /* don't overwrite the bootloader */ - pageAddress.b[1] &= 0x7F; /* remove the eeprom indication bit */ + eeprom_flg = 1; /* don't overwrite the bootloader */ + pageAddress.b[1] &= 0x7F; /* remove the eeprom indication bit */ } else if (pageAddress.w >= 0x1E00) - while (1) ; /* don't overwrite the bootloader */ + while (1) ; /* don't overwrite the bootloader */ else - eeprom_flg = 0; /* flash programming */ + eeprom_flg = 0; /* flash programming */ address = pageAddress.w; TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); - for (i = 0; i < SPM_PAGESIZE; i++) /* fill the complete page with the next data */ + /* Fill the complete page with the next data. */ + for (i = 0; i < SPM_PAGESIZE; i++) { - i2cWaitForComplete(); /* wait data */ + i2cWaitForComplete(); /* wait data */ if ((twStatus = TW_STATUS) == TW_SR_DATA_ACK) { if ((i & 0x01) == 0) @@ -110,17 +112,20 @@ TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); } else - while (1) ; /* error in communication */ + while (1) ; /* error in communication */ } i2cWaitForComplete(); if ((twStatus = TW_STATUS) != TW_SR_STOP) - while (1) ; /* if no stop at this exact position, there's something wrong with the number of bytes sent, we cancel */ - TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); /* clear the interrupt immediately so not to miss the next frame */ + /* If no stop at this exact position, there's something wrong with + * the number of bytes sent, we cancel. */ + while (1) ; + /* Clear the interrupt immediately so not to miss the next frame. */ + TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); if (!eeprom_flg) { boot_page_erase(pageAddress.w); boot_spm_busy_wait(); - boot_page_write(pageAddress.w); /* Store buffer in flash page */ + boot_page_write(pageAddress.w); /* Store buffer in flash page */ boot_spm_busy_wait(); } } @@ -128,5 +133,6 @@ void i2cWaitForComplete(void) { - while (!(TWCR & _BV(TWINT))) ; /* wait for i2c interface to complete operation */ + /* Wait for i2c interface to complete operation. */ + while (!(TWCR & _BV(TWINT))) ; } Modified: firmware/tuxcore/trunk/fifo.h =================================================================== --- firmware/tuxcore/trunk/fifo.h 2007-08-21 16:31:40 UTC (rev 466) +++ firmware/tuxcore/trunk/fifo.h 2007-08-21 16:48:58 UTC (rev 467) @@ -26,11 +26,13 @@ Usage: - use the following include: \code #include "fifo.h" \endcode - - instanciate a fifo with a given name and size. The size must be a power of 2 and is limited to 128 (2, 4, 8, 16, 32, 64, or 128). + - instanciate a fifo with a given name and size. The size must be a power + of 2 and is limited to 128 (2, 4, 8, 16, 32, 64, or 128). \code FIFO_INSTANCE(fifo_name, FIFO_SIZE); \endcode - - declare a pointer to a fifo type and initialize it with the address of the fifo you just created + - declare a pointer to a fifo type and initialize it with the address of + the fifo you just created \code fifo_t *myFifo = FifoPointer(fifo_name); \endcode Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-21 16:31:40 UTC (rev 466) +++ firmware/tuxcore/trunk/main.c 2007-08-21 16:48:58 UTC (rev 467) @@ -220,27 +220,31 @@ /* * Communication: updating status, receiving and sending commands */ - if (updateStatusFlag && !cond_flags.sleep) /* do all stuff that needs to be updated before status are sent; we don't send status when entering sleep mode */ + /* We don't send status when entering sleep mode. */ + if (updateStatusFlag && !cond_flags.sleep) { updateStatusFlag = 0; updateStatus(); /* add sensors states to the status queue */ getLight(); /* light measurement */ } - //if (commandProcessFlag) /* XXX check if it's quick enough with the if */ + //if (commandProcessFlag) /* XXX check if it's quick enough with the if + //*/ // { // commandProcessFlag = 0; - sendCommands(); /* send status and audio commands through i2c */ + sendCommands(); /* send status and audio commands through i2c */ // } - if (commandBufIdx) /* do all stuff that needs to be updated each time a commnand or status has been received */ + if (commandBufIdx) /* do all stuff that needs to be updated each time a + commnand or status has been received */ { - parse_received_commands(); /* parse and execute received commands */ + parse_received_commands(); /* parse and execute received commands */ } standalone_behavior(); /* standalone behavior manager */ /* Entering sleep mode. */ - if ((cond_flags.sleep == COND_SLEEP) && !event_timer) /* wait for standalone actions to be done */ + /* Wait for standalone actions to be done. */ + if ((cond_flags.sleep == COND_SLEEP) && !event_timer) sleep(); /* @@ -300,7 +304,8 @@ PCMSK2 = PSW_EYES_C_MK; PCICR |= _BV(PCIE2); - /* Enable 'INT1 interrupt' for spin position switch in falling edge mode and 'INT0 interrupt' for IR receiver in falling edge mode */ + /* Enable 'INT1 interrupt' for spin position switch in falling edge mode + * and 'INT0 interrupt' for IR receiver in falling edge mode */ EICRA = _BV(ISC11); // | _BV(ISC01); EIMSK = _BV(INT1); // | _BV(INT0); @@ -308,7 +313,7 @@ * Single conversion mode */ ADCSRA = _BV(ADEN) | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); - ADMUX = 0x06; /* ADC6 selected XXX change this when adding ADC7 too */ + ADMUX = 0x06; /* ADC6 selected XXX change this when adding ADC7 too */ ADCSRA |= _BV(ADIE) | _BV(ADSC); /* set ADC interrupt and start it */ /* set external I/O as pull-up */ |
From: jaguarondi <c2m...@c2...> - 2007-08-21 16:31:45
|
Author: jaguarondi Date: 2007-08-21 18:31:40 +0200 (Tue, 21 Aug 2007) New Revision: 466 Modified: firmware/tuxcore/trunk/Makefile Log: * Updated the doxygen documentation generation to get the version number from version.h and determine if this version comes from a tags folder otherwise it's considered unreleased. Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2007-08-21 15:21:33 UTC (rev 465) +++ firmware/tuxcore/trunk/Makefile 2007-08-21 16:31:40 UTC (rev 466) @@ -165,12 +165,18 @@ ## Other dependencies -include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) -# Generate documentation +## Generate doxygen documentation .PHONY: doc REVISION = $(shell sed -n "s/\#define SVN_REV\> *//p" svnrev.h) - - #TODO get the version number from version.h here -doc: export VERSION = "Version 0.3.0 UNRELEASED (Revision $(REVISION))" +# if we're in a tag folder, we don't show 'UNRELEASED' +ifeq ($(shell sed -n "s/\#define SVN_URL\> *//p" svnrev.h | grep tags),) + UNRELEASED = "UNRELEASED " +endif +VERSION_MAJ = $(shell sed -n "s/\#define VER_MAJOR *//p" version.h) +VERSION_MIN = $(shell sed -n "s/\#define VER_MINOR *//p" version.h) +VERSION_UP = $(shell sed -n "s/\#define VER_UPDATE *//p" version.h) +doc: export VERSION = "Version $(VERSION_MAJ).$(VERSION_MIN).$(VERSION_UP)\ + $(UNRELEASED)(Revision $(REVISION))" doc: svnrev.h version.h @echo "Generating documentation for tuxcore" $(VERSION) doxygen ./Doxyfile |
From: jaguarondi <c2m...@c2...> - 2007-08-21 15:37:48
|
Author: jaguarondi Date: 2007-08-21 17:21:33 +0200 (Tue, 21 Aug 2007) New Revision: 465 Modified: firmware/tuxcore/trunk/communication.c firmware/tuxcore/trunk/fifo.h firmware/tuxcore/trunk/main.c Log: * Renamed fifoPointer into FifoPointer for consistency. * Removed the '-1' from the old fifo implementation when checking the size. Modified: firmware/tuxcore/trunk/communication.c =================================================================== --- firmware/tuxcore/trunk/communication.c 2007-08-21 14:00:12 UTC (rev 464) +++ firmware/tuxcore/trunk/communication.c 2007-08-21 15:21:33 UTC (rev 465) @@ -57,9 +57,8 @@ * Declare a fifo (statusFifo_s) and a pointer. */ FIFO_INSTANCE(statusFifo_s, STATUS_BUF_SIZE); -fifo_t *statusFifo = fifoPointer(statusFifo_s); +fifo_t *statusFifo = FifoPointer(statusFifo_s); - uint8_t i2cCommandType; volatile uint8_t i2c_pause; Modified: firmware/tuxcore/trunk/fifo.h =================================================================== --- firmware/tuxcore/trunk/fifo.h 2007-08-21 14:00:12 UTC (rev 464) +++ firmware/tuxcore/trunk/fifo.h 2007-08-21 15:21:33 UTC (rev 465) @@ -9,7 +9,6 @@ #define _FIFO_H_ /** \defgroup circular_buffer Circular buffer (FIFO) - \ingroup buffer This circular buffer module implements a minimal general use fifo. @@ -33,11 +32,11 @@ \endcode - declare a pointer to a fifo type and initialize it with the address of the fifo you just created \code - fifo_t *myFifo = fifoPointer(fifo_name); + fifo_t *myFifo = FifoPointer(fifo_name); \endcode You can instanciate multiple fifo with FIFO_INSTANCE and get the pointer to - them with fifoPointer(). + them with FifoPointer(). */ /** \file fifo.h @@ -94,7 +93,7 @@ */ /** \brief This macro instanciates a fifo given its name and its size. The fifo - * can then be accessed with fifoPointer(). + * can then be accessed with FifoPointer(). * * The macro declares the fifo buffer and a the fifo structure which holds the * buffer, the size and the indexes. Using this macro somehow hides the @@ -114,7 +113,7 @@ * As the structure should be hidden from the application, this macro should * be used to return the address of a given fifo. */ -#define fifoPointer(fifo_name) (&fifo_name##_struct) +#define FifoPointer(fifo_name) (&fifo_name##_struct) /*! @} */ Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-21 14:00:12 UTC (rev 464) +++ firmware/tuxcore/trunk/main.c 2007-08-21 15:21:33 UTC (rev 465) @@ -79,7 +79,7 @@ #endif /* - * Timer 0 overflow interrupt will be called each 4ms + * Timer2 overflow interrupt will be called each 4ms * and will provide 100ms and 1s counters * * Ext int counters will also be managed @@ -356,8 +356,8 @@ #define STATUS_BYTE_SIZE 20 void updateStatus(void) { - if (FifoLength(statusFifo) >= (STATUS_BUF_SIZE - STATUS_BYTE_SIZE - 1)) - return; /* if there's not enough place, we dont save. -1 is because the fifo real size is buffer size -1 */ + if (FifoLength(statusFifo) >= (STATUS_BUF_SIZE - STATUS_BYTE_SIZE)) + return; /* if there's not enough place, we dont save. */ statusFifoFlag = 1; FifoPut(statusFifo, STATUS_SENSORS1_CMD); FifoPut(statusFifo, gStatus.sw); |
From: Paul_R <c2m...@c2...> - 2007-08-21 14:01:06
|
Author: Paul_R Date: 2007-08-21 16:00:12 +0200 (Tue, 21 Aug 2007) New Revision: 464 Modified: firmware/tuxcore/trunk/communication.c firmware/tuxcore/trunk/fifo.c firmware/tuxcore/trunk/fifo.h firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/parser.c Log: Changed fifo module with complete new version which is more readable and is able to store 2^n instead of 2^n-1 as previously. We also start to create doxygen comments. Modified: firmware/tuxcore/trunk/communication.c =================================================================== --- firmware/tuxcore/trunk/communication.c 2007-08-21 09:51:33 UTC (rev 463) +++ firmware/tuxcore/trunk/communication.c 2007-08-21 14:00:12 UTC (rev 464) @@ -53,14 +53,12 @@ uint8_t audioIntBuf[MAX_COMMAND_SIZE]; /* single buffer for audio commands to be sent to the audio interface */ uint8_t audioIntBufIdx = 0; /* index indicating the number of valid bytes in the buffer */ -/* - * statusBuf is a fifo buffer for status commands to be sent by i2c and then - * over the RF link +/** \brief Fifo used to buffer status datas which is to be sent over i2c to tuxaudio. + * Declare a fifo (statusFifo_s) and a pointer. */ -uint8_t statusFifoBuf[STATUS_BUF_SIZE]; /* statusBuf is a fifo buffer for status commands to be sent over i2c */ -fifo_t statusFifo_s = { statusFifoBuf, sizeof statusFifoBuf - 1, 0, 0 } +FIFO_INSTANCE(statusFifo_s, STATUS_BUF_SIZE); +fifo_t *statusFifo = fifoPointer(statusFifo_s); -, *statusFifo = &statusFifo_s; uint8_t i2cCommandType; volatile uint8_t i2c_pause; @@ -166,12 +164,12 @@ i2cCommandType = AUDIO_CMD; return 1; } - else if (!isFifoEmpty(statusFifo)) /* if no audio and there's some status to send, get the next value */ + else if (FifoLength(statusFifo)) /* if no audio and there's some status to send, get the next value */ { for (i = 0; i < 4; i++) /* so we loop 4 times here to get all command bytes */ { i2cSendData[i] = 0; - popFifo(statusFifo, &i2cSendData[i]); /* TODO add a test on returned value to detect any corrupted fifo */ + FifoGet(statusFifo, &i2cSendData[i]); /* TODO add a test on returned value to detect any corrupted fifo */ // XXX to delete i2cSendData[i] = statusBuf[statusBufIdx-i-1]; [> decrease index then get the value <] } i2cSendDataLength = 4; /* status commands have always 3 parameters */ @@ -208,7 +206,7 @@ { if (i2cCommandType == STATUS_CMD) for (i = 0; i < 4; i++) /* so we loop 4 times here to get all command bytes */ - pushFifo(statusFifo, i2cSendData[i]); /* TODO try to find a better way to do this later on */ + FifoPut(statusFifo, i2cSendData[i]); /* TODO try to find a better way to do this later on */ } else if (i2cCommandType == AUDIO_CMD) audioIntBufIdx = 0; /* clear buffer if command sent successfully */ Modified: firmware/tuxcore/trunk/fifo.c =================================================================== --- firmware/tuxcore/trunk/fifo.c 2007-08-21 09:51:33 UTC (rev 463) +++ firmware/tuxcore/trunk/fifo.c 2007-08-21 14:00:12 UTC (rev 464) @@ -1,180 +1,67 @@ /* - * TUXCORE - Firmware for the 'core' CPU of tuxdroid - * Copyright (C) 2007 C2ME S.A. <tux...@c2...> + * Copyright (c) 2006, C2ME S.A. + * All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * $Id$ */ -/* $Id: */ - #include <inttypes.h> #include "fifo.h" -/** \file fifo.c - \ingroup single_size_fifo - \brief Standard pointer fifo +/** \weakgroup circular_buffer */ +/*! @{ */ - \section modulo Typecasts and modulo - - \note All wrap around now use '&' instead of '\%' because the size is a - variable and not a constant and the compiler can't optimize it itself - anymore. I still leave this notice for reference and in case someone wants - to change back to modulo. - - All functions that use modulo usually use typecasts - i.e. the following statement - - \code length = (p->inIdx - p->outIdx) % p->size; \endcode - - has a problem when (p->inIdx - p->outIdx) is <0. Then the - modulus is not done, the return value is 0xF9 for example. This is due to - the implicit promotion of the intermediate value to an int. - - "%" is a signed modulus, so -1 % 8 == -1. - - We need to trim down the intermediate result to a uint8_t result - immediately so the modulus applies to a uint8_t otherwise the implicit - promotion of a uint8_t argument to an int expression makes the expression - signed and brake the code for the above reason. The correct expression is - - \code length = ((uint8_t)(p->inIdx - p->outIdx) % p->size); \endcode - - So forgetting the typecast not only makes the code much bigger, it also - brake it when the intermediate result is negative. - +/** \file fifo.c + \brief Circular buffer (FIFO) */ -/** \name Accessors - - Functions to initialise, manipulate and get the status of the fifo buffer. */ - -/* @{ */ -/** \ingroup single_size_fifo */ - -/** \brief Resets the indexes to an empty state (8b). - * \param p fifo pointer - * - * Note that the first element in the fifo will be stored in p->buffer[1] and not p->buffer[0] */ -void resetFifo(fifo_t * p) +/** \brief Empty the buffer by clearing the indexes. + * \param p Fifo pointer. + */ +void FifoClear(fifo_t *p) { p->inIdx = 0; p->outIdx = 0; } -/** \brief Return TRUE if the fifo buffer is full (28b). - * \param p fifo pointer - * \return TRUE if fifo buffer is full +/** \brief Return TRUE if the buffer is full. + * \param p Fifo pointer. + * \return TRUE if the buffer is full, FALSE otherwise. */ -uint8_t isFifoFull(fifo_t * p) +uint8_t FifoFull(fifo_t const *p) { - return (p->outIdx == (((uint8_t) (p->inIdx + 1)) & p->size)); /* typecast necessary because the sum is promoted to an int and without the type cast we can have negative values which after the modulo are still negative values. See modulo section above */ + return (FifoLength(p) == p->size); } -/** \brief Return TRUE if the fifo buffer is empty (22b). - * \param p fifo pointer - * \return TRUE if fifo buffer is empty +/** \brief Add one data byte to the fifo buffer. + * \param p Fifo pointer. + * \param data Data byte to add to the queue. + * \return Return FIFO_OK if the data has been added, FIFO_FULL if the buffer + * was full and the data couldn't be added. */ -uint8_t isFifoEmpty(fifo_t * p) +int8_t FifoPut(fifo_t *p, uint8_t const data) { - return (p->outIdx == p->inIdx); -} + if (FifoLength(p) == p->size) + return FIFO_FULL; -/** \brief Return the number of elements in the fifo buffer (16b). - * \param p fifo pointer - * \return number of elements in the buffer - */ -uint8_t fifoLength(fifo_t * p) -{ - return ((uint8_t) (p->inIdx - p->outIdx)) & p->size; /* typecast necessary because the sum is promoted to an int and without the type cast we can have negative values which after the modulo are still negative values. See modulo section above */ + p->buffer[p->inIdx++ & (p->size-1)] = data; /* store data */ + return FIFO_OK; } -/** \brief Add one data byte to the fifo buffer (32b). - * \param p fifo pointer - * \param data data byte to add to the queue - * - * If the fifo is already full, return immediately without doing anything. +/** \brief Pop the oldest byte from the buffer. + * \param p Fifo pointer. + * \param data pointer for storing the data read from the queue + * \return FIFO_OK if a value has been popped out at the pointer address. If + * the fifo is empty, FIFO_EMPTY is returned and the pointed data is left + * unchanged. */ -void pushFifo(fifo_t * p, uint8_t data) +int8_t FifoGet(fifo_t *p, uint8_t *data) { - uint8_t inIdx; /* use of a local variable to reduce code size */ + if (p->outIdx == p->inIdx) + return FIFO_EMPTY; - inIdx = ((uint8_t) (p->inIdx + 1)) & p->size; /* typecast necessary because the sum is promoted to an int and without the type cast we can have negative values which after the modulo are still negative values. See modulo section above */ - if (p->outIdx != inIdx) /* full if p->outIdx == p->inIdx + 1 % wrap-around, if not full: */ - { - p->inIdx = inIdx; /* ++ index */ - p->buffer[inIdx] = data; /* stora data */ - } + *data = p->buffer[p->outIdx++ & (p->size-1)]; + return FIFO_OK; } -/** \brief Pop the oldest byte in the fifo (48b). - * \param p fifo pointer - * \param data pointer to store the data read from the queue - * \return success status - * - * Return '0' if a value has been popped out at the pointer address. If the - * fifo is empty, the index is not decreased, '1' is returned and the pointed - * data is left unchanged. - */ -uint8_t popFifo(fifo_t * p, uint8_t * data) -{ - if (p->outIdx != p->inIdx) /* if fifo is not empty */ - { - p->outIdx++; /* ++ index */ - p->outIdx = p->outIdx & p->size; /* wrap-around */ - *data = p->buffer[p->outIdx]; /* get data */ - return 0; - } - else - return 1; -} - -/** \brief Get the oldest byte in the fifo without removing it - * \param p fifo pointer - * \param data pointer to store the data read from the queue - * \return success status - * - * Return '0' if a value has been read out. If the fifo is empty, '1' - * is returned and the pointed data is left unchanged. - */ -uint8_t getFifo(fifo_t * p, uint8_t * data) -{ - if (p->outIdx != p->inIdx) /* if fifo is not empty */ - { - *data = p->buffer[p->outIdx + 1]; /* get data */ - return 0; - } - else - return 1; -} - -/** \brief Pull the oldest byte from the fifo, always return something even if - * the fifo is empty (36b). - * \param p fifo pointer - * \return data read from the queue - * - * If the fifo is empty, the index is not decreased but the latest value is - * returned. - */ -uint8_t pullFifo(fifo_t * p) -{ - if (p->outIdx != p->inIdx) /* if fifo is not empty */ - { - p->outIdx++; /* ++ index */ - p->outIdx = p->outIdx & p->size; /* wrap-around */ - } - return p->buffer[p->outIdx]; /* get data in all cases */ -} - -/*@}*/ +/*! @} */ Modified: firmware/tuxcore/trunk/fifo.h =================================================================== --- firmware/tuxcore/trunk/fifo.h 2007-08-21 09:51:33 UTC (rev 463) +++ firmware/tuxcore/trunk/fifo.h 2007-08-21 14:00:12 UTC (rev 464) @@ -1,122 +1,147 @@ -#ifndef FIFO_H -#define FIFO_H +/* + * Copyright (c) 2006, C2ME S.A. + * All rights reserved. + * + * $Id$ + */ -/** \defgroup single_size_fifo Single size Fifo - \ingroup fifo +#ifndef _FIFO_H_ +#define _FIFO_H_ - "fifo" is a general use fifo wich has been optimized for size. The fifo is - a structure of a data array pointer, it's size and input and output - indexes. The fifo buffer is never accessed directly by the application. - Therefore it has a couple of accessors to push/pop data or access - properties like status or length. +/** \defgroup circular_buffer Circular buffer (FIFO) + \ingroup buffer - All fifo sizes should have a value to the power of 2 so the wrap-around - (modulo), necessary when the index is at the end of the buffer array, - simplifies to a single AND operation. This greatly reduces the code size. - Maximum fifo size is 256. It is not possible to use any value for the fifo - size although this could be done by changing all '&' operations by '%' in - fifo.c but the code size will increase a lot. It would be more efficient to - change the wrap around to an 'if (inIdx == outIdx)' method. + This circular buffer module implements a minimal general use fifo. - Note that the buffer can only hold the given size minus 1 (fifo->size - - 1) elements to be able to make the difference between completely full and - completely empty states. So if your fifo has a size of 128, it'll only hold - a maximum of 127 elements. + The fifo is a structure of a data array pointer, it's size, input and + output indexes. The fifo buffer itself is hidden from the + application. There are a couple of functions to put/get data or + access its properties. - Interrupts should be disabled before a call to an accessor if fifo's are - also manupilated in interrupts. It's up to the application to take care of - this. As all accessors are very short, it makes no sense to have the sei - and cli inside them, they would be at the beginning and end of the function - anyway. + The buffer size must be a power of 2 and is limited to 128 (2, 4, + 8, 16, 32, 64, or 128). + Interrupts should be disabled if you access a fifo from both interrupt + routines and the main code. + Usage: - use the following include: \code #include "fifo.h" \endcode - - create a buffer, a fifo structure and a pointer to it. The structure - should be initialized with a pointer to the buffer, the (size - 1) of the - buffer (see the structure definition for details) and input and output - indexes which should be reset. Replace FIFO_SIZE by a value or define it. - \code uint8_t testFifo_buf[FIFO_SIZE]; - fifo_t testFifo = {testFifo_buf, sizeof testFifo_buf-1, 0, 0}, *myFifo = &testFifo; + - instanciate a fifo with a given name and size. The size must be a power of 2 and is limited to 128 (2, 4, 8, 16, 32, 64, or 128). + \code + FIFO_INSTANCE(fifo_name, FIFO_SIZE); \endcode + - declare a pointer to a fifo type and initialize it with the address of the fifo you just created + \code + fifo_t *myFifo = fifoPointer(fifo_name); + \endcode - If you want multiple fifo's, just repeat the last step with other names for - the buffer, fifo and pointer. + You can instanciate multiple fifo with FIFO_INSTANCE and get the pointer to + them with fifoPointer(). +*/ - Test code: test_fifo.c +/** \file fifo.h + \ingroup circular_buffer + \brief Circular buffer (FIFO) \section Internals - fifo_s structure holds the stack buffer, it's size and 2 indexes. The input index - points to the last pushed value and the output index points to the last - popped value. + These routines are inspired from an article in Jack Ganssle's Embedded + Muse: http://www.ganssle.com/tem/tem110.pdf - The fifo is empty when both indexes are equal which means that the last - pushed value has been popped. The fifo is full when the output index is - the input index +1. There's still one free space in the fifo when it's full - but we can't use it while keeping the fifo handling simple. + The buffer size must be a power of 2 and is limited to 128. This simplyfies + the wrap-around to a single AND operation which is only applied when + accessing the buffer but not applied on the in and out indexes. The indexes + increase from 0 to 255 then wrap to 0. With this method, the buffer is + empty when the indexes are equal and is full when the difference is equal + to the buffer size. Thus we can't use a buffer of 256 as it wouldn't be + possible to differentiate the buffer when it's empty or full. +*/ - Here's a diagram that shows how indexes change while the fiffo is filled - and emptied. The fifo is 8 bytes long and indexes are intialized at 0. +/* + * Hidden from the interface + */ - \image html fifo_fifostates.png "Fifo states" +/** \brief Fifo structure type which holds the buffer, it's size, input and + * output indexes. + * + * This structure is hidden from the application and should not be accessed + * directly. + */ +typedef struct fifo_t fifo_t; +struct fifo_t { + /** buffer array */ + uint8_t *buffer; + /** size of the buffer */ + uint8_t const size; + /** input index, points to the next empty cell */ + uint8_t inIdx; + /** output index, points to the next value to get */ + uint8_t outIdx; +}; -*/ +/** \addtogroup circular_buffer */ +/*! @{ */ -/** \file fifo.h - \ingroup single_size_fifo - \brief Single size fifo +/** \brief Status which is returned by some functions. */ +enum FIFO_STATUS {FIFO_OK = 0, FIFO_FULL, FIFO_EMPTY}; -*/ +/** \name Initialization */ +/*! @{ */ /* - * Adaptive parameters + * Initialization */ -/** \brief UD- Rate at which the adaptation is done. + +/** \brief This macro instanciates a fifo given its name and its size. The fifo + * can then be accessed with fifoPointer(). * - * The adaptation function will only be run each 2^FIFO_ADAPT_RATE sample */ -#define FIFO_ADAPT_RATE 3 /* adaptation is done each 2^FIFO_ADAPT_RATE sample */ + * The macro declares the fifo buffer and a the fifo structure which holds the + * buffer, the size and the indexes. Using this macro somehow hides the + * structure from the application. + * + * The real buffer is named with the fifo name appended with _buf and the fifo + * structure is named with the fifo name appended with _struct. + */ +#define FIFO_INSTANCE(fifo_name, fifo_size) \ + uint8_t fifo_name##_buf[fifo_size]; \ + fifo_t fifo_name##_struct = {fifo_name##_buf, sizeof fifo_name##_buf, 0, 0} -/** \brief UD- High level threshold */ -#define FIFO_ADAPT_HIGH (p->size - (p->size>>2)) /* 3/4 of size */ +/** \brief Return the address of the fifo + * \param fifo_name Name of the fifo you defined with FIFO_INSTANCE. + * \return pointer to the fifo + * + * As the structure should be hidden from the application, this macro should + * be used to return the address of a given fifo. + */ +#define fifoPointer(fifo_name) (&fifo_name##_struct) -/** \brief UD- Low level threshold */ -#define FIFO_ADAPT_LOW (p->size>>2) /* 1/4 of size */ +/*! @} */ -/** \brief Fifo structure type which holds the buffer, it's size, input and - * output indexes. +/** \name Interface */ +/*! @{ */ +/* + * Interface + */ - Note that the buffer can only hold (size - 1) elements to be able to - make the difference between completely full and completely empty states. - */ -typedef struct fifo_s -{ - /** array that will store the elements */ - uint8_t *buffer; - /** size of the fifo buffer array minus 1 - * The wrap around is made by a 'AND' function so the AND should be made with - * the (array size -1) to be able to clear all bits above the array size. - * This -1 is not related to the fact that the buffer can only hold (size -1) - * elements. */ - uint8_t size; - /** input index which indexes the last pushed value */ - uint8_t inIdx; - /** output index which indexes the last popped value */ - uint8_t outIdx; -} fifo_t; +/** \brief Return the number size of the fifo buffer. + * \param p Fifo pointer. + * \return Size of the buffer. + */ +#define FifoSize(p) (p->size) -/* - * Extern declarations +void FifoClear(fifo_t *p); +uint8_t FifoFull(fifo_t const *p); + +/** \brief Return the number of elements in the fifo buffer. + * \param p Fifo pointer. + * \return Number of elements in the buffer. */ +#define FifoLength(p) (uint8_t)(p->inIdx - p->outIdx) -void resetFifo(fifo_t * p); -uint8_t isFifoFull(fifo_t * p); -uint8_t isFifoEmpty(fifo_t * p); -uint8_t fifoLength(fifo_t * p); -void pushFifo(fifo_t * p, uint8_t data); -uint8_t popFifo(fifo_t * p, uint8_t * data); -uint8_t getFifo(fifo_t * p, uint8_t * data); -uint8_t pullFifo(fifo_t * p); -void adaptFifo(fifo_t * p); +int8_t FifoPut(fifo_t *p, uint8_t const data); +int8_t FifoGet(fifo_t *p, uint8_t *data); -#endif /* FIFO_H */ +/*! @} */ +/*! @} */ +#endif /* _FIFO_H_ */ Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-08-21 09:51:33 UTC (rev 463) +++ firmware/tuxcore/trunk/main.c 2007-08-21 14:00:12 UTC (rev 464) @@ -356,48 +356,48 @@ #define STATUS_BYTE_SIZE 20 void updateStatus(void) { - if (fifoLength(statusFifo) >= (STATUS_BUF_SIZE - STATUS_BYTE_SIZE - 1)) + if (FifoLength(statusFifo) >= (STATUS_BUF_SIZE - STATUS_BYTE_SIZE - 1)) return; /* if there's not enough place, we dont save. -1 is because the fifo real size is buffer size -1 */ statusFifoFlag = 1; - pushFifo(statusFifo, STATUS_SENSORS1_CMD); - pushFifo(statusFifo, gStatus.sw); - pushFifo(statusFifo, gStatus.mic); - pushFifo(statusFifo, gStatus.bat); - pushFifo(statusFifo, STATUS_PORTS_CMD); - pushFifo(statusFifo, PINB); - pushFifo(statusFifo, PINC); - pushFifo(statusFifo, PIND); - pushFifo(statusFifo, STATUS_POSITION1_CMD); - pushFifo(statusFifo, eyesPosCnt); - pushFifo(statusFifo, mouthPosCnt); - pushFifo(statusFifo, wingsPosCnt); - pushFifo(statusFifo, STATUS_POSITION2_CMD); - pushFifo(statusFifo, spinPosCnt); - pushFifo(statusFifo, gStatus.pos); - pushFifo(statusFifo, 0); + FifoPut(statusFifo, STATUS_SENSORS1_CMD); + FifoPut(statusFifo, gStatus.sw); + FifoPut(statusFifo, gStatus.mic); + FifoPut(statusFifo, gStatus.bat); + FifoPut(statusFifo, STATUS_PORTS_CMD); + FifoPut(statusFifo, PINB); + FifoPut(statusFifo, PINC); + FifoPut(statusFifo, PIND); + FifoPut(statusFifo, STATUS_POSITION1_CMD); + FifoPut(statusFifo, eyesPosCnt); + FifoPut(statusFifo, mouthPosCnt); + FifoPut(statusFifo, wingsPosCnt); + FifoPut(statusFifo, STATUS_POSITION2_CMD); + FifoPut(statusFifo, spinPosCnt); + FifoPut(statusFifo, gStatus.pos); + FifoPut(statusFifo, 0); if (light_f) /* send light measurement */ { light_f = 0; - pushFifo(statusFifo, STATUS_LIGHT_CMD); - pushFifo(statusFifo, gStatus.lightH); - pushFifo(statusFifo, gStatus.lightL); - pushFifo(statusFifo, gStatus.lightM); + FifoPut(statusFifo, STATUS_LIGHT_CMD); + FifoPut(statusFifo, gStatus.lightH); + FifoPut(statusFifo, gStatus.lightL); + FifoPut(statusFifo, gStatus.lightM); } if (ir_f) /* send received ir signals */ { ir_f--; - pushFifo(statusFifo, STATUS_IR_CMD); - pushFifo(statusFifo, gStatus.ir); - pushFifo(statusFifo, ir_f); - pushFifo(statusFifo, gStatus.ir); + FifoPut(statusFifo, STATUS_IR_CMD); + FifoPut(statusFifo, gStatus.ir); + FifoPut(statusFifo, ir_f); + FifoPut(statusFifo, gStatus.ir); } if (pingCnt) /* send pending pongs */ { pingCnt--; - pushFifo(statusFifo, PONG_CMD); - pushFifo(statusFifo, pingCnt); - pushFifo(statusFifo, 0); - pushFifo(statusFifo, 0); + FifoPut(statusFifo, PONG_CMD); + FifoPut(statusFifo, pingCnt); + FifoPut(statusFifo, 0); + FifoPut(statusFifo, 0); } statusFifoFlag = 0; Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-08-21 09:51:33 UTC (rev 463) +++ firmware/tuxcore/trunk/parser.c 2007-08-21 14:00:12 UTC (rev 464) @@ -206,7 +206,7 @@ uint8_t *data = (uint8_t *) & tag_version; for (i = 0; i < 12; i++) - pushFifo(statusFifo, pgm_read_byte(data++)); + FifoPut(statusFifo, pgm_read_byte(data++)); return; } |
From: jaguarondi <c2m...@c2...> - 2007-08-21 09:52:30
|
Author: jaguarondi Date: 2007-08-21 11:51:33 +0200 (Tue, 21 Aug 2007) New Revision: 463 Added: firmware/tuxcore/trunk/Doxyfile Modified: firmware/tuxcore/trunk/Makefile Log: Added a configuration file for doxygen. The documentation can be generated with 'make doc'. We can start documenting the code now ;-) Added: firmware/tuxcore/trunk/Doxyfile =================================================================== --- firmware/tuxcore/trunk/Doxyfile (rev 0) +++ firmware/tuxcore/trunk/Doxyfile 2007-08-21 09:51:33 UTC (rev 463) @@ -0,0 +1,1257 @@ +# Doxyfile 1.5.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file that +# follow. The default is UTF-8 which is also the encoding used for all text before +# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into +# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of +# possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = tuxcore + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = $(VERSION) + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + +# This tag can be used to specify the character encoding of the source files that +# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default +# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. +# See http://www.gnu.org/software/libiconv for the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = */.svn/* */dep/* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the output. +# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, +# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = doc + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to +# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to +# specify the directory where the mscgen tool resides. If left empty the tool is assumed to +# be found in the default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen will always +# show the root nodes and its direct children regardless of this setting. + +DOT_GRAPH_MAX_NODES = 50 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2007-08-08 11:46:24 UTC (rev 462) +++ firmware/tuxcore/trunk/Makefile 2007-08-21 09:51:33 UTC (rev 463) @@ -165,6 +165,16 @@ ## Other dependencies -include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) +# Generate documentation +.PHONY: doc +REVISION = $(shell sed -n "s/\#define SVN_REV\> *//p" svnrev.h) + + #TODO get the version number from version.h here +doc: export VERSION = "Version 0.3.0 UNRELEASED (Revision $(REVISION))" +doc: svnrev.h version.h + @echo "Generating documentation for tuxcore" $(VERSION) + doxygen ./Doxyfile + # Programming prog: $(PROJECT).hex tuxup $(PROJECT).hex $(PROJECT).eep |
From: madjar <c2m...@c2...> - 2007-08-08 11:47:14
|
Author: madjar Date: 2007-08-08 13:46:24 +0200 (Wed, 08 Aug 2007) New Revision: 462 Modified: api/python/trunk/tuxapi_class.py api/python/trunk/tuxapi_const.py Log: Change last commit so that all the new languages are supported, added a list of all voices (SPK_VOICE_LIST), and modified a few comments. Modified: api/python/trunk/tuxapi_class.py =================================================================== --- api/python/trunk/tuxapi_class.py 2007-08-06 23:04:25 UTC (rev 461) +++ api/python/trunk/tuxapi_class.py 2007-08-08 11:46:24 UTC (rev 462) @@ -4242,14 +4242,21 @@ Select a speaker voice Parameters: - "speaker" as integer : speaker id (SPK_FR_MALE|SPK_FR_FEMALE| - SPK_US_MALE|SPK_US_FEMALE) + "speaker" as integer : speaker id (SPK_FR_MALE|SPK_FR_FEMALE| + SPK_US_MALE|SPK_US_FEMALE| + SPK_B_FEMALE|SPK_D_MALE| + SPK_D_FEMALE|SPK_GB_MALE| + SPK_GB_FEMALE|SPK_AR_FEMALE| + SPK_DK_FEMALE|SPK_E_FEMALE| + SPK_I_FEMALE|SPK_NL_FEMALE| + SPK_N_FEMALE|SPK_P_FEMALE| + SPK_S_MALE|SPK_S_FEMALE) "pitch" as integer : raised pitch in % (100..330) Example: >>> tux.tts.select_voice(SPK_FR_MALE,100) """ - if speaker not in (SPK_FR_MALE, SPK_FR_FEMALE, SPK_US_MALE, SPK_US_FEMALE): + if speaker not in SPK_VOICE_LIST: if self.parent.print_warnings: print " Invalid speaker" return Modified: api/python/trunk/tuxapi_const.py =================================================================== --- api/python/trunk/tuxapi_const.py 2007-08-06 23:04:25 UTC (rev 461) +++ api/python/trunk/tuxapi_const.py 2007-08-08 11:46:24 UTC (rev 462) @@ -326,6 +326,10 @@ SPK_S_MALE_NAME = "Erik8k" SPK_S_FEMALE = 0x12 SPK_S_FEMALE_NAME = "Emma8k" +SPK_VOICE_LIST = (SPK_FR_MALE, SPK_FR_FEMALE, SPK_US_MALE, SPK_US_FEMALE, \ + SPK_B_FEMALE, SPK_D_MALE, SPK_D_FEMALE, SPK_GB_MALE, SPK_GB_FEMALE, \ + SPK_AR_FEMALE, SPK_DK_FEMALE, SPK_E_FEMALE, SPK_I_FEMALE, SPK_NL_FEMALE, \ + SPK_N_FEMALE, SPK_P_FEMALE, SPK_S_MALE, SPK_S_FEMALE) SPK_NAMES_LIST = ("Bruno8k", "Julie8k", "Ryan8k", "Heather8k","Sofie8k", "Klaus8k",\ "Sarah8k", "Graham8k","Lucy8k", "Salma8k", "Mette8k", "Maria8k", "Chiara8k",\ "Femke8k", "Kari8k", "Celia8k", "Erik8k", "Emma8k") |
From: madjar <c2m...@c2...> - 2007-08-06 23:05:21
|
Author: madjar Date: 2007-08-07 01:04:25 +0200 (Tue, 07 Aug 2007) New Revision: 461 Modified: api/python/trunk/tuxapi_class.py Log: Check that the speaker is valid before selecting it, in tux.tts.select_voice (it used to accept string, which caused errors later) Modified: api/python/trunk/tuxapi_class.py =================================================================== --- api/python/trunk/tuxapi_class.py 2007-07-03 16:03:57 UTC (rev 460) +++ api/python/trunk/tuxapi_class.py 2007-08-06 23:04:25 UTC (rev 461) @@ -4249,6 +4249,10 @@ Example: >>> tux.tts.select_voice(SPK_FR_MALE,100) """ + if speaker not in (SPK_FR_MALE, SPK_FR_FEMALE, SPK_US_MALE, SPK_US_FEMALE): + if self.parent.print_warnings: + print " Invalid speaker" + return if (pitch<100) or (pitch>330): if self.parent.print_warnings: print " Pitch not in range (100 - 330)" |
From: jaguarondi <c2m...@c2...> - 2007-07-03 16:04:33
|
Author: jaguarondi Date: 2007-07-03 18:03:57 +0200 (Tue, 03 Jul 2007) New Revision: 460 Modified: firmware/fuxrf/trunk/default/Makefile firmware/fuxrf/trunk/device.aps firmware/fuxrf/trunk/device.c firmware/tuxrf/trunk/default/Makefile firmware/tuxrf/trunk/device.aps firmware/tuxrf/trunk/device.c firmware/tuxrf/trunk/prot.c Log: * Added version numbers, the generated hex files can now be programmed with tuxup. * Fixed a warning in tuxrf about an uninitialized variable. Modified: firmware/fuxrf/trunk/default/Makefile =================================================================== --- firmware/fuxrf/trunk/default/Makefile 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/fuxrf/trunk/default/Makefile 2007-07-03 16:03:57 UTC (rev 460) @@ -18,12 +18,11 @@ ## Assembly specific flags ASMFLAGS = $(COMMON) -ASMFLAGS += $(CFLAGS) ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 ## Linker flags LDFLAGS = $(COMMON) -LDFLAGS += -Wl,--section-start=.bootloader=0x0F00 -Wl,-Map=device.map +LDFLAGS += -Wl,--section-start=.bootloader=0x0F00 -Wl,--section-start=.version=0x0EF0 -Wl,-Map=device.map LDFLAGS += -Wl,-section-start=.buffer_tx1=0x800100 LDFLAGS += -Wl,-section-start=.buffer_rx1=0x800140 LDFLAGS += -Wl,-section-start=.sof=0x8001e6 @@ -37,7 +36,7 @@ HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 ## Objects that must be built in order to link @@ -82,7 +81,7 @@ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ %.eep: $(TARGET) - -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ %.lss: $(TARGET) avr-objdump -h -S $< > $@ Modified: firmware/fuxrf/trunk/device.aps =================================================================== --- firmware/fuxrf/trunk/device.aps 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/fuxrf/trunk/device.aps 2007-07-03 16:03:57 UTC (rev 460) @@ -1 +1 @@ -<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>27-Jun-2007 13:48:50</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\david\My Documents\tux\firmware\fuxrf\trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>51</Item><Item>580</Item><Item>103</Item><Item>17</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>ACKmode</Variables><Variables>sof_ary</Variables><Variables>toy_id_h</Variables><Variables>toy_id_l</Variables><Variables>prf_buffer_tx</Variables><Variables>rf_tx_counter</Variables><Variables>tx_pac_len</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>pspi_buffer_rx</Variables><Variables>rf_buffer_tx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>pspi_buffer_tx</Variables><Variables>rf_header</Variables><Variables>rf_status</Variables><Variables>watchdog</Variables><Variables>gfilter</Variables><Variables>replaceFrequency</Variables><Variables>frequencyTable</Variables><Variables>commandBuffer</Variables><Variables>spiConfigFrame</Variables></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\Branches\RF_test\Branches\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\New_timing\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><SOURCEFILE>bootloader.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><OTHERFILE>default\device.lss</OTHERFILE><OTHERFILE>default\device.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega48</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>spi.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20070122\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20070122\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>258</Status></File00000><File00001><FileId>00001</FileId><FileName>prot.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>rf_ctrl.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>init.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>misc.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>bootloader.c</FileName><Status>1</Status></File00005><File00006><FileId>00006</FileId><FileName>spi.c</FileName><Status>258</Status></File00006></Files><Workspace><File00005><Position>262 71 1038 645</Position><LineCol>19 1</LineCol><State>Maximized</State></File00005></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> +<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>03-Jul-2007 17:26:25</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\david\My Documents\tux\firmware\fuxrf\trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>51</Item><Item>580</Item><Item>103</Item><Item>17</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>ACKmode</Variables><Variables>sof_ary</Variables><Variables>toy_id_h</Variables><Variables>toy_id_l</Variables><Variables>prf_buffer_tx</Variables><Variables>rf_tx_counter</Variables><Variables>tx_pac_len</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>pspi_buffer_rx</Variables><Variables>rf_buffer_tx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>pspi_buffer_tx</Variables><Variables>rf_header</Variables><Variables>rf_status</Variables><Variables>watchdog</Variables><Variables>gfilter</Variables><Variables>replaceFrequency</Variables><Variables>frequencyTable</Variables><Variables>commandBuffer</Variables><Variables>spiConfigFrame</Variables></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\Branches\RF_test\Branches\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\New_timing\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><SOURCEFILE>bootloader.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><HEADERFILE>version.h</HEADERFILE><HEADERFILE>commands.h</HEADERFILE><OTHERFILE>default\device.lss</OTHERFILE><OTHERFILE>default\device.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega48</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>spi.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS> -Wl,--section-start=.bootloader=0x0F00 -Wl,--section-start=.version=0x0EF0 </LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20060421\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20060421\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>258</Status></File00000><File00001><FileId>00001</FileId><FileName>prot.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>rf_ctrl.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>init.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>misc.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>bootloader.c</FileName><Status>1</Status></File00005><File00006><FileId>00006</FileId><FileName>spi.c</FileName><Status>258</Status></File00006></Files><Workspace><File00005><Position>303 72 1381 502</Position><LineCol>22 13</LineCol><State>Maximized</State></File00005></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> Modified: firmware/fuxrf/trunk/device.c =================================================================== --- firmware/fuxrf/trunk/device.c 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/fuxrf/trunk/device.c 2007-07-03 16:03:57 UTC (rev 460) @@ -7,19 +7,31 @@ #include "prot.h" #include "rf_ctrl.h" #include "spi.h" +#include "commands.h" +#include "version.h" -#ifdef WIFI -const unsigned char OffsetTbl[] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41 }; -#endif +/* + * Version number + */ +#define CPU_NUMBER DONGLERF_CPU_NUM /* sound CPU */ +const author_t author __attribute__((section(".version"))) = {AUTHOR_CMD, AUTHOR_ID, 0}; +const revision_t svn_revision __attribute__((section(".version"))) = {REVISION_CMD, REVISION_NUMBER, 0}; +const version_t tag_version __attribute__((section(".version"))) = {VERSION_CMD, CPU_NUMBER, VER_MAJOR, VER_MINOR, VER_UPDATE}; + /* Bootloader can be included with the program */ -#define BOOTLOADER 1 +#define BOOTLOADER 1 #if (BOOTLOADER) #include "bootloader.h" #endif + +#ifdef WIFI +const unsigned char OffsetTbl[] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41 }; +#endif + //***************************************************************************** //* Project: RF-Firmware for ISM * //* Function: main * Modified: firmware/tuxrf/trunk/default/Makefile =================================================================== --- firmware/tuxrf/trunk/default/Makefile 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/tuxrf/trunk/default/Makefile 2007-07-03 16:03:57 UTC (rev 460) @@ -13,17 +13,16 @@ ## Compile options common for all C compilation units. CFLAGS = $(COMMON) -CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -fsigned-char -fshort-enums +CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d ## Assembly specific flags ASMFLAGS = $(COMMON) -ASMFLAGS += $(CFLAGS) ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 ## Linker flags LDFLAGS = $(COMMON) -LDFLAGS += -Wl,--section-start=.bootloader=0x1100 -Wl,-Map=device.map +LDFLAGS += -Wl,--section-start=.bootloader=0x0F00 -Wl,--section-start=.version=0x0EF0 -Wl,-Map=device.map LDFLAGS += -Wl,-section-start=.buffer_tx1=0x800100 LDFLAGS += -Wl,-section-start=.buffer_rx1=0x800140 LDFLAGS += -Wl,-section-start=.sof=0x8001e6 @@ -37,7 +36,7 @@ HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 ## Objects that must be built in order to link @@ -85,7 +84,7 @@ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ %.eep: $(TARGET) - -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ %.lss: $(TARGET) avr-objdump -h -S $< > $@ Modified: firmware/tuxrf/trunk/device.aps =================================================================== --- firmware/tuxrf/trunk/device.aps 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/tuxrf/trunk/device.aps 2007-07-03 16:03:57 UTC (rev 460) @@ -1 +1 @@ -<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>27-Jun-2007 13:55:49</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\david\My Documents\tux\firmware\tuxrf\trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>580</Item><Item>51</Item><Item>584</Item><Item>634</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>sof_ary</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>rf_buffer_tx2</Variables><Variables>headerb</Variables><Variables>commandBuffer</Variables><Variables>sleepMode</Variables></Pane1><Pane2><Variables>spi_count</Variables><Variables>spi_lenght</Variables><Variables>Test</Variables><Variables>sinus</Variables></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\New_timing\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\RF_test\Branches\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>sleep.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><SOURCEFILE>bootloader.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><HEADERFILE>sleep.h</HEADERFILE><OTHERFILE>default\device.map</OTHERFILE><OTHERFILE>default\device.lss</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega48</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>sleep.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>spi.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20070122\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20070122\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>258</Status></File00000><File00001><FileId>00001</FileId><FileName>prot.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>rf_ctrl.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>init.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>misc.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>sleep.c</FileName><Status>258</Status></File00005><File00006><FileId>00006</FileId><FileName>spi.c</FileName><Status>258</Status></File00006><File00007><FileId>00007</FileId><FileName>bootloader.c</FileName><Status>1</Status></File00007></Files><Workspace><File00007><Position>262 71 1038 645</Position><LineCol>0 0</LineCol><State>Maximized</State></File00007></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> +<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>03-Jul-2007 17:14:47</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\david\My Documents\tux\firmware\tuxrf\trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>580</Item><Item>51</Item><Item>584</Item><Item>634</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>sof_ary</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>rf_buffer_tx2</Variables><Variables>headerb</Variables><Variables>commandBuffer</Variables><Variables>sleepMode</Variables></Pane1><Pane2><Variables>spi_count</Variables><Variables>spi_lenght</Variables><Variables>Test</Variables><Variables>sinus</Variables></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\New_timing\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\RF_test\Branches\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>sleep.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><SOURCEFILE>bootloader.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><HEADERFILE>sleep.h</HEADERFILE><HEADERFILE>commands.h</HEADERFILE><HEADERFILE>version.h</HEADERFILE><OTHERFILE>default\device.map</OTHERFILE><OTHERFILE>default\device.lss</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega48</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>sleep.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>spi.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00 -Wl,--section-start=.version=0x0EF0</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20060421\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20060421\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>1</Status></File00000><File00001><FileId>00001</FileId><FileName>rf_ctrl.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>init.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>misc.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>sleep.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>spi.c</FileName><Status>258</Status></File00005></Files><Workspace><File00000><Position>303 72 1381 502</Position><LineCol>0 0</LineCol><State>Maximized</State></File00000></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> Modified: firmware/tuxrf/trunk/device.c =================================================================== --- firmware/tuxrf/trunk/device.c 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/tuxrf/trunk/device.c 2007-07-03 16:03:57 UTC (rev 460) @@ -9,6 +9,8 @@ #include "rf_ctrl.h" #include "spi.h" #include "sleep.h" +#include "commands.h" +#include "version.h" /* Bootloader can be included with the program */ #define BOOTLOADER 1 @@ -17,6 +19,15 @@ #include "bootloader.h" #endif +/* + * Version number + */ + +#define CPU_NUMBER TUXRF_CPU_NUM /* sound CPU */ +const author_t author __attribute__((section(".version"))) = {AUTHOR_CMD, AUTHOR_ID, 0}; +const revision_t svn_revision __attribute__((section(".version"))) = {REVISION_CMD, REVISION_NUMBER, 0}; +const version_t tag_version __attribute__((section(".version"))) = {VERSION_CMD, CPU_NUMBER, VER_MAJOR, VER_MINOR, VER_UPDATE}; + //***************************************************************************** //* Project: RF-Firmware for ISM * //* Function: main * Modified: firmware/tuxrf/trunk/prot.c =================================================================== --- firmware/tuxrf/trunk/prot.c 2007-06-28 23:15:02 UTC (rev 459) +++ firmware/tuxrf/trunk/prot.c 2007-07-03 16:03:57 UTC (rev 460) @@ -21,7 +21,7 @@ void system_start_up(void) { unsigned char i, out, sleepCmpt; - unsigned char RFinitState; // Init state machine variable + unsigned char RFinitState = WAIT_LOG; // Init state machine variable ui_16 j; rf_status |= SLAVE; // Set rf status like slave |
From: boblefrag <c2m...@c2...> - 2007-06-28 23:15:41
|
Author: boblefrag Date: 2007-06-29 01:15:02 +0200 (Fri, 29 Jun 2007) New Revision: 459 Added: software/tux_pc_control/branches/ software/tux_pc_control/branches/0.0.2/ software/tux_pc_control/branches/0.0.2/README software/tux_pc_control/branches/0.0.2/config.py software/tux_pc_control/branches/0.0.2/control.py software/tux_pc_control/branches/0.0.2/tux_control.py software/tux_pc_control/tags/ software/tux_pc_control/trunk/ software/tux_pc_control/trunk/README software/tux_pc_control/trunk/config.py software/tux_pc_control/trunk/control.py software/tux_pc_control/trunk/tux_control.py Log: Added: software/tux_pc_control/branches/0.0.2/README =================================================================== --- software/tux_pc_control/branches/0.0.2/README (rev 0) +++ software/tux_pc_control/branches/0.0.2/README 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,54 @@ +...............................................README .......................................... + +PREREQUIST + +you must have XMMS instaled on your system with xmms-xmmplayer + +for being able to play audio via your tux, open xmms, rigth click, go to preferences +1) choose the oss plugins for audio-out, click on configure and select usb AUDIO and USB mixer + +2) next, select mplayer plugin, click on configure in path to mplayer type : /usr/bin/mplayer uncheck all options + IN mplayer tab, in 'Override audio output device, type oss:/dev/dsp2 (or oss:/dev/dsp1 if tux is on /dev/dsp1) + + that's all folks now you can use my script + + + CONFIGURATION FILE + +in the tux_pc_control, you will find a file named config.py edit it to fit your system configuration, add your radio etc ... + + + PLAY THE SCRIPT + +whith a terminal, go to tux_pc_control directory and type 'python tux_control.py' + + + REMOTE KEY + + + BROWSERING + + KEY OK : go to the selected directory + KEY LEFT : select previous directory + KEY RIGHT : select next directory + KEY UP : GO in th parent directory + + PLAYING MUSIC + + KEY play/pause : play all the music in the current directory/pause xmms + KEY STOP : stop the music + KEY escape : shut off xmms + KEY Previous : play the previous song + KEY Next : play the next song + + LISTENING RADIO + + KEY CHANNELPLUS : play the next radio + KEY CHANNELMINUX : play the previous radio + + NOTA: the control key for music work also for radio (play/pause, stop) + + don't hesitate to participate, modify and redistribute this script !!! + author : yohann Gabory <mrg...@ya...> + + Added: software/tux_pc_control/branches/0.0.2/config.py =================================================================== --- software/tux_pc_control/branches/0.0.2/config.py (rev 0) +++ software/tux_pc_control/branches/0.0.2/config.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,12 @@ +#!/usr/bin/python +# -*- coding: utf8 -*- + +#modify this file to fit your configuration + +player = ['xmms'] #the player you are using. For now don't modify this because it works only whith xmms +musique = '/home/yohann/culture/musique' # where are your mp3 +format = ('mp3','ogg','wav',) # put here all the musical format you want tux be able to read + +## feel free to add all the radio's you like :)) +radio = [('france inter','http://213.205.96.91:9915/'),('france info','mms://vip9.yacast.fr/encoderfranceinfo'),('france culture','mms://viptvr.yacast.net/tvr_franceculture'),('fipe','mms://viptvr2.yacast.net/encoderfip'),] + Added: software/tux_pc_control/branches/0.0.2/control.py =================================================================== --- software/tux_pc_control/branches/0.0.2/control.py (rev 0) +++ software/tux_pc_control/branches/0.0.2/control.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# ----------------------------------------------------------------------------- +# Tux Droid - Tux_control PC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- +# $Id: $ +# ----------------------------------------------------------------------------- + +""" +CHANGES +======= +2007/06/25 - version 0.0.1: + - Initial version + - tux browse your directories. + -tux play all the music in your directories + -tux can play your radio + -you can pause/stop, skip your song +TODO LIST +======== +- make tux use mplayer instead of xmms for using it without a gui +- enable shuffle, creation of playlist, radio-recording +- get some file info whith mp3 tag +- make tux to be able to browse song, and to play recusively a directory +- documentation of the fonctions +""" + +__author__ = "Yohann Gabory <mrg...@ya...>" +__appname__ = "Tux_PC_control" +__version__ = "0.0.1" +__date__ = "2007/06/25" +__license__ = "GPL" + + + + + + +from os import * +from config import * +def recherche(bolean): + a = getcwd() + repertoires =[a] + fichiers = [] + fichiers2 =[] + repertoire = repertoires.pop() + for nom in listdir(repertoire): + chemin = path.join(repertoire,nom) + if path.isfile(chemin): + (filepath,filename) = path.split(chemin) + (shortname, extention) = path.splitext(filename) + print format + for f in format: + print f + f = '.' + f + if extention == f: + fichiers.append(chemin) + for chemin in fichiers: + d = '' + for i in chemin: + if i == ' ': + i = '\ ' + if i =="'": + i = "\\"+i + if i =='(': + i = "\(" + if i ==')': + i ='\)' + d = d + i + fichiers2.append(d) + elif path.isdir(chemin): + repertoires.append(chemin) + if bolean == 0: + return fichiers2 + if bolean == 1: + return repertoires + # C'est un répertoire + + + + + + +#end of file + Added: software/tux_pc_control/branches/0.0.2/tux_control.py =================================================================== --- software/tux_pc_control/branches/0.0.2/tux_control.py (rev 0) +++ software/tux_pc_control/branches/0.0.2/tux_control.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,297 @@ +#!/usr/bin/python +# -*- coding: utf8 -*- + + + +# Tux Pc control +#Un programme pour contrôler son ordinateur grace au tux + + +# ----------------------------------------------------------------------------- +# Tux Droid - Tux_control PC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- +# $Id: $ +# ----------------------------------------------------------------------------- + +""" +CHANGES +======= +2007/06/29 - version 0.0.2 + -small changes + - it's no more necessary to push the 1 key to play radio + - tux.destroy() adde at the end of the script to close tux_control gracefully + - key escape replace standby to close xmms +2007/06/25 - version 0.0.1: + - Initial version + - tux browse your directories. + -tux play all the music in your directories + -tux can play your radio + -you can pause/stop, skip your song +TODO LIST +======== +- make tux use mplayer instead of xmms for using it without a gui +- enable shuffle, creation of playlist, radio-recording +- get some file info whith mp3 tag +- make tux to be able to browse song, and to play recusively a directory +- documentation of the fonctions +""" + +__author__ = "Yohann Gabory <mrg...@ya...>" +__appname__ = "Tux_PC_control" +__version__ = "0.0.1" +__date__ = "2007/06/25" +__license__ = "GPL" + + + + + + + + +import sys +sys.path.append('/opt/tuxdroid/api/python') +from tux import * + +#other +from os import * +from os import listdir +import string +import sys +from config import * +from control import * +global count, liste_radio +count = 0 +root = musique +liste_radio = 0 +chdir(root) +print root + +def Ok(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + + chdir(courant) + a = getcwd() + b= recherche(1) + c= recherche(0) + d=len(c) + + d=str(d) + if d == 0: + d = 'aucune' + if d == 1: + d = 'une' + tux_speak('il y a'+d+'chansons dans ce répertoire') + maxdir = len(b)-1 + if maxdir == -1: + tux.event.set_on_remote_bt(K_RIGHT, exeption) + tux.event.set_on_remote_bt(K_LEFT, exeption) + tux.event.set_on_remote_bt(K_OK, exeption) +def exeption(): + tux_speak('ce répertoire est vide') + haut() + tux.event.set_on_remote_bt(K_RIGHT, plus) + tux.event.set_on_remote_bt(K_LEFT, moins) + tux.event.set_on_remote_bt(K_OK, Ok) +def Pourtous(): + a = getcwd() + a = string.split(a,'/') + return a + + + +def haut(): + a=Pourtous() + del(a[-1]) + b ="" + for i in a: + b = b + i + '/' + chdir(b) + c = listdir(b) + dire = a[-1] + speech = '' + for i in dire: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def plus(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + count = count +1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def moins(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + count = count -1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def play_all(): + tux.cmd.mouth_open() + xmms = 'xmms' + ' ' + for f in format: + f = '.' + f + xmms = xmms + ' *' + f + print xmms + tux.sys.shell_free(xmms) + + + +def tux_speak(text): + tux.cmd.mouth_open() + tux.tts.select_voice(1,100) + tux.tts.speak(text) + tux.cmd.mouth_close() + +def france_inter(): + xmms_radio = 'xmms ' + radio + tux.sys.shell_free(xmms_radio) + + +def radio_web(): + global liste_radio + liste_radio = 0 + tux_speak('pour écouter la radio, utilisé les touches chaines plus et chaines moins.') + + +def next_radio(): + global liste_radio + elem = len(radio) + liste_radio = liste_radio + 1 + if liste_radio >= elem: + liste_radio = 0 + b = radio[liste_radio] + titre = b[0] + flux = b[1] + tux_speak(titre) + xmms_radio = 'xmms ' + flux + tux.sys.shell_free(xmms_radio) + +def prev_radio(): + global liste_radio + elem = len(radio) + liste_radio = liste_radio - 1 + if liste_radio < 0: + liste_radio = elem -1 + b = radio[liste_radio] + titre = b[0] + flux = b[1] + tux_speak(titre) + xmms_radio = 'xmms ' + flux + tux.sys.shell_free(xmms_radio) + +def stop(): + tux.sys.shell_free('xmms -s') + +def exit(): + tux.cmd.mouth_close() + tux.sys.shell('rm ~/.xmms/xmms.m3u') + tux.sys.shell('xmms -q') + +def next(): + tux.sys.shell_free('xmms -f') + + +def prev(): + tux.sys.shell_free('xmms -r') + +def increase_volume(): #don't work ! + tux.sys.shell("amixer set PCM 5%+") + +def decrease_volume(): #don't work ! + tux.sys.shell("amixer set PCM 5%-") + + +tux.event.set_on_remote_bt(K_1, radio_web) + +tux.event.set_on_remote_bt(K_VOLUMEPLUS, increase_volume) +tux.event.set_on_remote_bt(K_VOLUMEMINUS, decrease_volume) + +tux.event.set_on_remote_bt(K_CHANNELPLUS, next_radio) +tux.event.set_on_remote_bt(K_CHANNELMINUS, prev_radio) +tux.event.set_on_remote_bt(K_NEXT, next) +tux.event.set_on_remote_bt(K_PREVIOUS, prev) +tux.event.set_on_remote_bt(K_ESCAPE, exit) +tux.event.set_on_remote_bt(K_UP, haut) +tux.event.set_on_remote_bt(K_STOP, stop) +tux.event.set_on_remote_bt(K_OK, Ok) +tux.event.set_on_remote_bt(K_RIGHT, plus) +tux.event.set_on_remote_bt(K_LEFT, moins) +tux.event.set_on_remote_bt(K_PLAYPAUSE, play_all) + +tux.event.wait_bt_pushed(9999) +tux.destroy() Property changes on: software/tux_pc_control/branches/0.0.2/tux_control.py ___________________________________________________________________ Name: svn:executable + * Added: software/tux_pc_control/trunk/README =================================================================== --- software/tux_pc_control/trunk/README (rev 0) +++ software/tux_pc_control/trunk/README 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,54 @@ +...............................................README .......................................... + +PREREQUIST + +you must have XMMS instaled on your system with xmms-xmmplayer + +for being able to play audio via your tux, open xmms, rigth click, go to preferences +1) choose the oss plugins for audio-out, click on configure and select usb AUDIO and USB mixer + +2) next, select mplayer plugin, click on configure in path to mplayer type : /usr/bin/mplayer uncheck all options + IN mplayer tab, in 'Override audio output device, type oss:/dev/dsp2 (or oss:/dev/dsp1 if tux is on /dev/dsp1) + + that's all folks now you can use my script + + + CONFIGURATION FILE + +in the tux_pc_control, you will find a file named config.py edit it to fit your system configuration, add your radio etc ... + + + PLAY THE SCRIPT + +whith a terminal, go to tux_pc_control directory and type 'python tux_control.py' + + + REMOTE KEY + + + BROWSERING + + KEY OK : go to the selected directory + KEY LEFT : select previous directory + KEY RIGHT : select next directory + KEY UP : GO in th parent directory + + PLAYING MUSIC + + KEY play/pause : play all the music in the current directory/pause xmms + KEY STOP : stop the music + KEY escape : shut off xmms + KEY Previous : play the previous song + KEY Next : play the next song + + LISTENING RADIO + + KEY CHANNELPLUS : play the next radio + KEY CHANNELMINUX : play the previous radio + + NOTA: the control key for music work also for radio (play/pause, stop) + + don't hesitate to participate, modify and redistribute this script !!! + author : yohann Gabory <mrg...@ya...> + + Added: software/tux_pc_control/trunk/config.py =================================================================== --- software/tux_pc_control/trunk/config.py (rev 0) +++ software/tux_pc_control/trunk/config.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,12 @@ +#!/usr/bin/python +# -*- coding: utf8 -*- + +#modify this file to fit your configuration + +player = ['xmms'] #the player you are using. For now don't modify this because it works only whith xmms +musique = '/home/yohann/culture/musique' # where are your mp3 +format = ('mp3','ogg','wav',) # put here all the musical format you want tux be able to read + +## feel free to add all the radio's you like :)) +radio = [('france inter','http://213.205.96.91:9915/'),('france info','mms://vip9.yacast.fr/encoderfranceinfo'),('france culture','mms://viptvr.yacast.net/tvr_franceculture'),('fipe','mms://viptvr2.yacast.net/encoderfip'),] + Added: software/tux_pc_control/trunk/control.py =================================================================== --- software/tux_pc_control/trunk/control.py (rev 0) +++ software/tux_pc_control/trunk/control.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# ----------------------------------------------------------------------------- +# Tux Droid - Tux_control PC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- +# $Id: $ +# ----------------------------------------------------------------------------- + +""" +CHANGES +======= +2007/06/25 - version 0.0.1: + - Initial version + - tux browse your directories. + -tux play all the music in your directories + -tux can play your radio + -you can pause/stop, skip your song +TODO LIST +======== +- make tux use mplayer instead of xmms for using it without a gui +- enable shuffle, creation of playlist, radio-recording +- get some file info whith mp3 tag +- make tux to be able to browse song, and to play recusively a directory +- documentation of the fonctions +""" + +__author__ = "Yohann Gabory <mrg...@ya...>" +__appname__ = "Tux_PC_control" +__version__ = "0.0.1" +__date__ = "2007/06/25" +__license__ = "GPL" + + + + + + +from os import * +from config import * +def recherche(bolean): + a = getcwd() + repertoires =[a] + fichiers = [] + fichiers2 =[] + repertoire = repertoires.pop() + for nom in listdir(repertoire): + chemin = path.join(repertoire,nom) + if path.isfile(chemin): + (filepath,filename) = path.split(chemin) + (shortname, extention) = path.splitext(filename) + print format + for f in format: + print f + f = '.' + f + if extention == f: + fichiers.append(chemin) + for chemin in fichiers: + d = '' + for i in chemin: + if i == ' ': + i = '\ ' + if i =="'": + i = "\\"+i + if i =='(': + i = "\(" + if i ==')': + i ='\)' + d = d + i + fichiers2.append(d) + elif path.isdir(chemin): + repertoires.append(chemin) + if bolean == 0: + return fichiers2 + if bolean == 1: + return repertoires + # C'est un répertoire + + + + + + +#end of file + Added: software/tux_pc_control/trunk/tux_control.py =================================================================== --- software/tux_pc_control/trunk/tux_control.py (rev 0) +++ software/tux_pc_control/trunk/tux_control.py 2007-06-28 23:15:02 UTC (rev 459) @@ -0,0 +1,297 @@ +#!/usr/bin/python +# -*- coding: utf8 -*- + + + +# Tux Pc control +#Un programme pour contrôler son ordinateur grace au tux + + +# ----------------------------------------------------------------------------- +# Tux Droid - Tux_control PC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- +# $Id: $ +# ----------------------------------------------------------------------------- + +""" +CHANGES +======= +2007/06/29 - version 0.0.2 + -small changes + - it's no more necessary to push the 1 key to play radio + - tux.destroy() adde at the end of the script to close tux_control gracefully + - key escape replace standby to close xmms +2007/06/25 - version 0.0.1: + - Initial version + - tux browse your directories. + -tux play all the music in your directories + -tux can play your radio + -you can pause/stop, skip your song +TODO LIST +======== +- make tux use mplayer instead of xmms for using it without a gui +- enable shuffle, creation of playlist, radio-recording +- get some file info whith mp3 tag +- make tux to be able to browse song, and to play recusively a directory +- documentation of the fonctions +""" + +__author__ = "Yohann Gabory <mrg...@ya...>" +__appname__ = "Tux_PC_control" +__version__ = "0.0.1" +__date__ = "2007/06/25" +__license__ = "GPL" + + + + + + + + +import sys +sys.path.append('/opt/tuxdroid/api/python') +from tux import * + +#other +from os import * +from os import listdir +import string +import sys +from config import * +from control import * +global count, liste_radio +count = 0 +root = musique +liste_radio = 0 +chdir(root) +print root + +def Ok(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + + chdir(courant) + a = getcwd() + b= recherche(1) + c= recherche(0) + d=len(c) + + d=str(d) + if d == 0: + d = 'aucune' + if d == 1: + d = 'une' + tux_speak('il y a'+d+'chansons dans ce répertoire') + maxdir = len(b)-1 + if maxdir == -1: + tux.event.set_on_remote_bt(K_RIGHT, exeption) + tux.event.set_on_remote_bt(K_LEFT, exeption) + tux.event.set_on_remote_bt(K_OK, exeption) +def exeption(): + tux_speak('ce répertoire est vide') + haut() + tux.event.set_on_remote_bt(K_RIGHT, plus) + tux.event.set_on_remote_bt(K_LEFT, moins) + tux.event.set_on_remote_bt(K_OK, Ok) +def Pourtous(): + a = getcwd() + a = string.split(a,'/') + return a + + + +def haut(): + a=Pourtous() + del(a[-1]) + b ="" + for i in a: + b = b + i + '/' + chdir(b) + c = listdir(b) + dire = a[-1] + speech = '' + for i in dire: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def plus(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + count = count +1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def moins(): + a = getcwd() + b= recherche(1) + global count + maxdir = len(b)-1 + count = count -1 + if count > maxdir: + count = 0 + if count < 0 : + count = maxdir + courant = b[count] + (filepath,filename) = path.split(courant) + speech = '' + for i in filename: + if i == '-': + i = ' ' + if i == '_': + i = ' ' + if i == '=': + i = ' ' + speech = speech + i + tux_speak(speech) + +def play_all(): + tux.cmd.mouth_open() + xmms = 'xmms' + ' ' + for f in format: + f = '.' + f + xmms = xmms + ' *' + f + print xmms + tux.sys.shell_free(xmms) + + + +def tux_speak(text): + tux.cmd.mouth_open() + tux.tts.select_voice(1,100) + tux.tts.speak(text) + tux.cmd.mouth_close() + +def france_inter(): + xmms_radio = 'xmms ' + radio + tux.sys.shell_free(xmms_radio) + + +def radio_web(): + global liste_radio + liste_radio = 0 + tux_speak('pour écouter la radio, utilisé les touches chaines plus et chaines moins.') + + +def next_radio(): + global liste_radio + elem = len(radio) + liste_radio = liste_radio + 1 + if liste_radio >= elem: + liste_radio = 0 + b = radio[liste_radio] + titre = b[0] + flux = b[1] + tux_speak(titre) + xmms_radio = 'xmms ' + flux + tux.sys.shell_free(xmms_radio) + +def prev_radio(): + global liste_radio + elem = len(radio) + liste_radio = liste_radio - 1 + if liste_radio < 0: + liste_radio = elem -1 + b = radio[liste_radio] + titre = b[0] + flux = b[1] + tux_speak(titre) + xmms_radio = 'xmms ' + flux + tux.sys.shell_free(xmms_radio) + +def stop(): + tux.sys.shell_free('xmms -s') + +def exit(): + tux.cmd.mouth_close() + tux.sys.shell('rm ~/.xmms/xmms.m3u') + tux.sys.shell('xmms -q') + +def next(): + tux.sys.shell_free('xmms -f') + + +def prev(): + tux.sys.shell_free('xmms -r') + +def increase_volume(): #don't work ! + tux.sys.shell("amixer set PCM 5%+") + +def decrease_volume(): #don't work ! + tux.sys.shell("amixer set PCM 5%-") + + +tux.event.set_on_remote_bt(K_1, radio_web) + +tux.event.set_on_remote_bt(K_VOLUMEPLUS, increase_volume) +tux.event.set_on_remote_bt(K_VOLUMEMINUS, decrease_volume) + +tux.event.set_on_remote_bt(K_CHANNELPLUS, next_radio) +tux.event.set_on_remote_bt(K_CHANNELMINUS, prev_radio) +tux.event.set_on_remote_bt(K_NEXT, next) +tux.event.set_on_remote_bt(K_PREVIOUS, prev) +tux.event.set_on_remote_bt(K_ESCAPE, exit) +tux.event.set_on_remote_bt(K_UP, haut) +tux.event.set_on_remote_bt(K_STOP, stop) +tux.event.set_on_remote_bt(K_OK, Ok) +tux.event.set_on_remote_bt(K_RIGHT, plus) +tux.event.set_on_remote_bt(K_LEFT, moins) +tux.event.set_on_remote_bt(K_PLAYPAUSE, play_all) + +tux.event.wait_bt_pushed(9999) +tux.destroy() Property changes on: software/tux_pc_control/trunk/tux_control.py ___________________________________________________________________ Name: svn:executable + * |
From: boblefrag <c2m...@c2...> - 2007-06-28 22:31:15
|
Author: boblefrag Date: 2007-06-29 00:30:45 +0200 (Fri, 29 Jun 2007) New Revision: 458 Added: software/tux_pc_control/ Log: |
From: jaguarondi <c2m...@c2...> - 2007-06-27 14:12:06
|
Author: jaguarondi Date: 2007-06-27 16:11:25 +0200 (Wed, 27 Jun 2007) New Revision: 457 Modified: firmware/fuxrf/trunk/bootloader.c firmware/fuxrf/trunk/bootloader.h firmware/fuxrf/trunk/default/Makefile firmware/fuxrf/trunk/defines.h firmware/fuxrf/trunk/device.aps firmware/fuxrf/trunk/device.c firmware/fuxrf/trunk/init.c firmware/fuxrf/trunk/misc.c firmware/fuxrf/trunk/prot.c firmware/fuxrf/trunk/spi.c firmware/fuxrf/trunk/varis.c firmware/fuxrf/trunk/varis.h firmware/tuxrf/trunk/bootloader.c firmware/tuxrf/trunk/bootloader.h firmware/tuxrf/trunk/default/Makefile firmware/tuxrf/trunk/defines.h firmware/tuxrf/trunk/device.aps firmware/tuxrf/trunk/device.c firmware/tuxrf/trunk/init.c firmware/tuxrf/trunk/misc.c firmware/tuxrf/trunk/prot.c firmware/tuxrf/trunk/sleep.c firmware/tuxrf/trunk/spi.c firmware/tuxrf/trunk/varis.c firmware/tuxrf/trunk/varis.h Log: * Fixed minor stuff on the RF firmware so that they now compile under AVRStudio. Note that they only work with the 2006 version of Winavr and gcc-3.4.6 as gcc-4.1.1 o gcc-4.1.2 produces bigger code and that doesn't fit anymore in the ATMega48. Modified: firmware/fuxrf/trunk/bootloader.c =================================================================== --- firmware/fuxrf/trunk/bootloader.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/bootloader.c 2007-06-27 14:11:25 UTC (rev 457) @@ -39,8 +39,8 @@ i2cWaitForComplete(); /* wait the low byte of the page address */ if ((twStatus = TW_STATUS) != TW_SR_DATA_ACK) while(1); pageAddress.b[0] = TWDR; - if (pageAddress.w & 0x003F) while(1); /* incorrect page address */$ - if (pageAddress.w >= 0x0F00) while(1); /* don't overwrite the bootloader */$ + if (pageAddress.w & 0x003F) while(1); /* incorrect page address */ + if (pageAddress.w >= 0x0F00) while(1); /* don't overwrite the bootloader */ address = pageAddress.w; TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); for (i=0; i<SPM_PAGESIZE; i++) /* fill the complete page with the next data */ Modified: firmware/fuxrf/trunk/bootloader.h =================================================================== --- firmware/fuxrf/trunk/bootloader.h 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/bootloader.h 2007-06-27 14:11:25 UTC (rev 457) @@ -4,7 +4,7 @@ * Bootloader source code * created on 2006/11/25 David Bourgeois * ------------------------------------------------------------------- - * $Id$ + * $Id: bootloader.h 456 2007-06-26 14:12:36Z jaguarondi */ #ifndef _BOOTLOADER_H_ @@ -16,10 +16,10 @@ \brief Minimal I2C bootloader \author David Bourgeois \date 2006 -$ + The footprint is less than 0xFF bytes so it should be possible to place the bootlaoder at 0x0F00 in your application -$ + Use the following linker option: \code -Wl,--section-start=.bootloader=0x0F00 Modified: firmware/fuxrf/trunk/default/Makefile =================================================================== --- firmware/fuxrf/trunk/default/Makefile 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/default/Makefile 2007-06-27 14:11:25 UTC (rev 457) @@ -13,11 +13,12 @@ ## Compile options common for all C compilation units. CFLAGS = $(COMMON) -CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d ## Assembly specific flags ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 ## Linker flags @@ -36,7 +37,7 @@ HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings ## Objects that must be built in order to link @@ -81,7 +82,7 @@ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ %.eep: $(TARGET) - avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 %.lss: $(TARGET) avr-objdump -h -S $< > $@ Modified: firmware/fuxrf/trunk/defines.h =================================================================== --- firmware/fuxrf/trunk/defines.h 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/defines.h 2007-06-27 14:11:25 UTC (rev 457) @@ -8,10 +8,10 @@ #include <avr/pgmspace.h> #include <avr/eeprom.h> -// Define the used HOPPING SCHEME$ -#define HOPPING // No hopping, use signel channel TRX_CHANNEL. If no define use frequency hopping$ +// Define the used HOPPING SCHEME +#define HOPPING // No hopping, use signel channel TRX_CHANNEL. If no define use frequency hopping #define TRX_CHANNEL 90 -#define FHA // Use frequency hopping adaptativ$ +#define FHA // Use frequency hopping adaptativ #define WIFI @@ -23,9 +23,9 @@ //------->rf_status-Defines<-------// #define WAIT_HOPPING 0x02 -#define RXING 0x04$ +#define RXING 0x04 #define TXING 0x08 -#define LOGGED 0x10$ +#define LOGGED 0x10 #define FHA_EFFECTIVE 0x20 #define MASTER 0x40 #define SLAVE 0x80 @@ -97,7 +97,7 @@ // T_SLOT == 1ms ==> every 1000us 48 Bytes of payload are exchanged #define POLL_LOOPS 1 #define T_1ms 1728 // Exact -> 1000us - #define T_PWR_UP_TX 69 // 69 == 40us (39.93)$ + #define T_PWR_UP_TX 69 // 69 == 40us (39.93) #define T_LOOP_TX 341 // 341 == 197us (197.34) #define T_START_TX 59 // 59 == 34us (34.14) #define T_TX2RX 1259 // 1259 == 728us (728.59) @@ -106,7 +106,7 @@ #define T_RX_ON 260 // 260 == 150us (150.46) #define T_MAX_PAC_RX 1088 // 1088 == 630us (629.62) #define T_RX2TX 172 // 172 == 100us (99.54) - // ==> 48KB/second (384.000bps)$ + // ==> 48KB/second (384.000bps) //----->RF-Timing-Defines<-----// #endif Modified: firmware/fuxrf/trunk/device.aps =================================================================== --- firmware/fuxrf/trunk/device.aps 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/device.aps 2007-06-27 14:11:25 UTC (rev 457) @@ -1 +1 @@ -<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>12-Jun-2007 15:02:37</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\Pascal\Desktop\RF_test\Master\Trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>51</Item><Item>580</Item><Item>103</Item><Item>17</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>ACKmode</Variables><Variables>sof_ary</Variables><Variables>toy_id_h</Variables><Variables>toy_id_l</Variables><Variables>prf_buffer_tx</Variables><Variables>rf_tx_counter</Variables><Variables>tx_pac_len</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>pspi_buffer_rx</Variables><Variables>rf_buffer_tx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>pspi_buffer_tx</Variables><Variables>rf_header</Variables><Variables>rf_status</Variables><Variables>watchdog</Variables><Variables>gfilter</Variables><Variables>replaceFrequency</Variables><Variables>frequencyTable</Variables><Variables>commandBuffer</Variables><Variables>spiConfigFrame</Variables></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\Branches\RF_test\Branches\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\New_timing\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><OTHERFILE>default\device.lss</OTHERFILE><OTHERFILE>default\device.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega168</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\_WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\_WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>259</Status></File00000><File00001><FileId>00001</FileId><FileName>varis.c</FileName><Status>257</Status></File00001><File00002><FileId>00002</FileId><FileName>prot.c</FileName><Status>259</Status></File00002><File00003><FileId>00003</FileId><FileName>rf_ctrl.c</FileName><Status>259</Status></File00003><File00004><FileId>00004</FileId><FileName>init.c</FileName><Status>259</Status></File00004><File00005><FileId>00005</FileId><FileName>prot.h</FileName><Status>1</Status></File00005><File00006><FileId>00006</FileId><FileName>defines.h</FileName><Status>1</Status></File00006><File00007><FileId>00007</FileId><FileName>misc.c</FileName><Status>259</Status></File00007><File00008><FileId>00008</FileId><FileName>varis.h</FileName><Status>257</Status></File00008><File00009><FileId>00009</FileId><FileName>init.h</FileName><Status>1</Status></File00009><File00010><FileId>00010</FileId><FileName>bootloader.c</FileName><Status>2</Status></File00010><File00011><FileId>00011</FileId><FileName>bootloader.h</FileName><Status>1</Status></File00011><File00012><FileId>00012</FileId><FileName>rf_ctrl.h</FileName><Status>1</Status></File00012><File00013><FileId>00013</FileId><FileName>misc.h</FileName><Status>1</Status></File00013><File00014><FileId>00014</FileId><FileName>spi.h</FileName><Status>1</Status></File00014><File00015><FileId>00015</FileId><FileName>C:\_WinAVR\avr\include\stdint.h</FileName><Status>259</Status></File00015><File00016><FileId>00016</FileId><FileName>spi.c</FileName><Status>259</Status></File00016></Files><Workspace><File00000><Position>335 72 1401 572</Position><LineCol>37 0</LineCol><State>Maximized</State></File00000><File00001><Position>1936 62 3034 649</Position><LineCol>0 0</LineCol></File00001><File00002><Position>5580 38 6678 625</Position><LineCol>0 0</LineCol></File00002><File00003><Position>10095 8 11193 595</Position><LineCol>0 0</LineCol></File00003><File00004><Position>11707 12 12805 651</Position><LineCol>0 0</LineCol></File00004><File00005><Position>17228 83 17691 520</Position><LineCol>0 0</LineCol></File00005><File00006><Position>4376 46 5474 633</Position><LineCol>0 0</LineCol></File00006><File00007><Position>17140 158 18114 563</Position><LineCol>0 0</LineCol></File00007><File00008><Position>14611 2 15589 563</Position><LineCol>0 0</LineCol></File00008><File00009><Position>16998 48 17931 366</Position><LineCol>0 0</LineCol></File00009><File00011><Position>16136 41 16947 360</Position><LineCol>0 0</LineCol></File00011><File00012><Position>16230 167 17188 546</Position><LineCol>0 0</LineCol></File00012><File00013><Position>16252 196 17210 601</Position><LineCol>0 0</LineCol></File00013><File00014><Position>9629 216 10587 647</Position><LineCol>0 0</LineCol></File00014><File00015><Position>9497 42 10455 473</Position><LineCol>0 0</LineCol></File00015><File00016><Position>2871 56 3969 643</Position><LineCol>0 0</LineCol></File00016></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> +<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>27-Jun-2007 13:48:50</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\david\My Documents\tux\firmware\fuxrf\trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>51</Item><Item>580</Item><Item>103</Item><Item>17</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>ACKmode</Variables><Variables>sof_ary</Variables><Variables>toy_id_h</Variables><Variables>toy_id_l</Variables><Variables>prf_buffer_tx</Variables><Variables>rf_tx_counter</Variables><Variables>tx_pac_len</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>pspi_buffer_rx</Variables><Variables>rf_buffer_tx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>pspi_buffer_tx</Variables><Variables>rf_header</Variables><Variables>rf_status</Variables><Variables>watchdog</Variables><Variables>gfilter</Variables><Variables>replaceFrequency</Variables><Variables>frequencyTable</Variables><Variables>commandBuffer</Variables><Variables>spiConfigFrame</Variables></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\Branches\RF_test\Branches\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\Dongle\RF\New_timing\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><SOURCEFILE>bootloader.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><OTHERFILE>default\device.lss</OTHERFILE><OTHERFILE>default\device.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega48</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>spi.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20070122\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20070122\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>258</Status></File00000><File00001><FileId>00001</FileId><FileName>prot.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>rf_ctrl.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>init.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>misc.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>bootloader.c</FileName><Status>1</Status></File00005><File00006><FileId>00006</FileId><FileName>spi.c</FileName><Status>258</Status></File00006></Files><Workspace><File00005><Position>262 71 1038 645</Position><LineCol>19 1</LineCol><State>Maximized</State></File00005></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> Modified: firmware/fuxrf/trunk/device.c =================================================================== --- firmware/fuxrf/trunk/device.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/device.c 2007-06-27 14:11:25 UTC (rev 457) @@ -1,5 +1,5 @@ #include <avr/wdt.h> -#include <stdlib.h>$ +#include <stdlib.h> #include "defines.h" #include "init.h" #include "misc.h" @@ -26,7 +26,7 @@ //* Parameters: NONE * //* Returns: NONE * //* Action: Main routine of the Device * -//* Duration: tbd *$ +//* Duration: tbd * //* Size: tbd * //* Date: 31.01.06 * //* Description: Get connected to the Basestation, get values from the sensors* @@ -41,9 +41,9 @@ asm volatile ("rjmp bootloader" ::); /* jump to bootloader */ #endif - init_avr(); // System init$ + init_avr(); // System init init_varis(); // Init variables - spiTransaction(); // Spi transaction to recieve$ + spiTransaction(); // Spi transaction to recieve // spiConfigFrame[5] = 6; // spiConfigFrame[6] = 32; generate_frequency_sequence (); // Generate hopping sequence @@ -70,16 +70,16 @@ if (random_numb == 12) random_numb = 0; if ((replaceFrequency < spiConfigFrame[5]) || (replaceFrequency > spiConfigFrame[6])) - break;$ + break; } FHAState = WAIT_ACK_CHF; } #endif -$ + if (spi_enable) // Spi transaction ready - {$ + { spi_enable = 0; // Reset spi flag spiTransaction(); } - }$ + } } Modified: firmware/fuxrf/trunk/init.c =================================================================== --- firmware/fuxrf/trunk/init.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/init.c 2007-06-27 14:11:25 UTC (rev 457) @@ -19,7 +19,7 @@ { //init of AVR ports //*************PORTB*************// - //PORTB.0 -> OUT TXON$ + //PORTB.0 -> OUT TXON //PORTB.1 -> OUT nOLE //PORTB.2 -> IN CS //PORTB.3 -> IN MOSI @@ -31,9 +31,9 @@ output(DDRB,0x13); //*************PORTB*************// //*************PORTC*************// - //PORTC.0 -> OUT READY SPI$ + //PORTC.0 -> OUT READY SPI //PORTC.1 -> OUT Enable - //PORTC.2 -> OUT READY SPI$ + //PORTC.2 -> OUT READY SPI //PORTC.3 -> OUT DEBUFG RF //PORTC.4 -> NOT USED, PULLED UP //PORTC.5 -> NOT USED, PULLED UP @@ -42,7 +42,7 @@ output(DDRC,0x1F); //*************PORTC*************// //*************PORTD*************// - //PORTD.0 -> IN RX_DATA$ + //PORTD.0 -> IN RX_DATA //PORTD.1 -> OUT TX_DATA/Data //PORTD.2 -> OUT PU_TRX/PU_REG //PORTD.3 -> IN RESET LINE @@ -56,7 +56,7 @@ //***********init-needed-peripherals***************// output(UBRR0L,0x05); //***********init-needed-peripherals***************// -$ + SPCR=0x40; // Slave SPSR=0x00; // Clear the SPI interrupt flag @@ -66,7 +66,7 @@ "in __tmp_reg__, %1" "\n\t" : : "I" (_SFR_IO_ADDR(SPSR)), "I" (_SFR_IO_ADDR(SPDR)) - );$ + ); } @@ -94,7 +94,7 @@ {/*sub because of returning of subroutine*/ *ptr++=0; } // Reduce 26 bytes -$ + rx_buffer_ready = 0x00; frameCmpt = 0; // Counter of RF frame frequencyIndex = 0; // Pointer for the table of frequency @@ -102,7 +102,7 @@ statisticPointer = 0; // Pointer for the table with statistic for FHA spi_enable = 0; // Flag to start spi transaction errorFrame = 0; // Detect error in transmission - commandStatus = 0; // Status of the command$ + commandStatus = 0; // Status of the command ACKmode = 0; // Wait an ACK prf_buffer_rx = rf_buffer_rx1; // Init pointer for RF transaction @@ -115,7 +115,7 @@ void init_frame_RF (void) { unsigned char i, header_rf; -$ + header_rf = SMALLFRAME; // First byte header of the frame header_rf |= MASTERH; @@ -129,8 +129,8 @@ { header_rf |= CHANGEID; } - }$ -$ + } + for (i = 0; i < 11; i++) { rf_buffer_tx1[i] = 0x55; // Preamble @@ -141,7 +141,7 @@ { rf_buffer_tx1[i] = 0xFF; // Synchro rf_buffer_tx2[i] = 0xFF; // Synchro - }$ + } rf_buffer_tx1[14] = rf_buffer_tx2[14] = sof_ary[1] = spiConfigFrame[0]; // Set ID rf_buffer_tx1[15] = rf_buffer_tx2[15] = sof_ary[2] = spiConfigFrame[1]; @@ -150,7 +150,7 @@ rf_buffer_tx1[17] = rf_buffer_tx2[17] = 0x20; // Second byte header of the frame else rf_buffer_tx1[17] = rf_buffer_tx2[17] = 0x00; // Second byte header of the frame -$ + rf_buffer_tx1[18] = rf_buffer_tx2[18] = spiConfigFrame[2]; // Hopping parameters Index (dummy) / Toy ID for init rf_buffer_tx1[19] = rf_buffer_tx2[19] = spiConfigFrame[3]; // Hopping parameters Channel (dummy) / Toy ID for init rf_buffer_tx1[20] = rf_buffer_tx2[20] = 0x55; Modified: firmware/fuxrf/trunk/misc.c =================================================================== --- firmware/fuxrf/trunk/misc.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/misc.c 2007-06-27 14:11:25 UTC (rev 457) @@ -5,19 +5,19 @@ #include "rf_ctrl.h" -//*****************************************************************************$ +//***************************************************************************** //* Project: RF-Firmware for ISM * //* Function: wait_n_10us * //* Parameters: val * //* Returns: NONE * //* Action: wait n * 10us * -//* Duration: tbd *$ +//* Duration: tbd * //* Size: tbd * //* Date: 31.01.06 * //* Description: Generates a delay. T(delay) = val * 10us * //***************************************************************************** void wait_n_10us(uc_8 val) -{$ +{ uc_8 i,j; i = val; @@ -29,8 +29,8 @@ _NIX; _NIX; _NIX; - }$ - }$ + } + } } @@ -40,7 +40,7 @@ //* Parameters: NONE * //* Returns: random value * //* Action: get a random value by sampling the RXD pin of the ATR2406 * -//* Duration: tbd *$ +//* Duration: tbd * //* Size: tbd * //* Date: 31.01.06 * //* Description: Random value needed for system setup * @@ -48,18 +48,18 @@ uc_8 get_random(void) { uc_8 i,random; -$ - //init of the global variable random, this is done by using the noise$ + + //init of the global variable random, this is done by using the noise //output of the RF-Chip when settlet up for receive without having //a transmitter, may check if RSSI is low to be sure there is only noise. - //The RX_DATA pin of the ATR2406 is sampled.$ -$ + //The RX_DATA pin of the ATR2406 is sampled. + pwr_up_atr2406(); -$ - set_rxon; // Set ATR2406 in RX mode$ + + set_rxon; // Set ATR2406 in RX mode for(i = 0;i < 0xFF; i++) { - random = 0x00;$ + random = 0x00; _NIX; } @@ -67,7 +67,7 @@ { if ((i&0x07) == 0x00) { - random = random << 1;$ + random = random << 1; if ((in_rxd)) { random |= 0x01; @@ -75,7 +75,7 @@ } } pwr_dwn_atr2406(); - return random;$ + return random; } @@ -85,7 +85,7 @@ //* Parameters: NONE * //* Returns: random value for EF channel * //* Action: get a random value by sampling the RXD pin of the ATR2406 * -//* Duration: tbd *$ +//* Duration: tbd * //* Size: tbd * //* Date: 10.07.06 * //* Description: Random channel value needed for frequency hopping * @@ -111,19 +111,19 @@ } -//*****************************************************************************$ +//***************************************************************************** //* Project: RF-Firmware for ISM * //* Function: calc_checksum * //* Parameters: val * //* Returns: NONE * //* Action: calc_checksum * -//* Duration: tbd *$ +//* Duration: tbd * //* Size: tbd * //* Date: 31.01.06 * //* Description: Calculate the checksum of a RF - Packet * //***************************************************************************** void calc_checksum(unsigned char *pbuffer) -{$ +{ uc_8 i,tmp; uc_8 *ptr; @@ -136,7 +136,7 @@ while (i != 1) { i--; - tmp ^= *ptr++; // Calculate CRC$ + tmp ^= *ptr++; // Calculate CRC } *ptr = tmp; } Modified: firmware/fuxrf/trunk/prot.c =================================================================== --- firmware/fuxrf/trunk/prot.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/prot.c 2007-06-27 14:11:25 UTC (rev 457) @@ -18,9 +18,9 @@ //* Description: Define a frequency sequence for hopping * //***************************************************************************** void generate_frequency_sequence (void) -{$ +{ unsigned char i, j, out; -$ + frequencyTable [0] = get_random_channel (); for (i = 1; i < 20; i++) { @@ -57,13 +57,13 @@ //* Description: Synchronise to the Basestation and get logged into the system* //***************************************************************************** void system_start_up(void) -{$ +{ unsigned char i; unsigned char RFinitState; // Init state machine variable -$ - rf_status |= MASTER; // Set rf status like master$ + + rf_status |= MASTER; // Set rf status like master channel = 0; // Init start channel - pwr_dwn_atr2406();$ + pwr_dwn_atr2406(); start_rf_timer(); // Start timer 1 interrupt, state machine of the rf link output(UCSR0A,0x00); output(UCSR0B,0x00); @@ -95,8 +95,8 @@ rf_buffer_tx1[16] = rf_buffer_tx2[16] &= ~SMALLFRAME; // Use big frame for (i = 22; i < 63; i++) { - rf_buffer_tx1[i] = 0x55; // Payload bytes$ - rf_buffer_tx2[i] = 0x55; // Payload bytes$ + rf_buffer_tx1[i] = 0x55; // Payload bytes + rf_buffer_tx2[i] = 0x55; // Payload bytes } rf_status |= WAIT_HOPPING; break; @@ -121,11 +121,11 @@ void setup_pac (void) { unsigned char i; - unsigned char *pbuffer_tx;$ + unsigned char *pbuffer_tx; unsigned char *pspibuffer_tx; - pspibuffer_tx = pspi_buffer_tx;$ - pbuffer_tx = prf_buffer_tx;$ + pspibuffer_tx = pspi_buffer_tx; + pbuffer_tx = prf_buffer_tx; *(pbuffer_tx + 13) = channel; // Save current channel into the frame // *(pbuffer_tx + 14) = sof_ary[1]; // Put Toy id into the frame // *(pbuffer_tx + 15) = sof_ary[2]; // Put Toy id into the frame @@ -141,7 +141,7 @@ if (frameCmpt & 0x10) { FHAState = 0; // Reset status to do adaptative frequency hopping - rf_status &= ~WAIT_HOPPING;$ + rf_status &= ~WAIT_HOPPING; rf_status |= FHA_EFFECTIVE; // FHA is effective // PORTC |= 0x04; // Debug } @@ -159,7 +159,7 @@ if (*(pspi_buffer_rx) & FHAACKH) // ACK recieve from Slave FHAState = WAIT_SYNCHRO; // Go to the next state } - }$ + } } #endif #ifdef FHA @@ -209,5 +209,5 @@ else *(pbuffer_tx + 17) &= ~0x08; // Update header - calc_checksum (pbuffer_tx); // Compute checksum$ + calc_checksum (pbuffer_tx); // Compute checksum } Modified: firmware/fuxrf/trunk/spi.c =================================================================== --- firmware/fuxrf/trunk/spi.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/spi.c 2007-06-27 14:11:25 UTC (rev 457) @@ -1,5 +1,5 @@ #include <avr/wdt.h> -#include <stdlib.h>$ +#include <stdlib.h> #include "defines.h" #include "varis.h" @@ -23,13 +23,13 @@ spi_slave = PUT_SOUND_SPI; // Init state machine while (!(PINB & 0x04)); // Verify that the previous transaction is finish PORTC |= 0x04; // Generate a start SPI signal - while (PINB & 0x04); // Wait CS$ + while (PINB & 0x04); // Wait CS PORTC &= ~0x04; // Reset start SPI signal if (rx_buffer_ready) // Correct receive { rx_buffer_ready = 0; // Reset receive flag -$ + if (errorFrame) // Error in precedent transmission { errorFrame = 0; // Reset error frame flag @@ -45,7 +45,7 @@ { spi_config_tx = 0x01; // Zone 0 headerb = 0x02; // Audio in SPI transaction + Double SPI frame - }$ + } } else // Zone 0 without audio { @@ -75,7 +75,7 @@ } } else - if (ACKmode)$ + if (ACKmode) ACKmode = 0; // Command RX OK if (*(pspibuffer_rx + 1) & 0x80) // Wait ACK @@ -83,17 +83,17 @@ } if (commandStatus != 0x00) // No need of protection from interrupt, timing protected - {$ - headerb |= 0x08; // Status in SPI frame$ + { + headerb |= 0x08; // Status in SPI frame spi_config_tx |= 0x10; - }$ -$ + } + SPDR = headerb; // Header byte - PORTC &= ~0x01; // Generate a ready SPI signal$ - while ((SPSR & 0x80) == 0); // Wait SPI ready$ -$ + PORTC &= ~0x01; // Generate a ready SPI signal + while ((SPSR & 0x80) == 0); // Wait SPI ready + while (1) // SPI loop - {$ + { if (!(PINB & 0x04)) // Chip select { PORTC |= 0x01; // Reset the ready SPI signal @@ -110,7 +110,7 @@ { if (spi_count <= 7) spiConfigFrame[spi_count - 1] = SPDR; - }$ + } } else if ((spi_count > 17) && (spi_count <= 21)) // Save command { @@ -120,18 +120,18 @@ if (spi_count == 21) { commandStatus = 0x01; // Command in progress - commandCmpt = 0;$ + commandCmpt = 0; } } } - spi_count++; // Increment SPI byte counter$ + spi_count++; // Increment SPI byte counter if (spi_slave == PUT_SOUND_SPI) // Put sound into the SPI frame { if (spi_config_tx & 0x01) // Simple frame Zone 0 - {$ + { SPDR = *(pspibuffer_rx + spi_count + 10); // Sound } else if (spi_config_tx & 0x02) // Simple frame Zone 1 @@ -147,11 +147,11 @@ } else { - SPDR = 0x00; // No sound$ + SPDR = 0x00; // No sound } if (spi_count == spi_lenght) spi_slave = PUT_COMMAND_SPI; // Go to the next state of the machine - PORTC &= ~0x01; // Generate request to master$ + PORTC &= ~0x01; // Generate request to master } else if (spi_slave == PUT_COMMAND_SPI) // Put command into the SPI frame { @@ -166,11 +166,11 @@ SPDR = 0x00; // No command if (spi_count == spi_lenght + 4) spi_slave = PUT_STATUS_SPI; // Go to the next state of the machine - PORTC &= ~0x01; // Generate request to master$ + PORTC &= ~0x01; // Generate request to master } else if (spi_slave == PUT_STATUS_SPI) // Put status command into the SPI frame { - if (spi_config_tx & 0x10) // Status command present$ + if (spi_config_tx & 0x10) // Status command present { SPDR = commandStatus; // Status command, no need of protection from interrupt, timing protected if (commandStatus != 0x01) @@ -180,23 +180,23 @@ SPDR = 0x00; // No status command if (spi_count == spi_lenght + 5) spi_slave = END_SPI; // Go to the next state of the machine - PORTC &= ~0x01; // Generate request to master$ - }$ + PORTC &= ~0x01; // Generate request to master + } } while ((SPSR & 0x80) == 0); // Wait SPI ready -$ + if (spi_slave == END_SPI) // Finish SPI transaction { - PORTC |= 0x01; // Reset the ready SPI signal$ + PORTC |= 0x01; // Reset the ready SPI signal if (spi_config_rx & 0x02) // Audio in frame spi *(pspibuffer_tx + 17) |= 0x02; - else$ + else *(pspibuffer_tx + 17) &= ~0x02; if (ACKmode) - *(pspibuffer_tx + 17) |= 0x80; // Send ACK$ + *(pspibuffer_tx + 17) |= 0x80; // Send ACK else *(pspibuffer_tx + 17) &= ~0x80; // Remove ACK - break;$ - }$ + break; } + } } Modified: firmware/fuxrf/trunk/varis.c =================================================================== --- firmware/fuxrf/trunk/varis.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/varis.c 2007-06-27 14:11:25 UTC (rev 457) @@ -17,7 +17,7 @@ uc_8 rf_header[4] __attribute__((section(".globals"))); // Rf header // RF variables -uc_8 rf_status __attribute__((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked)$ +uc_8 rf_status __attribute__((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) volatile uc_8 channel __attribute__((section(".globals"))); // Currently used RF - Channel uc_8 rfStateCount __attribute__((section(".globals"))); // Counter for RF-IRQ-State machine uc_8 tx_pac_len __attribute__((section(".globals"))); // Variable containing the length of the current RF - Packet TX @@ -53,7 +53,7 @@ uc_8 errorFrame __attribute__((section(".globals"))); // Detect error in transmission // Command variables -uc_8 commandStatus __attribute__((section(".globals"))); // Status of the command$ +uc_8 commandStatus __attribute__((section(".globals"))); // Status of the command uc_8 commandCmpt __attribute__((section(".globals"))); // Counter for resend command uc_8 ACKmode __attribute__((section(".globals"))); // Wait an ACK Modified: firmware/fuxrf/trunk/varis.h =================================================================== --- firmware/fuxrf/trunk/varis.h 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/fuxrf/trunk/varis.h 2007-06-27 14:11:25 UTC (rev 457) @@ -21,7 +21,7 @@ extern uc_8 sof_ary[3] __attribute__((section(".sof"))); // Variable holding the 4 bytes start of frame // RF variables -extern uc_8 rf_status __attribute__((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked)$ +extern uc_8 rf_status __attribute__((section(".globals"))); // Satus of the RF - Task (Locked or Unlocked) extern volatile uc_8 channel __attribute__((section(".globals"))); // Currently used RF - Channel extern uc_8 rfStateCount __attribute__((section(".globals"))); // Counter for RF-IRQ-State machine extern uc_8 tx_pac_len __attribute__((section(".globals"))); // Variable containing the length of the current RF - Packet TX @@ -58,7 +58,7 @@ extern uc_8 errorFrame __attribute__((section(".globals"))); // Detect error in transmission // Command variables -extern uc_8 commandStatus __attribute__((section(".globals"))); // Status of the command$ +extern uc_8 commandStatus __attribute__((section(".globals"))); // Status of the command extern uc_8 commandCmpt __attribute__((section(".globals"))); // Counter for resend command extern uc_8 ACKmode __attribute__((section(".globals"))); // Wait an ACK Modified: firmware/tuxrf/trunk/bootloader.c =================================================================== --- firmware/tuxrf/trunk/bootloader.c 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/tuxrf/trunk/bootloader.c 2007-06-27 14:11:25 UTC (rev 457) @@ -39,8 +39,8 @@ i2cWaitForComplete(); /* wait the low byte of the page address */ if ((twStatus = TW_STATUS) != TW_SR_DATA_ACK) while(1); pageAddress.b[0] = TWDR; - if (pageAddress.w & 0x003F) while(1); /* incorrect page address */$ - if (pageAddress.w >= 0x0F00) while(1); /* don't overwrite the bootloader */$ + if (pageAddress.w & 0x003F) while(1); /* incorrect page address */ + if (pageAddress.w >= 0x0F00) while(1); /* don't overwrite the bootloader */ address = pageAddress.w; TWCR = _BV(TWEA) | _BV(TWEN) | _BV(TWINT); for (i=0; i<SPM_PAGESIZE; i++) /* fill the complete page with the next data */ Modified: firmware/tuxrf/trunk/bootloader.h =================================================================== --- firmware/tuxrf/trunk/bootloader.h 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/tuxrf/trunk/bootloader.h 2007-06-27 14:11:25 UTC (rev 457) @@ -4,7 +4,7 @@ * Bootloader source code * created on 2006/11/25 David Bourgeois * ------------------------------------------------------------------- - * $Id$ + * $Id: bootloader.h 456 2007-06-26 14:12:36Z jaguarondi */ #ifndef _BOOTLOADER_H_ @@ -16,10 +16,10 @@ \brief Minimal I2C bootloader \author David Bourgeois \date 2006 -$ + The footprint is less than 0xFF bytes so it should be possible to place the bootlaoder at 0x0F00 in your application -$ + Use the following linker option: \code -Wl,--section-start=.bootloader=0x0F00 Modified: firmware/tuxrf/trunk/default/Makefile =================================================================== --- firmware/tuxrf/trunk/default/Makefile 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/tuxrf/trunk/default/Makefile 2007-06-27 14:11:25 UTC (rev 457) @@ -13,16 +13,17 @@ ## Compile options common for all C compilation units. CFLAGS = $(COMMON) -CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +CFLAGS += -Wall -gdwarf-2 -DF_CPU=13824000UL -Os -fsigned-char -fshort-enums CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d ## Assembly specific flags ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 ## Linker flags LDFLAGS = $(COMMON) -LDFLAGS += -Wl,--section-start=.bootloader=0x0F00 -Wl,-Map=device.map +LDFLAGS += -Wl,--section-start=.bootloader=0x1100 -Wl,-Map=device.map LDFLAGS += -Wl,-section-start=.buffer_tx1=0x800100 LDFLAGS += -Wl,-section-start=.buffer_rx1=0x800140 LDFLAGS += -Wl,-section-start=.sof=0x8001e6 @@ -36,7 +37,7 @@ HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings ## Objects that must be built in order to link @@ -84,7 +85,7 @@ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ %.eep: $(TARGET) - avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 %.lss: $(TARGET) avr-objdump -h -S $< > $@ Modified: firmware/tuxrf/trunk/defines.h =================================================================== --- firmware/tuxrf/trunk/defines.h 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/tuxrf/trunk/defines.h 2007-06-27 14:11:25 UTC (rev 457) @@ -8,10 +8,10 @@ #include <avr/pgmspace.h> #include <avr/eeprom.h> -// Define the used HOPPING SCHEME$ -#define HOPPING // No hopping, use signel channel TRX_CHANNEL. If no define use frequency hopping$ -#define TRX_CHANNEL 90$ -#define FHA // Use frequency hopping adaptativ$ +// Define the used HOPPING SCHEME +#define HOPPING // No hopping, use signel channel TRX_CHANNEL. If no define use frequency hopping +#define TRX_CHANNEL 90 +#define FHA // Use frequency hopping adaptativ // Type definition #define uc_8 unsigned char @@ -21,9 +21,9 @@ //------->rf_status-Defines<-------// #define WAIT_HOPPING 0x02 -#define RXING 0x04$ +#define RXING 0x04 #define TXING 0x08 -#define LOGGED 0x10$ +#define LOGGED 0x10 #define FHA_EFFECTIVE 0x20 #define MASTER 0x40 #define SLAVE 0x80 @@ -94,7 +94,7 @@ // T_SLOT == 1ms ==> every 1000us 48 Bytes of payload are exchanged #define POLL_LOOPS 1 #define T_1ms 1728 // Exact -> 1000us - #define T_PWR_UP_TX 69 // 69 == 40us (39.93)$ + #define T_PWR_UP_TX 69 // 69 == 40us (39.93) #define T_LOOP_TX 341 // 341 == 197us (197.34) #define T_START_TX 59 // 59 == 34us (34.14) #define T_TX2RX 1259 // 1259 == 728us (728.59) @@ -102,10 +102,10 @@ #define T_LOOP_RX 139 // 139 == 80us (80.44) #define T_RX_ON 260 // 260 == 150us (150.46) #define T_MAX_PAC_RX 1088 // 1088 == 630us (629.62) - #define T_RX2TX 172 // 172 == 100us (99.54)$ + #define T_RX2TX 172 // 172 == 100us (99.54) #define T_START_SYNC 1082 // 1065 == 616us (616.32) - #define T_SYNC 958 // 958 == 554 (554.40)$ - // ==> 48KB/second (384.000bps)$ + #define T_SYNC 958 // 958 == 554 (554.40) + // ==> 48KB/second (384.000bps) //----->RF-Timing-Defines<-----// #endif Modified: firmware/tuxrf/trunk/device.aps =================================================================== --- firmware/tuxrf/trunk/device.aps 2007-06-26 14:12:36 UTC (rev 456) +++ firmware/tuxrf/trunk/device.aps 2007-06-27 14:11:25 UTC (rev 457) @@ -1 +1 @@ -<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>13-Jun-2007 17:34:45</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>10-Nov-2005 15:17:29</Created><Version>4</Version><Build>4, 12, 0, 454</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\device.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\Documents and Settings\Pascal\Desktop\RF_test\Slave\Trunk\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega168</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>580</Item><Item>51</Item><Item>584</Item><Item>634</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>1</WATCHNUM><WATCHNAMES><Pane0><Variables>ts</Variables><Variables>i</Variables><Variables>rf_rx_state</Variables><Variables>checksum</Variables><Variables>protocol_flags</Variables><Variables>rf_buffer_tx</Variables><Variables>channel</Variables><Variables>FHAState</Variables><Variables>frequencyTable</Variables><Variables>commandStatus</Variables></Pane0><Pane1><Variables>sof_ary</Variables><Variables>rf_buffer_rx1</Variables><Variables>rf_buffer_rx2</Variables><Variables>rf_buffer_tx1</Variables><Variables>rf_buffer_tx2</Variables><Variables>headerb</Variables><Variables>commandBuffer</Variables><Variables>sleepMode</Variables></Pane1><Pane2><Variables>spi_count</Variables><Variables>spi_lenght</Variables><Variables>Test</Variables><Variables>sinus</Variables></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\New_timing\" public=""/><map private="C:\Documents and Settings\Pascal\Desktop\TUX\MainBoard\RF\branches\RF_test\Branches\" public=""/></module></modules><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>device.c</SOURCEFILE><SOURCEFILE>init.c</SOURCEFILE><SOURCEFILE>misc.c</SOURCEFILE><SOURCEFILE>prot.c</SOURCEFILE><SOURCEFILE>rf_ctrl.c</SOURCEFILE><SOURCEFILE>varis.c</SOURCEFILE><SOURCEFILE>sleep.c</SOURCEFILE><SOURCEFILE>spi.c</SOURCEFILE><HEADERFILE>varis.h</HEADERFILE><HEADERFILE>init.h</HEADERFILE><HEADERFILE>misc.h</HEADERFILE><HEADERFILE>prot.h</HEADERFILE><HEADERFILE>rf_ctrl.h</HEADERFILE><HEADERFILE>defines.h</HEADERFILE><HEADERFILE>bootloader.h</HEADERFILE><HEADERFILE>spi.h</HEADERFILE><HEADERFILE>sleep.h</HEADERFILE><OTHERFILE>default\device.map</OTHERFILE><OTHERFILE>default\device.lss</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega168</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>device.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>bootloader.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>device.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>init.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>misc.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>prot.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>rf_ctrl.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>varis.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=13824000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS>-Wl,--section-start=.bootloader=0x0F00</LINKEROPTIONS><SEGMENTS><SEGMENT><NAME>.buffer_tx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x100</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx1</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x140</ADDRESS></SEGMENT><SEGMENT><NAME>.sof</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1e6</ADDRESS></SEGMENT><SEGMENT><NAME>.globals</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1ea</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_tx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x173</ADDRESS></SEGMENT><SEGMENT><NAME>.buffer_rx2</NAME><SEGMENT>SRAM</SEGMENT><ADDRESS>0x1b3</ADDRESS></SEGMENT></SEGMENTS></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\_WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\_WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><Files><File00000><FileId>00000</FileId><FileName>device.c</FileName><Status>259</Status></File00000><File00001><FileId>00001</FileId><FileName>varis.c</FileName><Status>257</Status></File00001><File00002><FileId>00002</FileId><FileName>prot.c</FileName><Status>259</Status></File00002><File00003><FileId>00003</FileId><FileName>rf_ctrl.c</FileName><Status>259</Status></File00003><File00004><FileId>00004</FileId><FileName>init.c</FileName><Status>259</Status></File00004><File00005><FileId>00005</FileId><FileName>prot.h</FileName><Status>1</Status></File00005><File00006><FileId>00006</FileId><FileName>defines.h</FileName><Status>1</Status></File00006><File00007><FileId>00007</FileId><FileName>misc.c</FileName><Status>259</Status></File00007><File00008><FileId>00008</FileId><FileName>varis.h</FileName><Status>257</Status></File00008><File00009><FileId>00009</FileId><FileName>init.h</FileName><Status>1</Status></File00009><File00010><FileId>00010</FileId><FileName>bootloader.h</FileName><Status>1</Status></File00010><File00011><FileId>00011</FileId><FileName>rf_ctrl.h</FileName><Status>1</Status></File00011><File00012><FileId>00012</FileId><FileName>misc.h</FileName><Status>1</Status></File00012><File00013><FileId>00013</FileId><FileName>spi.h</FileName><Status>1</Status></File00013><File00014><FileId>00014</FileId><FileName>C:\_WinAVR\avr\include\stdint.h</FileName><Status>259</Status></File00014><File00015><FileId>00015</FileId><FileName>sleep.c</FileName><Status>259</Status></File00015><File00016><FileId>00016</FileId><FileName>spi.c</FileName><Status>259</Status></File00016><File00017><FileId>00017</FileId><FileName>sleep.h</FileName><Status>1</Status></File00017></Files><Workspace><File00000><Position>303 72 1401 659</Position><LineCol>56 9</LineCol><State>Maximized</State></File00000><File00001><Position>1872 62 2970 649</Position><LineCol>0 0</LineCol></File00001><File00002><Position>4914 42 6012 629</Position><LineCol>0 0</LineCol></File00002><File00003><Position>3710 50 4808 689</Position><LineCol>0 0</LineCol></File00003><File00004><Position>2807 56 3905 643</Position><LineCol>0 0</LineCol></File00004><File00005><Position>-13934 -31973 -13471 -31536</Position><LineCol>0 0</LineCol></File00005><File00006><Position>-25581 -31994 -24483 -31407</Position><LineCol>0 0</LineCol></File00006><File00007><Position>2173 60 3271 647</Position><LineCol>61 0</LineCol></File00007><File00008><Position>-16852 -32052 -15754 -31465</Position><LineCol>0 0</LineCol></File00008><File00009><Position>-14164 -32008 -13231 -31690</Position><LineCol>0 0</LineCol></File00009><File00010><Position>-15026 -32015 -14215 -31696</Position><LineCol>0 0</LineCol></File00010><File00011><Position>-14932 -31889 -13974 -31510</Position><LineCol>0 0</LineCol></File00011><File00012><Position>-14910 -31860 -13952 -31455</Position><LineCol>0 0</LineCol></File00012><File00013><Position>-21664 -31990 -20706 -31559</Position><LineCol>0 0</LineCol></File00013><File00014><Position>-21642 -31961 -20684 -31530</Position><LineCol>0 0</LineCol></File00014><File00015><Position>-24843 -31794 -23885 -31415</Position><LineCol>0 0</LineCol></File00015><File00016><Position>1238 66 2336 653</Position><LineCol>0 0</LineCol></File00016><File00017><Position>4984 159 5942 538</Position><LineCol>0 0</LineCol></File00017></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> +<AVRStudio><MANAGEMENT><ProjectName>device</ProjectName><Created>10-Nov-2005 15:17:29</Created><LastEdit>27-Jun-2007 13:55:49</LastEdit><ICON>241</ICON><ProjectT... [truncated message content] |
From: yohann g. <mrg...@ya...> - 2007-06-26 17:14:33
|
hello every body ! i have write a script for browsering directories, playing music and radio with tux and the remote. It's the first time i make a script and i don't know how to put it on the svn to let you all modify it ! I am prety sure it is not as good as I would but it works ! You can download this script on the forum.( on the script page, of course) can anybody give me a little directory in the software directory so I will be able to put it here ? An acount would be great too ! Thanks to all <mrg...@ya...> |