paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [6276] deleting obsolete files


From: antoine drouin
Subject: [paparazzi-commits] [6276] deleting obsolete files
Date: Wed, 27 Oct 2010 12:48:12 +0000

Revision: 6276
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6276
Author:   poine
Date:     2010-10-27 12:48:12 +0000 (Wed, 27 Oct 2010)
Log Message:
-----------
deleting obsolete files

Removed Paths:
-------------
    paparazzi3/trunk/sw/airborne/wavecard.c
    paparazzi3/trunk/sw/airborne/wavecard.h

Deleted: paparazzi3/trunk/sw/airborne/wavecard.c
===================================================================
--- paparazzi3/trunk/sw/airborne/wavecard.c     2010-10-27 08:16:07 UTC (rev 
6275)
+++ paparazzi3/trunk/sw/airborne/wavecard.c     2010-10-27 12:48:12 UTC (rev 
6276)
@@ -1,174 +0,0 @@
-/*
- * Paparazzi mcu0 $Id$
- *  
- * Copyright (C) 2005  Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi 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.
- *
- * paparazzi 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 paparazzi; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA. 
- *
- */
-
-/* Coronis wavecard serial input and output */
-
-#include <inttypes.h>
-#include <stdlib.h>
-
-#include "std.h"
-#include "inter_mcu.h"
-#include "uart.h"
-#include "wavecard.h"
-#include "datalink.h"
-
-#define WC_RESET_DDR DDRD
-#define WC_RESET_PIN 1
-#define WC_RESET_PORT PORTD
-
-#define WC_MAX_PAYLOAD 256
-uint8_t  wc_payload[WC_MAX_PAYLOAD];
-
-static uint8_t wc_status;
-
-const uint16_t poly = 0x8408;
-uint16_t crc;
-uint8_t wc_length, payload_idx;
-
-#define UNINIT 0
-#define GOT_SYNC1 1
-#define GOT_STX 2
-#define GOT_LENGTH 3
-#define GOT_PAYLOAD 4
-#define GOT_CRC1 5
-#define GOT_CRC2 6
-
-
-bool_t waiting_ack, wc_msg_received;
-
-uint8_t wc_protocol_error, wc_ovrn, wc_error;
-
-
-void wc_reset( void ) {
-  WC_RESET_DDR |= _BV(WC_RESET_PIN);
-  sbi(WC_RESET_PORT, WC_RESET_PIN);
-}
-
-void wc_end_reset( void ) {
-  cbi(WC_RESET_PORT, WC_RESET_PIN);
-}
-
-void wc_configure( void ) {
-  /** Set a minimal awakening period (20ms, c.f. manual p. 17) */
-  WcSendWriteRadioParamReq(0x00, 0);
-  waiting_ack = TRUE;
-}
-
-void wc_debug( void ) {
-  WcSendReadRadioParamReq(0x00);
-}
-
-
-/** Delayed ACK */
-SIGNAL(SIG_OUTPUT_COMPARE1B) {
-  WcSendAck();
-  cbi(TIMSK, OCIE1B);
-}
-
-inline void delayed_send_ack( void ) {
-  OCR1B = TCNT1 + 1000*CLOCK; /* 1ms delay */
-  /* clear interrupt flag  */
-  sbi(TIFR, OCF1B);
-  /* enable OC1B interrupt */
-  sbi(TIMSK, OCIE1B);
-}
-
-void wc_parse_payload() {
-  switch (wc_payload[0]) {
-  case WC_ACK:
-    if (waiting_ack)
-      waiting_ack = FALSE;
-    else
-      wc_protocol_error++;
-    break;
-  case WC_NAK:
-  case WC_ERROR:
-    wc_protocol_error++;
-    break;
-  case WC_RECEIVED_FRAME : {
-    uint8_t i;
-    for(i = 0; i < wc_length-4-WC_ADDR_LEN; i++) 
-      dl_buffer[i] = wc_payload[i+WC_ADDR_LEN+1];
-    dl_msg_available = TRUE;
-    delayed_send_ack();
-    break;
-  }
-  default:
-    delayed_send_ack();
-  }
-}
-
-void parse_wc( uint8_t c ) {
-  switch (wc_status) {
-  case UNINIT:
-    if (c == WC_SYNC)
-      wc_status++;
-    break;
-  case GOT_SYNC1:
-    if (c != WC_STX)
-      goto error;
-    crc = 0;
-    wc_status++;
-    break;
-  case GOT_STX:
-    if (wc_msg_received) {
-      wc_ovrn++;
-      goto error;
-    }
-    wc_length = c;
-    update_crc(c);
-    wc_status++;
-    payload_idx = 0;
-    break;
-  case GOT_LENGTH:
-    wc_payload[payload_idx] = c;
-    update_crc(c);
-    payload_idx++;
-    if (payload_idx == wc_length-3)
-      wc_status++;
-    break;
-  case GOT_PAYLOAD:
-    if (c != (crc & 0xff))
-      goto error;
-    wc_status++;
-    break;
-  case GOT_CRC1:
-    if (c != (crc >> 8))
-      goto error;
-    wc_status++;
-    break;
-  case GOT_CRC2:
-    if (c != WC_ETX)
-      goto error;
-    wc_msg_received = TRUE;
-    goto restart;
-    break;
-  }
-  return;
- error:
-  wc_error++;
- restart:
-  wc_status = UNINIT;
-  return;
-}

Deleted: paparazzi3/trunk/sw/airborne/wavecard.h
===================================================================
--- paparazzi3/trunk/sw/airborne/wavecard.h     2010-10-27 08:16:07 UTC (rev 
6275)
+++ paparazzi3/trunk/sw/airborne/wavecard.h     2010-10-27 12:48:12 UTC (rev 
6276)
@@ -1,311 +0,0 @@
-/*
- * Paparazzi mcu0 $Id$
- *  
- * Copyright (C) 2005  Pascal Brisset, Antoine Drouin
- *
- * This file is part of paparazzi.
- *
- * paparazzi 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.
- *
- * paparazzi 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 paparazzi; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA. 
- *
- */
-
-/* Coronis wavecard serial input and output */
-
-#ifndef WAVECARD_H
-#define WAVECARD_H
-
-#include "uart.h"
-
-#define WcPut1CtlByte(x) uart0_transmit(x)
-
-#define g_message(_,...) {}
-
-#define WC_CTL_BYTE_LEN 4
-#define WC_ADDR_LEN     6
-
-
-extern uint8_t wc_msg_received;
-extern uint8_t wc_length;
-extern uint8_t wc_payload[]; /** Only for debuging purporse */
-void wc_parse_payload(void);
-
-void wc_reset( void );
-void wc_end_reset( void );
-void wc_configure( void );
-void wc_debug( void );
-
-
-#define WC_SYNC 0xff
-#define WC_STX 0x02
-#define WC_ETX 0x03
-
-
-#define WC_ACK 0x06
-#define WC_NAK 0x15
-#define WC_ERROR 0x00
-#define WC_REQ_WRITE_RADIO_PARAM 0x40
-#define WC_RES_WRITE_RADIO_PARAM 0x41
-#define WC_REQ_READ_RADIO_PARAM 0x50
-#define WC_RES_READ_RADIO_PARAM 0x51
-#define WC_REQ_SELECT_CHANNEL 0x60
-#define WC_RES_SELECT_CHANNEL 0x61
-#define WC_REQ_READ_CHANNEL 0x62
-#define WC_RES_READ_CHANNEL 0x63
-#define WC_REQ_SELECT_PHYCONFIG 0x64
-#define WC_RES_SELECT_PHYCONFIG 0x65
-#define WC_REQ_READ_PHYCONFIG 0x66
-#define WC_RES_READ_PHYCONFIG 0x67
-#define WC_REQ_READ_REMOTE_RSSI 0x68
-#define WC_RES_READ_REMOTE_RSSI 0x69
-#define WC_REQ_READ_LOCAL_RSSI 0x6A
-#define WC_RES_READ_LOCAL_RSSI 0x6B
-#define WC_REQ_FIRMWARE_VERSION 0xA0
-#define WC_RES_FIRMWARE_VERSION 0xA1
-#define WC_MODE_TEST 0xB0
-#define WC_REQ_SEND_FRAME 0x20
-#define WC_RES_SEND_FRAME 0x21
-#define WC_REQ_SEND_MESSAGE 0x22
-#define WC_REQ_SEND_POLLING 0x26
-#define WC_REQ_SEND_BROADCAST 0x28
-#define WC_RECEIVED_FRAME 0x30
-#define WC_RECEPTION_ERROR 0x31
-#define WC_RECEIVED_FRAME_POLLING 0x32
-#define WC_RECEIVED_FRAME_BROADCAST 0x34
-#define WC_RECEIVED_MULTIFRAME 0x36
-#define WC_REQ_SEND_SERVICE 0x80
-#define WC_RES_SEND_SERVICE 0x81
-#define WC_SERVICE_RESPONSE 0x82
-
-
-#define WC_RADIO_PARAM_AWAKENING_PERIOD    0x00
-#define WC_RADIO_PARAM_WAKE_UP_TYPE        0x01
-#define WC_RADIO_PARAM_WAKE_UP_LENGTH      0x02
-#define WC_RADIO_PARAM_RADIO_ACKNOLEDGE    0x04
-#define WC_RADIO_PARAM_RADIO_ADDRESS       0x05
-#define WC_RADIO_PARAM_RELAY_ROUTE         0x07
-#define WC_RADIO_PARAM_POLLING_ROUTE       0x08
-#define WC_RADIO_PARAM_GROUP_NUMBER        0x09
-#define WC_RADIO_PARAM_POLLING_TIME        0x0A
-#define WC_RADIO_PARAM_RADIO_USER_TIMEOUT  0x0C
-#define WC_RADIO_PARAM_RECEPT_ERROR_STATUS 0x0E
-#define WC_RADIO_PARAM_SWITCH_MODE_STATUS  0x10
-
-
-#define update_crc(_byte) {                    \
-  uint8_t i;                                   \
-  crc ^= _byte;                                        \
-  for(i = 0; i < 8; i++) {                     \
-    uint8_t carry = crc & 0x1;                 \
-    crc /= 2;                                  \
-    if (carry)                                 \
-      crc ^= poly;                             \
-  }                                            \
-}
-
-
-#define WcPut1PayloadByte(_byte) { \
-  WcPut1CtlByte(_byte); \
-  update_crc(_byte);\
-}
-
-#define WcStart() { \
-  WcPut1CtlByte(WC_SYNC); \
-  WcPut1CtlByte(WC_STX); \
-  crc = 0; \
-}
-
-#define WcEnd() { \
-  WcPut1CtlByte(crc&0xff); \
-  WcPut1CtlByte(crc>>8); \
-  WcPut1CtlByte(WC_ETX); \
-}
-
-
-#define WcSendAck() { \
-  g_message("sending ACK"); \
-  WcStart(); \
-  WcPut1PayloadByte(WC_CTL_BYTE_LEN); \
-  WcPut1PayloadByte(WC_ACK); \
-  WcEnd() \
-}
-
-  
-#define WcSendFirmwareReq() { \
-  g_message("sending REQ_FIRMWARE_VERSION");   \
-  WcStart();                                                   \
-  WcPut1PayloadByte(WC_CTL_BYTE_LEN); \
-  WcPut1PayloadByte(WC_REQ_FIRMWARE_VERSION); \
-  WcEnd() \
-}
-
-
-#define WcSendReadRadioParamReq(no_param) { \
-  g_message("sending REQ_READ_RADIO_PARAM %d", no_param);      \
-  WcStart(); \
-  WcPut1PayloadByte( WC_CTL_BYTE_LEN + 1); \
-  WcPut1PayloadByte(WC_REQ_READ_RADIO_PARAM); \
-  WcPut1PayloadByte(no_param); \
-  WcEnd() \
-}
-
-
-#define WcSendWriteRadioParamReq(no_param, value) {    \
-  g_message("sending REQ_WRITE_RADIO_PARAM %d %d", no_param, value);           
\
-  WcStart(); \
-  WcPut1PayloadByte( WC_CTL_BYTE_LEN + 2); \
-  WcPut1PayloadByte(WC_REQ_WRITE_RADIO_PARAM); \
-  WcPut1PayloadByte(no_param); \
-  WcPut1PayloadByte(value); \
-  WcEnd() \
-}
-
-
-#define WcSendReqSendService(addr, type)                               \
-  {                                                                     \
-    uint8_t i;                                                         \
-    g_message("sending REQ_SEND_SERVICE %02x %02x %02x %02x %02x %02x", 
addr[0], addr[1], addr[2] , addr[3], addr[4], addr[5]); \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + WC_ADDR_LEN + 1);              \
-    WcPut1PayloadByte(WC_REQ_SEND_SERVICE);                            \
-    WcPut1PayloadByte(addr[0]);\
-    WcPut1PayloadByte(addr[1]);\
-    WcPut1PayloadByte(addr[2]);\
-    WcPut1PayloadByte(addr[3]);\
-    WcPut1PayloadByte(addr[4]);\
-    WcPut1PayloadByte(addr[5]);\
-    WcPut1PayloadByte(type);                                           \
-    WcEnd()                                                            \
-  }
-
-#define WcSendMsg(addr, len, msg)                                      \
-  {                                                                    \
-    uint8_t i;                                                         \
-    GString* str = g_string_new( "sending REQ_SEND_MESSAGE " );                
\
-    wc_glib_append_addr(str, addr);                                    \
-    g_string_append_printf(str, "%*s ", len, msg);                     \
-    g_message(str->str);                                               \
-    g_string_free(str, TRUE);                                          \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + WC_ADDR_LEN + len );           \
-    WcPut1PayloadByte(WC_REQ_SEND_MESSAGE);                            \
-    WcPut1PayloadByte(addr[0]);                                                
\
-    WcPut1PayloadByte(addr[1]);                                                
\
-    WcPut1PayloadByte(addr[2]);                                                
\
-    WcPut1PayloadByte(addr[3]);                                                
\
-    WcPut1PayloadByte(addr[4]);                                                
\
-    WcPut1PayloadByte(addr[5]);                                                
\
-    WcPut1PayloadByte(msg[0]);                                         \
-    WcPut1PayloadByte(msg[1]);                                         \
-    WcPut1PayloadByte(msg[2]);                                         \
-    WcPut1PayloadByte(msg[3]);                                         \
-    WcPut1PayloadByte(msg[4]);                                         \
-    WcPut1PayloadByte(msg[5]);                                         \
-    WcPut1PayloadByte(msg[6]);                                         \
-    WcPut1PayloadByte(msg[7]);                                         \
-    WcPut1PayloadByte(msg[8]);                                         \
-    WcPut1PayloadByte(msg[9]);                                         \
-    WcPut1PayloadByte(msg[10]);                                                
\
-    WcPut1PayloadByte(msg[11]);                                                
\
-    WcPut1PayloadByte(msg[12]);                                                
\
-    WcEnd()                                                            \
-      }                                                                        
\
-    
-#define WcSendReqReadRemoteRssi(addr)                                  \
-  {                                                                    \
-    GString* str = g_string_new( "sending REQ_READ_REMOTE_RSSI " );            
\
-    wc_glib_append_addr(str, addr);                                    \
-    g_message(str->str);                                               \
-    g_string_free(str, TRUE);                                          \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + WC_ADDR_LEN );         \
-    WcPut1PayloadByte(WC_REQ_READ_REMOTE_RSSI);                                
\
-    WcPut1PayloadByte(addr[0]);                                                
\
-    WcPut1PayloadByte(addr[1]);                                                
\
-    WcPut1PayloadByte(addr[2]);                                                
\
-    WcPut1PayloadByte(addr[3]);                                                
\
-    WcPut1PayloadByte(addr[4]);                                                
\
-    WcPut1PayloadByte(addr[5]);                                                
\
-    WcEnd()                                                            \
-      }                                                                        
\
-
-#define WcSendReqReadLocalRssi(addr)                                   \
-  {                                                                    \
-    GString* str = g_string_new( "sending REQ_READ_LOCAL_RSSI " );     \
-    wc_glib_append_addr(str, addr);                                    \
-    g_message(str->str);                                               \
-    g_string_free(str, TRUE);                                          \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + WC_ADDR_LEN );                 \
-    WcPut1PayloadByte(WC_REQ_READ_LOCAL_RSSI);                         \
-    WcPut1PayloadByte(addr[0]);                                                
\
-    WcPut1PayloadByte(addr[1]);                                                
\
-    WcPut1PayloadByte(addr[2]);                                                
\
-    WcPut1PayloadByte(addr[3]);                                                
\
-    WcPut1PayloadByte(addr[4]);                                                
\
-    WcPut1PayloadByte(addr[5]);                                                
\
-    WcEnd()                                                            \
-      }                                                                        
\
-
-#define WcSendReqReadPhyconfig()                                       \
-  {                                                                    \
-    g_message("sending REQ_READ_PHYCONFIG ");                          \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN );                               \
-    WcPut1PayloadByte(WC_REQ_READ_PHYCONFIG);                          \
-    WcEnd()                                                            \
-  }                                                                    \
-
-#define WcSendReqSelectPhyconfig(cfg)                          \
-  {                                                                    \
-    g_message("sending REQ_SELECT_PHYCONFIG ");                                
\
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + 2);                            \
-    WcPut1PayloadByte(WC_REQ_SELECT_PHYCONFIG);                                
\
-    WcPut1PayloadByte(cfg>>8);                                         \
-    WcPut1PayloadByte(cfg&0xff);                                               
\
-    WcEnd()                                                            \
-  }                                                                    \
-    
-#define WcSendReqReadChannel()                                 \
-  {                                                                    \
-    g_message("sending REQ_READ_CHANNEL ");                            \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN );                               \
-    WcPut1PayloadByte(WC_REQ_READ_CHANNEL);                            \
-    WcEnd()                                                            \
-  }                                                                    \
-
-#define WcSendReqSelectChannel(channel)                                        
\
-  {                                                                    \
-    g_message("sending REQ_SELECT_CHANNEL ");                          \
-    WcStart();                                                         \
-    WcPut1PayloadByte(WC_CTL_BYTE_LEN + 1);                            \
-    WcPut1PayloadByte(WC_REQ_SELECT_CHANNEL);                          \
-    WcPut1PayloadByte(channel);                                                
\
-    WcEnd()                                                            \
-  }                                                                    \
-
-void parse_wc( uint8_t c );
-
-#define __WavecardLink(dev, _x) dev##_x
-#define _WavecardLink(dev, _x)  __WavecardLink(dev, _x)
-#define WavecardLink(_x) _WavecardLink(WAVECARD_UART, _x)
-
-#define WavecardBuffer() WavecardLink(ChAvailable())
-#define ReadWavecardBuffer() { while 
(WavecardLink(ChAvailable())&&!wc_msg_received) 
parse_wc(WavecardLink(Getch())); }
-    
-    
-#endif /* WAVECARD_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]