[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [6314] remove scp1000 files, should not be needed an
From: |
Felix Ruess |
Subject: |
[paparazzi-commits] [6314] remove scp1000 files, should not be needed anymore since we have baro_scp module |
Date: |
Mon, 01 Nov 2010 11:34:41 +0000 |
Revision: 6314
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6314
Author: flixr
Date: 2010-11-01 11:34:40 +0000 (Mon, 01 Nov 2010)
Log Message:
-----------
remove scp1000 files, should not be needed anymore since we have baro_scp module
Removed Paths:
-------------
paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.c
paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.h
paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.c
paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.h
paparazzi3/trunk/sw/airborne/scp1000.c
paparazzi3/trunk/sw/airborne/scp1000.h
Deleted: paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.c 2010-10-31
23:25:11 UTC (rev 6313)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.c 2010-11-01
11:34:40 UTC (rev 6314)
@@ -1,41 +0,0 @@
-#include "scp1000.h"
-
-#ifndef SCP1000_NO_EINT
-static void EXTINT_ISR(void) __attribute__((naked));
-#endif
-
-void scp1000_hw_init(void) {
- /* configure SS pin */
- SetBit(SCP_SS_IODIR, SCP_SS_PIN); /* pin is output */
- Scp1000Unselect(); /* pin idles high */
-
-#ifndef SCP1000_NO_EINT
- /* configure DRDY pin */
- /* connected pin to EXINT */
- SCP_DRDY_PINSEL |= SCP_DRDY_PINSEL_VAL << SCP_DRDY_PINSEL_BIT;
- SetBit(EXTMODE, SCP_DRDY_EINT); /* EINT is edge trigered */
- SetBit(EXTPOLAR,SCP_DRDY_EINT); /* EINT is trigered on rising edge */
- SetBit(EXTINT,SCP_DRDY_EINT); /* clear pending EINT */
-
- /* initialize interrupt vector */
- VICIntSelect &= ~VIC_BIT( SCP_DRDY_VIC_IT ); /* select EINT as IRQ source */
- VICIntEnable = VIC_BIT( SCP_DRDY_VIC_IT ); /* enable it */
- VICVectCntl10 = VIC_ENABLE | SCP_DRDY_VIC_IT;
- VICVectAddr10 = (uint32_t)EXTINT_ISR; /* address of the ISR */
-#endif
-}
-
-#ifndef SCP1000_NO_EINT
-void EXTINT_ISR(void) {
- ISR_ENTRY();
-
- ASSERT((scp1000_status == SCP1000_STA_WAIT_EOC),
- DEBUG_SCP1000, SCP1000_ERR_STATUS);
-
- scp1000_status = SCP1000_STA_GOT_EOC;
-
- SetBit(EXTINT,SCP_DRDY_EINT); /* clear EINT2 */
- VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
- ISR_EXIT();
-}
-#endif
Deleted: paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.h
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.h 2010-10-31
23:25:11 UTC (rev 6313)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.h 2010-11-01
11:34:40 UTC (rev 6314)
@@ -1,107 +0,0 @@
-#ifndef SCP1000_HW_H
-#define SCP1000_HW_H
-
-
-#include "LPC21xx.h"
-#include "interrupt_hw.h"
-#include "spi_hw.h"
-
-#include "pprz_debug.h"
-
-/* FIXME : polling mode cause I'm loosing EOC interrupt */
-#define SCP1000_NO_EINT
-
-#define SCP1000_ERR_STATUS 0
-
-
-/* SS on P0.2 */
-#define SCP_SS_IODIR IO0DIR
-#define SCP_SS_IOSET IO0SET
-#define SCP_SS_IOCLR IO0CLR
-#define SCP_SS_IOPIN IO0PIN
-//#define SCP_SS_PIN 2
-#define SCP_SS_PIN 14
-
-/* DRDY on P0.3 ( EINT1 ) */
-#define SCP_DRDY_IOPIN IO0PIN
-#define SCP_DRDY_PIN 3
-#define SCP_DRDY_PINSEL PINSEL0
-#define SCP_DRDY_PINSEL_BIT 6
-#define SCP_DRDY_PINSEL_VAL 3
-#define SCP_DRDY_EINT 1
-#define SCP_DRDY_VIC_IT VIC_EINT1
-
-#define SCP_MEAS_HIGH_SPEED 0x09
-#define SCP_MEAS_HIGH_RES 0x0A
-#define SCP_MEAS_MODE SCP_MEAS_HIGH_SPEED
-
-#define Scp1000Unselect() SetBit(SCP_SS_IOSET,SCP_SS_PIN)
-#define Scp1000Select() SetBit(SCP_SS_IOCLR,SCP_SS_PIN)
-
-#define Scp1000DataReady() bit_is_set(SCP_DRDY_IOPIN, SCP_DRDY_PIN)
-
-#define Scp1000SendConfig() { \
- ASSERT((scp1000_status == SCP1000_STA_STOPPED), \
- DEBUG_SCP1000, SCP1000_ERR_STATUS); \
- const uint8_t cmd = 0x03<<2|0x02; \
- const uint8_t data = SCP_MEAS_MODE; \
- Scp1000Select(); \
- SpiClearRti(); \
- SpiEnableRti(); \
- SSPDR = cmd; \
- SSPDR = data; \
- SpiEnable(); \
- }
-
-#define Scp1000Read() { \
- ASSERT((scp1000_status == SCP1000_STA_GOT_EOC), \
- DEBUG_SCP1000, SCP1000_ERR_STATUS); \
- const uint8_t cmd1 = 0x1F << 2; \
- const uint8_t cmd2 = 0x20 << 2; \
- Scp1000Select(); \
- scp1000_status = SCP1000_STA_SENDING_REQUEST; \
- SpiClearRti(); \
- SpiEnableRti(); \
- SSPDR = cmd1; \
- SSPDR = 0; \
- SSPDR = cmd2; \
- SSPDR = 0; \
- SSPDR = 0; \
- SpiEnable(); \
- }
-
-/* FIXME READ high bit last */
-
-#define Scp1000OnSpiIt() { \
- switch (scp1000_status) { \
- case SCP1000_STA_STOPPED: \
- { \
- uint8_t foo1 __attribute__ ((unused)) = SSPDR; \
- uint8_t foo2 __attribute__ ((unused)) = SSPDR; \
- Scp1000Unselect(); \
- SpiClearRti(); \
- SpiDisableRti(); \
- SpiDisable(); \
- scp1000_status = SCP1000_STA_WAIT_EOC; \
- } \
- break; \
- case SCP1000_STA_SENDING_REQUEST: \
- { \
- uint8_t foo1 __attribute__ ((unused)) = SSPDR; \
- uint32_t high_bit = SSPDR<<16; \
- uint8_t foo2 __attribute__ ((unused)) = SSPDR; \
- scp1000_pressure = SSPDR<<8; \
- scp1000_pressure += SSPDR; \
- scp1000_pressure += high_bit; \
- Scp1000Unselect(); \
- SpiClearRti(); \
- SpiDisableRti(); \
- SpiDisable(); \
- scp1000_status = SCP1000_STA_DATA_AVAILABLE; \
- } \
- break; \
- } \
- }
-
-
-#endif /* SCP1000_HW_H */
Deleted: paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.c 2010-10-31 23:25:11 UTC
(rev 6313)
+++ paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.c 2010-11-01 11:34:40 UTC
(rev 6314)
@@ -1,36 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008 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.
- *
- */
-
-/*
- hw implementation of scp1000 for sitl simulator
-*/
-
-#include "scp1000.h"
-
-void scp1000_hw_init(void) {}
-
-void scp1000_hw_feed_value(double value) {
- scp1000_pressure = value;
- scp1000_status = SCP1000_STA_DATA_AVAILABLE;
-}
Deleted: paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.h
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.h 2010-10-31 23:25:11 UTC
(rev 6313)
+++ paparazzi3/trunk/sw/airborne/arch/sim/scp1000_hw.h 2010-11-01 11:34:40 UTC
(rev 6314)
@@ -1,32 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008 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.
- *
- */
-
-#ifndef SCP1000_HW_H
-#define SCP1000_HW_H
-
-#include <matrix.h>
-
-extern void scp1000_hw_feed_value(double value);
-
-#endif /* SCP1000_HW_H */
Deleted: paparazzi3/trunk/sw/airborne/scp1000.c
===================================================================
--- paparazzi3/trunk/sw/airborne/scp1000.c 2010-10-31 23:25:11 UTC (rev
6313)
+++ paparazzi3/trunk/sw/airborne/scp1000.c 2010-11-01 11:34:40 UTC (rev
6314)
@@ -1,11 +0,0 @@
-#include "scp1000.h"
-
-volatile uint32_t scp1000_pressure;
-volatile uint8_t scp1000_status;
-
-void scp1000_init(void) {
-
- scp1000_status = SCP1000_STA_STOPPED;
-
- scp1000_hw_init();
-}
Deleted: paparazzi3/trunk/sw/airborne/scp1000.h
===================================================================
--- paparazzi3/trunk/sw/airborne/scp1000.h 2010-10-31 23:25:11 UTC (rev
6313)
+++ paparazzi3/trunk/sw/airborne/scp1000.h 2010-11-01 11:34:40 UTC (rev
6314)
@@ -1,20 +0,0 @@
-#ifndef SCP1000_H
-#define SCP1000_H
-
-#include "std.h"
-
-extern void scp1000_init(void);
-
-#define SCP1000_STA_STOPPED 0
-#define SCP1000_STA_WAIT_EOC 1
-#define SCP1000_STA_GOT_EOC 2
-#define SCP1000_STA_SENDING_REQUEST 3
-#define SCP1000_STA_DATA_AVAILABLE 4
-
-extern volatile uint8_t scp1000_status;
-extern volatile uint32_t scp1000_pressure;
-
-extern void scp1000_hw_init(void);
-#include "scp1000_hw.h"
-
-#endif /* SCP1000_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [6314] remove scp1000 files, should not be needed anymore since we have baro_scp module,
Felix Ruess <=