[tuxdroid-svn] r1293 - firmware/rf/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2008-07-02 07:38:10
|
Author: jaguarondi Date: 2008-07-02 09:38:17 +0200 (Wed, 02 Jul 2008) New Revision: 1293 Modified: firmware/rf/trunk/device.c firmware/rf/trunk/init.c Log: * Some cleanup. Modified: firmware/rf/trunk/device.c =================================================================== --- firmware/rf/trunk/device.c 2008-07-02 07:04:25 UTC (rev 1292) +++ firmware/rf/trunk/device.c 2008-07-02 07:38:17 UTC (rev 1293) @@ -1,47 +1,24 @@ -//***************************************************************************** -//* Project: RF-Firmware Point to Multipoint for ISM - Transceiver ATR2406 * -//* Version: V1.0 * -//* File: appl.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 "interface.h" @@ -90,31 +67,11 @@ } #endif -//***************************************************************************** -//* Project: RF-Firmware for ISM * -//* Function: main * -//* Parameters: NONE * -//* Returns: NONE * -//* Action: Main routine of the Device * -//* Duration: tbd * -//* Size: tbd * -//* Date: 31.01.06 * -//* Description: Get connected to the Basestation, get values from the sensors* -//* and digital I/O * -//***************************************************************************** -//***************************************************************************** -// SETUP of RF_BUFFER_TX: * -// 0 - 5 -> Preamble * -// 6 - 7 -> Sync * -// 8 - 11 -> SOF * -// 12 -> LEN * -// 13 -> Command * -// 14 - 30 -> Payload * -// 31 -> Checksum * -//***************************************************************************** -typedef void (*AppPtr_t)(void); -const AppPtr_t RunBoot = (AppPtr_t) 0x0785; - +/** + * Main function of the RF firmware. + * After initialization, the RF is completely handled by interrupts, the main + * loop is empty. + */ int main(void) { #ifdef _SLAVE Modified: firmware/rf/trunk/init.c =================================================================== --- firmware/rf/trunk/init.c 2008-07-02 07:04:25 UTC (rev 1292) +++ firmware/rf/trunk/init.c 2008-07-02 07:38:17 UTC (rev 1293) @@ -121,16 +121,16 @@ //***************************************************************************** void init_varis(void) { - //************************************************************************* - // SETUP of RF_BUFFER_TX: * - // 0 - 5 -> Preamble * - // 6 - 7 -> Sync * - // 8 - 11 -> SOF * - // 12 -> LEN * - // 13 -> Command * - // 14 - 30 -> Payload * - // 31 -> Checksum * - //************************************************************************* +//***************************************************************************** +// SETUP of RF_BUFFER_TX: * +// 0 - 5 -> Preamble * +// 6 - 7 -> Sync * +// 8 - 11 -> SOF * +// 12 -> LEN * +// 13 -> Command * +// 14 - 30 -> Payload * +// 31 -> Checksum * +//***************************************************************************** //Default setup of the rf_buffer_tx// rf_buffer_tx[0] = rf_buffer_tx[1] = rf_buffer_tx[2] = 0x55 ^ SCRAMBLE_BYTE; rf_buffer_tx[3] = rf_buffer_tx[4] = rf_buffer_tx[5] = 0x55 ^ SCRAMBLE_BYTE; |