paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [6243] deleted booz ppm radio control


From: Felix Ruess
Subject: [paparazzi-commits] [6243] deleted booz ppm radio control
Date: Mon, 25 Oct 2010 21:57:48 +0000

Revision: 6243
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6243
Author:   flixr
Date:     2010-10-25 21:57:47 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
deleted booz ppm radio control

Removed Paths:
-------------
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    paparazzi3/trunk/sw/airborne/booz/arch/sim/radio_control/
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c
    paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.c
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h

Deleted: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 21:57:40 UTC (rev 6242)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,43 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#include <subsystems/radio_control.h>
-
-uint8_t  booz_radio_control_ppm_cur_pulse;
-uint32_t booz_radio_control_ppm_last_pulse_time;
-
-void booz_radio_control_ppm_arch_init ( void ) {
-  /* select pin for capture */
-  PPM_PINSEL |= PPM_PINSEL_VAL << PPM_PINSEL_BIT;
-  /* enable capture 0.2 on falling or rising edge + trigger interrupt */
-#if defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_POSITIVE
-  T0CCR = PPM_CCR_CRR | PPM_CCR_CRI;
-#elif defined PPM_PULSE_TYPE && PPM_PULSE_TYPE == PPM_PULSE_TYPE_NEGATIVE
-  T0CCR = PPM_CCR_CRF | PPM_CCR_CRI;
-#else
-#error "ppm_hw.h: Unknown PM_PULSE_TYPE"
-#endif
-  booz_radio_control_ppm_last_pulse_time = 0;
-  booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;
-  booz_radio_control_ppm_frame_available = FALSE;
-}

Deleted: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 21:57:40 UTC (rev 6242)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,73 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#ifndef BOOZ_RADIO_CONTROL_PPM_ARCH_H
-#define BOOZ_RADIO_CONTROL_PPM_ARCH_H
-
-
-#include "LPC21xx.h"
-#include BOARD_CONFIG
-
-/**
- * On tiny (and booz) the ppm counter is running at the same speed as
- * the systic counter. There is no reason for this to be true.
- * Let's add a pair of macros to make it possible for them to be different.
- *
- */
-#define RC_PPM_TICS_OF_USEC        SYS_TICS_OF_USEC
-#define RC_PPM_SIGNED_TICS_OF_USEC SIGNED_SYS_TICS_OF_USEC
-
-
-extern uint8_t  booz_radio_control_ppm_cur_pulse;
-extern uint32_t booz_radio_control_ppm_last_pulse_time;
-
-
-#define RADIO_CONTROL_PPM_IT PPM_CRI
-#define RADIO_CONTROL_PPM_ISR() {                                      \
-                                    \
-    uint32_t now = PPM_CR;                                             \
-    uint32_t length = now - booz_radio_control_ppm_last_pulse_time;    \
-    booz_radio_control_ppm_last_pulse_time = now;                      \
-                                        \
-    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {        
\
-      if (length > SYS_TICS_OF_USEC(PPM_SYNC_MIN_LEN) &&               \
-      length < SYS_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {           \
-    booz_radio_control_ppm_cur_pulse = 0;                              \
-      }                                                                        
\
-    }                                                                  \
-    else {                                                             \
-      if (length > SYS_TICS_OF_USEC(PPM_DATA_MIN_LEN) &&               \
-      length < SYS_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {           \
-    booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = length; \
-    booz_radio_control_ppm_cur_pulse++;                                \
-    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) { \
-      booz_radio_control_ppm_frame_available = TRUE;           \
-    }                                                          \
-      }                                                                        
\
-      else                                                             \
-    booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;       \
-    }                                                                  \
-  }
-
-
-#endif /* BOOZ_RADIO_CONTROL_PPM_ARCH_H */

Deleted: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 21:57:40 UTC (rev 6242)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,136 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2010 The Paparazzi Team
- *
- * 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.
- */
-
-#include <subsystems/radio_control.h>
-
-#include <stm32/rcc.h>
-#include <stm32/gpio.h>
-#include <stm32/tim.h>
-#include <stm32/misc.h>
-
-#include "sys_time.h"
-
-/*
- *
- * This a radio control ppm driver for stm32
- * signal on PA1 TIM2/CH2 (uart1 trig on lisa/L)
- *
- */
-uint8_t  booz_radio_control_ppm_cur_pulse;
-uint32_t booz_radio_control_ppm_last_pulse_time;
-static uint32_t timer_rollover_cnt;
-
-void tim2_irq_handler(void);
-
-void booz_radio_control_ppm_arch_init ( void ) {
-
-  /* TIM2 channel 2 pin (PA.01) configuration */
-  GPIO_InitTypeDef GPIO_InitStructure;
-  GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_1;
-  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
-  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
-  GPIO_Init(GPIOA, &GPIO_InitStructure);
-
-  /* TIM2 clock enable */
-  RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
-
-  /* GPIOA clock enable */
-  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
-
-  /* Time Base configuration */
-  TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
-  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
-  TIM_TimeBaseStructure.TIM_Period        = 0xFFFF;
-  TIM_TimeBaseStructure.TIM_Prescaler     = 0x8;
-  TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;
-  TIM_TimeBaseStructure.TIM_CounterMode   = TIM_CounterMode_Up;
-  TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
-
- /* TIM2 configuration: Input Capture mode ---------------------
-     The external signal is connected to TIM2 CH2 pin (PA.01)
-     The Rising edge is used as active edge,
-  ------------------------------------------------------------ */
-  TIM_ICInitTypeDef  TIM_ICInitStructure;
-  TIM_ICInitStructure.TIM_Channel = TIM_Channel_2;
-  TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;
-  TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
-  TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
-  TIM_ICInitStructure.TIM_ICFilter = 0x00;
-  TIM_ICInit(TIM2, &TIM_ICInitStructure);
-
-  /* Enable the TIM2 global Interrupt */
-  NVIC_InitTypeDef NVIC_InitStructure;
-  NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
-  NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
-  NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
-  NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
-  NVIC_Init(&NVIC_InitStructure);
-
-  /* TIM2 enable counter */
-  TIM_Cmd(TIM2, ENABLE);
-
-  /* Enable the CC2 Interrupt Request */
-  TIM_ITConfig(TIM2, TIM_IT_CC2|TIM_IT_Update, ENABLE);
-
-  booz_radio_control_ppm_last_pulse_time = 0;
-  booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;
-  timer_rollover_cnt = 0;
-
-}
-
-
-void tim2_irq_handler(void) {
-
-  if(TIM_GetITStatus(TIM2, TIM_IT_CC2) == SET) {
-    TIM_ClearITPendingBit(TIM2, TIM_IT_CC2);
-
-    uint32_t now = TIM_GetCapture2(TIM2) + timer_rollover_cnt;
-    uint32_t length = now - booz_radio_control_ppm_last_pulse_time;
-    booz_radio_control_ppm_last_pulse_time = now;
-
-    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {
-      if (length > RC_PPM_TICS_OF_USEC(PPM_SYNC_MIN_LEN) &&
-      length < RC_PPM_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {
-    booz_radio_control_ppm_cur_pulse = 0;
-      }
-    }
-    else {
-      if (length > RC_PPM_TICS_OF_USEC(PPM_DATA_MIN_LEN) &&
-      length < RC_PPM_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {
-    booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = length;
-    booz_radio_control_ppm_cur_pulse++;
-    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {
-      booz_radio_control_ppm_frame_available = TRUE;
-    }
-      }
-      else {
-    booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;
-      }
-    }
-  }
-  else if(TIM_GetITStatus(TIM2, TIM_IT_Update) == SET) {
-    timer_rollover_cnt+=(1<<16);
-    TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
-  }
-
-}

Deleted: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 21:57:40 UTC (rev 6242)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,36 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2010 The Paparazzi Team
- *
- * 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.
- */
-
-/** \file booz_radio_control_ppm_hw.h
- *  \brief STM32 ppm decoder
- *
- */
-
-/**
- * On tiny (and booz) the ppm counter is running at the same speed as
- * the systic counter. There is no reason for this to be true.
- * Let's add a pair of macros to make it possible for them to be different.
- *
- */
-#define RC_PPM_TICS_OF_USEC(_v)        SYS_TICS_OF_USEC((_v)/9)
-#define RC_PPM_SIGNED_TICS_OF_USEC(_v) SIGNED_SYS_TICS_OF_USEC((_v)/9)

Deleted: paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c      2010-10-25 
21:57:40 UTC (rev 6242)
+++ paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c      2010-10-25 
21:57:47 UTC (rev 6243)
@@ -1,73 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#include <subsystems/radio_control.h>
-
-#include "led.h"
-
-struct RadioControl radio_control;
-
-void radio_control_init(void) {
-  uint8_t i;
-  for (i=0; i<RADIO_CONTROL_NB_CHANNEL; i++)
-    radio_control.values[i] = 0;
-  radio_control.status = RADIO_CONTROL_REALLY_LOST;
-  radio_control.time_since_last_frame = RADIO_CONTROL_REALLY_LOST_TIME;
-  radio_control.radio_ok_cpt = 0;
-  radio_control.frame_rate = 0;
-  radio_control.frame_cpt = 0;
-  radio_control_impl_init();
-}
-
-
-void radio_control_periodic(void) {
-
-  /* compute frame rate */
-  RunOnceEvery(60, {
-      radio_control.frame_rate = radio_control.frame_cpt;
-      radio_control.frame_cpt = 0;
-    });
-
-  /* check for timeouts */
-  if (radio_control.time_since_last_frame >= RADIO_CONTROL_REALLY_LOST_TIME) {
-    radio_control.status = RADIO_CONTROL_REALLY_LOST;
-  }
-  else {
-    if (radio_control.time_since_last_frame >= RADIO_CONTROL_LOST_TIME) {
-      radio_control.status = RADIO_CONTROL_LOST;
-      radio_control.radio_ok_cpt = RADIO_CONTROL_OK_CPT;
-    }
-    radio_control.time_since_last_frame++;
-  }
-
-  /* sigal status with LEDs */
-#if defined RADIO_CONTROL_LED
-  if (radio_control.status == RADIO_CONTROL_OK) {
-    LED_ON(RADIO_CONTROL_LED);
-  }
-  else {
-    LED_OFF(RADIO_CONTROL_LED);
-  }
-#endif
-
-}

Deleted: paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h      2010-10-25 
21:57:40 UTC (rev 6242)
+++ paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h      2010-10-25 
21:57:47 UTC (rev 6243)
@@ -1,61 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#ifndef BOOZ_RADIO_CONTROL_H
-#define BOOZ_RADIO_CONTROL_H
-
-#include "std.h"
-#include "paparazzi.h"
-
-/* underlying hardware */
-#include RADIO_CONTROL_TYPE_H
-/* must be defined by underlying hardware */
-extern void radio_control_impl_init(void);
-
-/* status */
-#define RADIO_CONTROL_OK          0
-#define RADIO_CONTROL_LOST        1
-#define RADIO_CONTROL_REALLY_LOST 2
-
-/* timeouts - for now assumes 60Hz periodic */
-#define RADIO_CONTROL_LOST_TIME        30
-#define RADIO_CONTROL_REALLY_LOST_TIME 60
-/* number of valid frames before going back to OK */
-#define RADIO_CONTROL_OK_CPT      15
-
-struct RadioControl {
-  uint8_t status;
-  uint8_t time_since_last_frame;
-  uint8_t radio_ok_cpt;
-  uint8_t frame_rate;
-  uint8_t frame_cpt;
-  pprz_t  values[RADIO_CONTROL_NB_CHANNEL];
-};
-
-extern struct RadioControl radio_control;
-
-extern void radio_control_init(void);
-extern void radio_control_periodic(void);
-
-
-#endif /* BOOZ_RADIO_CONTROL_H */

Deleted: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.c    
2010-10-25 21:57:40 UTC (rev 6242)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.c    
2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,33 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#include <subsystems/radio_control.h>
-
-
-uint16_t booz_radio_control_ppm_pulses[ RADIO_CONTROL_NB_CHANNEL ];
-volatile bool_t booz_radio_control_ppm_frame_available;
-
-void radio_control_impl_init(void) {
-  booz_radio_control_ppm_frame_available = FALSE;
-  booz_radio_control_ppm_arch_init();
-}

Deleted: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h    
2010-10-25 21:57:40 UTC (rev 6242)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h    
2010-10-25 21:57:47 UTC (rev 6243)
@@ -1,64 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * 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.
- */
-
-#ifndef BOOZ_RADIO_CONTROL_PPM_H
-#define BOOZ_RADIO_CONTROL_PPM_H
-
-/**
- * Architecture dependant code
- */
-#include "subsystems/radio_control/ppm_arch.h"
-/* must be implemented by arch dependant code */
-extern void booz_radio_control_ppm_arch_init ( void );
-
-/**
- * Generated code holding the description of a given
- * transmitter
- */
-#include "conf_radio_control_ppm.h"
-
-/**
- *  ppm pulse type : futaba is falling edge clocked whereas JR is rising edge
- */
-#define PPM_PULSE_TYPE_POSITIVE 0
-#define PPM_PULSE_TYPE_NEGATIVE 1
-
-extern uint16_t booz_radio_control_ppm_pulses[ RADIO_CONTROL_NB_CHANNEL ];
-extern volatile bool_t booz_radio_control_ppm_frame_available;
-
-
-#define RadioControlEvent(_received_frame_handler) {                   \
-    if (booz_radio_control_ppm_frame_available) {                      \
-      radio_control.frame_cpt++;                                       \
-      radio_control.time_since_last_frame = 0;                         \
-      if (radio_control.radio_ok_cpt > 0) radio_control.radio_ok_cpt--; \
-      else {                                                           \
-        radio_control.status = RADIO_CONTROL_OK;                       \
-        NormalizePpm();                                                        
\
-        _received_frame_handler();                                     \
-      }                                                                        
\
-      booz_radio_control_ppm_frame_available = FALSE;                  \
-    }                                                                  \
-  }
-
-#endif /* BOOZ_RADIO_CONTROL_PPM_H */




reply via email to

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