[tuxdroid-svn] r1314 - firmware/rf/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2008-07-08 14:25:59
|
Author: jaguarondi Date: 2008-07-08 16:26:00 +0200 (Tue, 08 Jul 2008) New Revision: 1314 Modified: firmware/rf/trunk/defines.h firmware/rf/trunk/init.c firmware/rf/trunk/rf_ctrl.c firmware/rf/trunk/varis.c firmware/rf/trunk/varis.h Log: * The gaussian filter setting is now read from EEPROM. Modified: firmware/rf/trunk/defines.h =================================================================== --- firmware/rf/trunk/defines.h 2008-07-08 10:57:20 UTC (rev 1313) +++ firmware/rf/trunk/defines.h 2008-07-08 14:26:00 UTC (rev 1314) @@ -58,6 +58,13 @@ //#define CYCHOPP //**Define the used HOPPING SCHEME**// +/* Address in EEPROM of GFCS */ +#define EE_GFCS (uint8_t*)0 + +/* Scrambled byte used to code the values sent through the USART to the ATR2406 + */ +#define SCRAMBLE_BYTE 0x0F + #define TXEN 0x01 #define RXEN 0x00 #define CONNECTED 0x80 Modified: firmware/rf/trunk/init.c =================================================================== --- firmware/rf/trunk/init.c 2008-07-08 10:57:20 UTC (rev 1313) +++ firmware/rf/trunk/init.c 2008-07-08 14:26:00 UTC (rev 1314) @@ -46,8 +46,6 @@ #include "init.h" #include "varis.h" - - //***************************************************************************** //* Project: RF-Firmware for ISM * //* Function: init_avr * @@ -107,6 +105,15 @@ /* Disable interrupts. */ TIMSK1 = 0x00; + + /* Read the gaussian filter setting */ + GFCS = eeprom_read_byte(EE_GFCS); + /* If the eeprom is unprogrammed or out of range, use a default value */ + if (GFCS > 7) + { + GFCS = 4; + } + } //***************************************************************************** //* Project: RF-Firmware for ISM * Modified: firmware/rf/trunk/rf_ctrl.c =================================================================== --- firmware/rf/trunk/rf_ctrl.c 2008-07-08 10:57:20 UTC (rev 1313) +++ firmware/rf/trunk/rf_ctrl.c 2008-07-08 14:26:00 UTC (rev 1314) @@ -1,54 +1,30 @@ -//***************************************************************************** -//* Project: RF-Firmware Point to Multipoint for ISM - Transceiver ATR2406 * -//* Version: V1.0 * -//* File: rf_ctrl.c * -//* Target MCU: ATMega88 * -//* Compiler: GCC * -//* Simulator: AVRStudio 4.08 * -//* Emulator: JTAG ICE * -//* Author: Christian Bechter * -//* Date: 31.01.06 * -//* Used Hardware: DEV-KIT-III * -//***************************************************************************** -//***************************************************************************** -//* Copyright 2006, Atmel Germany GmbH * -//* * -//* This software is owned by the Atmel Germany GmbH * -//* and is protected by and subject to worldwide patent protection. * -//* Atmel hereby grants to licensee a personal, * -//* non-exclusive, non-transferable license to copy, use, modify, create * -//* derivative works of, and compile the Atmel Source Code and derivative * -//* works for the sole purpose of creating custom software in support of * -//* licensee product to be used only in conjunction with a Atmel integrated * -//* circuit as specified in the applicable agreement. Any reproduction, * -//* modification, translation, compilation, or representation of this * -//* software except as specified above is prohibited without the express * -//* written permission of Atmel. * -//* * -//* Disclaimer: ATMEL MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, * -//* WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -//* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * -//* Atmel reserves the right to make changes without further notice to the * -//* materials described herein. Atmel does not assume any liability arising * -//* out of the application or use of any product or circuit described herein. * -//* Atmel does not authorize its products for use as critical components in * -//* life-support systems where a malfunction or failure may reasonably be * -//* expected to result in significant injury to the user. The inclusion of * -//* Atmel products in a life-support systems application implies that the * -//* manufacturer assumes all risk of such use and in doing so indemnifies * -//* Atmel against all charges. * -//* * -//* Use may be limited by and subject to the applicable Atmel software * -//* license agreement. * -//***************************************************************************** +/* + * [TF]UXRF - Firmware for the 2 RF CPU of tuxdroid (TUXRF and FUXRF) + * Copyright (C) 2007 KySoH S.A. <in...@ky...> + * + * 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 "defines.h" #include "init.h" #include "varis.h" #include "misc.h" #include "rf_ctrl.h" #include "prot.h" - #include "interface.h" volatile int8_t spi_tmp; /* XXX debug */ @@ -297,7 +273,6 @@ //* Description: Programms the ATR2406 to the desired channel and to the * //* desired mode. * //***************************************************************************** -#define GFCS 7 void init_atr2406(uint8_t channel,uint8_t mode) { uint8_t i, dat_l, dat_h, tmp; Modified: firmware/rf/trunk/varis.c =================================================================== --- firmware/rf/trunk/varis.c 2008-07-08 10:57:20 UTC (rev 1313) +++ firmware/rf/trunk/varis.c 2008-07-08 14:26:00 UTC (rev 1314) @@ -44,6 +44,8 @@ #include "defines.h" +/* GFCS parameter of the ATR2406 (gaussian filter) */ +uint8_t GFCS; //***************************************************************************** // SETUP of RF_BUFFER_TX: * Modified: firmware/rf/trunk/varis.h =================================================================== --- firmware/rf/trunk/varis.h 2008-07-08 10:57:20 UTC (rev 1313) +++ firmware/rf/trunk/varis.h 2008-07-08 14:26:00 UTC (rev 1314) @@ -44,11 +44,9 @@ #ifndef VARIS_H #define VARIS_H - - #include "defines.h" -#define SCRAMBLE_BYTE 0x0F +uint8_t GFCS; extern volatile uint8_t rf_buffer_tx[]; extern uint8_t volatile *rf_buffer_rx; |