[doxygen] only doxygen updates

This commit is contained in:
Felix Ruess
2012-12-14 18:21:09 +01:00
parent a3023dc31c
commit ecae43d551
86 changed files with 846 additions and 167 deletions
+3
View File
@@ -1462,6 +1462,9 @@ PREDEFINED = USE_GPS \
USE_IMU \
USE_MAGNETOMETER \
USE_BAROMETER \
SPI_MASTER \
SPI_SLAVE \
USE_SPI0 USE_SPI1 USE_SPI2 \
RADIO_CONTROL \
GUIDANCE_V_C \
__attribute__(x)=
+2 -2
View File
@@ -91,7 +91,7 @@ switch( state )
@endcode
@section stylecpp Preprocessor directives
- For conditional compilation use @c #if instead of @c #ifdef.
- For conditional compilation use @c \#if instead of @c \#ifdef.
Someone might write code like:
@code
#ifdef USE_FOO
@@ -102,7 +102,7 @@ Someone else might compile the code with turned-off foo info like:
@verbatim
gcc stuff.c -DUSE_FOO=0
@endverbatim
So use @c #if not @c #ifdef to turn a feature on or off. This works fine, and does the right thing, even if USE_FOO is not defined at all (!)
So use @c \#if not @c \#ifdef to turn a feature on or off. This works fine, and does the right thing, even if USE_FOO is not defined at all (!)
@code
#if USE_FOO
bar();
+10 -2
View File
@@ -19,12 +19,20 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file interrupt_hw.h
* \brief ARM Low level interrupt handling
/**
* @file arch/lpc21/interrupt_hw.h
* @ingroup lpc21_arch
*
* ARM Low level interrupt handling.
*/
#ifndef INTERRUPT_HW_H
#define INTERRUPT_HW_H
#include "armVIC.h"
#define int_enable() enableIRQ()
#define int_disable() disableIRQ()
#endif /* INTERRUPT_HW_H */
+6 -2
View File
@@ -1,6 +1,4 @@
/*
* Paparazzi lpc21 arch dependant microcontroller initialisation function
*
* Copyright (C) 2010 The Paparazzi team
*
* This file is part of Paparazzi.
@@ -22,6 +20,12 @@
*
*/
/**
* @file arch/lpc21/mcu_arch.c
* @brief lpc21 arch dependant microcontroller initialisation functions.
* @ingroup lpc21_arch
*/
#include "mcu.h"
+7 -2
View File
@@ -1,6 +1,4 @@
/*
* Paparazzi lpc21 arch dependant microcontroller initialisation functions
*
* Copyright (C) 2010 The Paparazzi team
*
* This file is part of Paparazzi.
@@ -22,6 +20,13 @@
*
*/
/**
* @file arch/lpc21/mcu_arch.h
* @brief lpc21 arch dependant microcontroller initialisation functions.
* @defgroup lpc21_arch LPC21 architecture
* @ingroup lpc21_arch
*/
#ifndef LPC21_MCU_ARCH_H
#define LPC21_MCU_ARCH_H
@@ -20,6 +20,13 @@
*
*/
/**
* @file arch/lpc21/mcu_periph/adc_arch.c
* @ingroup lpc21_arch
*
* Handling of ADC hardware for lpc21xx.
*/
#include "mcu_periph/adc.h"
#include "LPC21xx.h"
+10 -3
View File
@@ -20,12 +20,19 @@
*
*/
#ifndef ADC_HW_H
#define ADC_HW_H
/**
* @file arch/lpc21/mcu_periph/adc_arch.h
* @ingroup lpc21_arch
*
* Handling of ADC hardware for lpc21xx.
*/
#ifndef ADC_ARCH_H
#define ADC_ARCH_H
#include BOARD_CONFIG
#define AdcBank0(x) (x)
#define AdcBank1(x) (x+NB_ADC)
#endif /* ADC_HW_H */
#endif /* ADC_ARCH_H */
@@ -1,3 +1,32 @@
/*
* Copyright (C) 2008 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.
*
*/
/**
* @file arch/lpc21/mcu_periph/dac_arch.c
* @ingroup lpc21_arch
*
* Handling of DAC hardware for lpc21xx.
*/
#include "mcu_periph/dac.h"
/* turn on DAC pins */
@@ -1,3 +1,32 @@
/*
* Copyright (C) 2008 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.
*
*/
/**
* @file arch/lpc21/mcu_periph/dac_arch.h
* @ingroup lpc21_arch
*
* Handling of DAC hardware for lpc21xx.
*/
#ifndef LPC21_MCU_PERIPH_DAC_ARCH_H
#define LPC21_MCU_PERIPH_DAC_ARCH_H
+8 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 The Paparazzi Team
* Copyright (C) 2010-2012 The Paparazzi Team
*
* This file is part of paparazzi.
*
@@ -20,6 +20,13 @@
*
*/
/**
* @file arch/lpc21/mcu_periph/i2c_arch.c
* @ingroup lpc21_arch
*
* Handling of I2C hardware for LPC21xx.
*/
#include "mcu_periph/i2c.h"
#include "std.h"
+32 -3
View File
@@ -1,5 +1,34 @@
#ifndef I2C_HW_H
#define I2C_HW_H
/*
* Copyright (C) 2010-2012 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 arch/lpc21/mcu_periph/i2c_arch.h
* @ingroup lpc21_arch
*
* Handling of I2C hardware for LPC21xx.
*/
#ifndef I2C_ARCH_H
#define I2C_ARCH_H
#include "LPC21xx.h"
@@ -31,4 +60,4 @@ extern void i2c1_hw_init(void);
#endif /* USE_I2C1 */
#endif /* I2C_HW_H */
#endif /* I2C_ARCH_H */
@@ -1,5 +1,4 @@
/* $Id$
*
/*
* Copyright (C) 2011 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -21,8 +20,11 @@
*
*/
/** \brief handling of arm7 PWM input using a timer with capture
/**
* @file arch/lpc21/mcu_periph/pwm_input_arch.c
* @ingroup lpc21_arch
*
* handling of arm7 PWM input using a timer with capture.
*/
#include "mcu_periph/pwm_input_arch.h"
@@ -1,5 +1,4 @@
/* $Id$
*
/*
* Copyright (C) 2011 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -21,8 +20,11 @@
*
*/
/** \brief handling of arm7 PWM input using a timer with capture
/**
* @file arch/lpc21/mcu_periph/pwm_input_arch.h
* @ingroup lpc21_arch
*
* handling of arm7 PWM input using a timer with capture.
*/
#ifndef PWM_INPUT_ARCH_H
+34 -23
View File
@@ -22,8 +22,12 @@
/**
* @file arch/lpc21/mcu_periph/spi_arch.c
* @ingroup lpc21_arch
*
* Handling of SPI hardware for lpc21xx.
* for now only SPI1 ( aka SSP )
*
* TODO current implementation only works for SPI1 (SSP)
*/
#include "mcu_periph/spi.h"
@@ -34,13 +38,10 @@
#include "armVIC.h"
#include BOARD_CONFIG
// FIXME
// current implementation only works for SPI1 (SSP)
/** Slave selection functions and macros.
*
/** @name Slave selection
* Slave selection functions and macros.
*/
///@{
#define SPI_SELECT_SLAVE_IO__(port, reg) IO ## port ## reg
#define SPI_SELECT_SLAVE_IO_(port, reg) SPI_SELECT_SLAVE_IO__(port, reg)
@@ -85,10 +86,12 @@ __attribute__ ((always_inline)) static inline void SpiSlaveUnselect(uint8_t slav
break;
}
}
///@}
/** Spi clock polarity and phase functions
/** @name SPI clock
* Spi clock polarity and phase functions.
*/
///@{
__attribute__ ((always_inline)) static inline void SpiSetCPOL(struct spi_periph* p) {
SetBit(((sspRegs_t *)(p->reg_addr))->cr0, CPOL);
}
@@ -104,10 +107,14 @@ __attribute__ ((always_inline)) static inline void SpiSetCPHA(struct spi_periph*
__attribute__ ((always_inline)) static inline void SpiClearCPHA(struct spi_periph* p) {
ClearBit(((sspRegs_t *)(p->reg_addr))->cr0, CPHA);
}
///@}
/** Spi data size functions
/**
* Set the SPI data size to 8 or 16bit.
* @param p SPI peripheral to set
* @param dss data size
*/
__attribute__ ((always_inline)) static inline void SpiSetDataSize(struct spi_periph* p, enum SPIDataSizeSelect dss) {
switch (dss) {
default:
@@ -120,9 +127,11 @@ __attribute__ ((always_inline)) static inline void SpiSetDataSize(struct spi_per
}
}
/** Spi control functions
*/
/** @name SPI control
* Spi control functions.
*/
///@{
__attribute__ ((always_inline)) static inline void SpiEnable(struct spi_periph* p) {
SetBit(((sspRegs_t *)(p->reg_addr))->cr1, SSE);
}
@@ -167,6 +176,7 @@ __attribute__ ((always_inline)) static inline void SpiRead(struct spi_periph* p,
*c = ((sspRegs_t *)(p->reg_addr))->dr;
}
__attribute__ ((always_inline)) static inline void SpiTransmit(struct spi_periph* p, struct spi_transaction* t) {
// when all byte are sent, continue until tx_idx reach input_length
// needed when input_length is bigger than output_length
@@ -344,6 +354,7 @@ __attribute__ ((always_inline)) static inline void SpiSlaveAutomaton(struct spi_
}
}
///@}
/* SSP (SPI1) pins (UM10120_1.pdf page 76)
P0.17 SCK PINSEL1 2 << 2
@@ -397,17 +408,17 @@ void spi0_arch_init(void) {
#if USE_SPI1
/* SSPCR0 settings */
#define MASTER_SSP_DSS 0x07 << 0 /* data size : 8 bits */
#define MASTER_SSP_FRF 0x00 << 4 /* frame format : SPI */
#define MASTER_SSP_CPOL 0x00 << 6 /* clock polarity : SCK idles low */
#define MASTER_SSP_CPHA 0x00 << 7 /* clock phase : data captured on first clock transition */
#define MASTER_SSP_SCR 0x0F << 8 /* serial clock rate : divide by 16 */
#define MASTER_SSP_DSS 0x07 << 0 ///< data size : 8 bits
#define MASTER_SSP_FRF 0x00 << 4 ///< frame format : SPI
#define MASTER_SSP_CPOL 0x00 << 6 ///< clock polarity : SCK idles low
#define MASTER_SSP_CPHA 0x00 << 7 ///< clock phase : data captured on first clock transition
#define MASTER_SSP_SCR 0x0F << 8 ///< serial clock rate : divide by 16
/* SSPCR1 settings */
#define MASTER_SSP_LBM 0x00 << 0 /* loopback mode : disabled */
#define MASTER_SSP_SSE 0x00 << 1 /* SSP enable : disabled */
#define MASTER_SSP_MS 0x00 << 2 /* master slave mode : master */
#define MASTER_SSP_SOD 0x00 << 3 /* slave output disable : don't care when master */
#define MASTER_SSP_LBM 0x00 << 0 ///< loopback mode : disabled
#define MASTER_SSP_SSE 0x00 << 1 ///< SSP enable : disabled
#define MASTER_SSP_MS 0x00 << 2 ///< master slave mode : master
#define MASTER_SSP_SOD 0x00 << 3 ///< slave output disable : don't care when master
/** Clock prescaler.
* SPI clock rate = PCLK / (CPSR*(SCR+1))
@@ -547,7 +558,7 @@ bool_t spi_resume(struct spi_periph* p, uint8_t slave) {
return FALSE;
}
#endif /** SPI_MASTER */
#endif /* SPI_MASTER */
/*
@@ -630,7 +641,7 @@ void spi1_slave_arch_init(void) {
#endif
/* Register one (and only one) transaction to use spi as slave */
/** Register one (and only one) transaction to use spi as slave */
bool_t spi_slave_register(struct spi_periph* p, struct spi_transaction* t) {
if (p->trans_insert_idx >= 1) {
@@ -22,6 +22,8 @@
/**
* @file arch/lpc21/mcu_periph/spi_arch.h
* @ingroup lpc21_arch
*
* Handling of SPI hardware for lpc21xx.
* for now only SPI1 ( aka SSP )
*/
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/lpc21/mcu_periph/spi_slave_hs_arch.c
* @ingroup lpc21_arch
*
* Highspeed SPI Slave Interface.
*/
#include "spi_slave_hs_arch.h"
#include "mcu_periph/spi.h"
@@ -19,17 +19,18 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/lpc21/mcu_periph/spi_slave_hs_arch.h
* @ingroup lpc21_arch
*
* Highspeed SPI Slave Interface.
* SS on P0.20
* Circular Buffer
*/
#ifndef SPI_SLAVE_HS_ARCH_H
#define SPI_SLAVE_HS_ARCH_H
/*
Highspeed SPI Slave Interface
SS on P0.20
Circular Buffer
*/
#include "std.h"
@@ -22,8 +22,9 @@
/**
* @file arch/lpc21/mcu_periph/sys_time_arch.c
* @brief LPC21xx timing functions.
* @ingroup lpc21_arch
*
* LPC21xx timing functions.
*/
#include "mcu_periph/sys_time.h"
@@ -23,8 +23,9 @@
/**
* @file arch/lpc21/mcu_periph/sys_time_arch.h
* @brief LPC21xx timing functions.
* @ingroup lpc21_arch
*
* LPC21xx timing functions.
*/
#ifndef SYS_TIME_ARCH_H
@@ -20,10 +20,14 @@
*
*/
/*
* Brief LPC21 uart code
/**
* @file arch/lpc21/mcu_periph/uart_arch.c
* @ingroup lpc21_arch
*
* Handling of UART hardware for lpc21xx.
*/
#include "mcu_periph/uart.h"
#include "armVIC.h"
@@ -20,6 +20,13 @@
*
*/
/**
* @file arch/lpc21/mcu_periph/uart_arch.h
* @ingroup lpc21_arch
*
* Handling of UART hardware for lpc21xx.
*/
#ifndef LPC21_UART_ARCH_H
#define LPC21_UART_ARCH_H
@@ -19,11 +19,15 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file servos_ppm_out.c
* \Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM
* \ for a R/C receiver which has a microcontroller to drive the servos
* \(not a 4015 or 4017 decade counter chip).
/**
* @file arch/lpc21/subsystems/actuators/servos_ppm_hw.c
*
* Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM
* for a R/C receiver which has a microcontroller to drive the servos
* (not a 4015 or 4017 decade counter chip).
*/
#include "subsystems/actuators.h"
#include "paparazzi.h"
#include "generated/airframe.h"
@@ -19,11 +19,15 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file servos_ppm_out.h
* \Efficient driving of the MAT0.1 pin (SERVO_CLOCK_PIN) using TIMER0 to produce
* \PPM for a R/C receiver which has a microcontroller to drive the servos
* \(not a 4015 or 4017 decade counter chip).
/**
* @file arch/lpc21/subsystems/actuators/servos_ppm_hw.h
*
* Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM
* for a R/C receiver which has a microcontroller to drive the servos
* (not a 4015 or 4017 decade counter chip).
*/
#ifndef SERVOS_PPM_HW_H
#define SERVOS_PPM_HW_H
@@ -1,3 +1,29 @@
/*
* Copyright (C) 2012 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 arch/sim/mcu_periph/adc_arch.c
* Dummy functions for handling of ADC hardware in sim.
*/
#include "mcu_periph/adc.h"
void adc_buf_channel(uint8_t adc_channel __attribute__ ((unused)),
+29 -3
View File
@@ -1,8 +1,34 @@
#ifndef ADC_HW_H
#define ADC_HW_H
/*
* Copyright (C) 2012 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 arch/sim/mcu_periph/adc_arch.h
* Dummy header for handling of ADC hardware in sim.
*/
#ifndef ADC_ARCH_H
#define ADC_ARCH_H
/* Dummy definitions */
#define AdcBank1(x) x
#define AdcBank0(x) x
#endif /* ADC_HW_H */
#endif /* ADC_ARCH_H */
@@ -1,3 +1,29 @@
/*
* Copyright (C) 2012 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 arch/sim/mcu_periph/i2c_arch.c
* Dummy functions for handling of I2C hardware in sim.
*/
#include "mcu_periph/i2c.h"
@@ -1,3 +1,30 @@
/*
* Copyright (C) 2012 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 arch/sim/mcu_periph/i2c_arch.h
* Dummy header for handling of I2C hardware in sim.
*/
#ifndef SIM_MCU_PERIPH_I2C_ARCH_H
#define SIM_MCU_PERIPH_I2C_ARCH_H
@@ -19,6 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/sim/mcu_periph/spi_arch.c
* Dummy functions for handling of SPI hardware in sim.
*/
#include "mcu_periph/spi.h"
+3 -1
View File
@@ -19,7 +19,9 @@
* Boston, MA 02111-1307, USA.
*/
/** Dummy functions for handling of SPI hardware in sim.
/**
* @file arch/sim/mcu_periph/spi_arch.h
* Dummy header for handling of SPI hardware in sim.
*/
#ifndef SPI_ARCH_H
@@ -20,6 +20,11 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/sim/mcu_periph/sys_time_arch.c
* Handling of sys_time in sim.
*/
#include "mcu_periph/sys_time.h"
@@ -22,7 +22,7 @@
*/
/** @file arch/sim/mcu_periph/sys_time_arch.h
* Simulator timing functions
* Simulator timing functions.
*/
#ifndef SYS_TIME_ARCH_H
@@ -1,3 +1,29 @@
/*
* Copyright (C) 2012 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 arch/sim/mcu_periph/uart_arch.h
* Dummy header for handling of UART hardware in sim.
*/
#include <stdbool.h>
#include <inttypes.h>
#include <stdio.h>
+6 -2
View File
@@ -19,8 +19,12 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file interrupt_hw.h
* \brief STM32 Low level interrupt handling
/**
* @file arch/stm32/interrupt_hw.h
* @ingroup stm32_arch
*
* STM32 Low level interrupt handling.
* Empty for now, just to match what we have on LPC
*/
+7 -3
View File
@@ -1,7 +1,5 @@
/*
* Paparazzi stm32 arch dependant microcontroller initialisation function
*
* Copyright (C) 2010 The Paparazzi team
* Copyright (C) 2010-2012 The Paparazzi team
*
* This file is part of Paparazzi.
*
@@ -22,6 +20,12 @@
*
*/
/**
* @file arch/stm32/mcu_arch.c
* @brief stm32 arch dependant microcontroller initialisation functions.
* @ingroup stm32_arch
*/
#include "mcu.h"
#include BOARD_CONFIG
+8 -3
View File
@@ -1,7 +1,5 @@
/*
* Paparazzi stm32 arch dependant microcontroller initialisation function
*
* Copyright (C) 2010 The Paparazzi team
* Copyright (C) 2010-2012 The Paparazzi team
*
* This file is part of Paparazzi.
*
@@ -22,6 +20,13 @@
*
*/
/**
* @file arch/stm32/mcu_arch.h
* @brief stm32 arch dependant microcontroller initialisation functions.
* @defgroup stm32_arch STM32 architecture
* @ingroup stm32_arch
*/
#ifndef STM32_MCU_ARCH_H
#define STM32_MCU_ARCH_H
+4 -4
View File
@@ -1,6 +1,5 @@
/*
*
* Copyright (C) 2010 The Paparazzi Team
* Copyright (C) 2010-2012 The Paparazzi Team
*
* This file is part of paparazzi.
*
@@ -22,9 +21,10 @@
*/
/**
* @file arch/stm32/mcu_periph/adc_arch.c
* @ingroup stm32_arch
*
* This is the driver for the analog to digital converters
* on STM32
* Driver for the analog to digital converters on STM32.
*
* Usage:
* Define flags for ADCs to use and their channels:
+11 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 Paparazzi team
* Copyright (C) 2010-2012 Paparazzi team
*
* This file is part of Paparazzi.
*
@@ -20,8 +20,15 @@
*
*/
#ifndef ADC_HW_H
#define ADC_HW_H
/**
* @file arch/stm32/mcu_periph/adc_arch.h
* @ingroup stm32_arch
*
* Driver for the analog to digital converters on STM32.
*/
#ifndef ADC_ARCH_H
#define ADC_ARCH_H
/*
* Architecture dependant ADC functions for STM32
@@ -81,4 +88,4 @@ enum adc2_channels {
#define AdcBank0(x) (x)
#define AdcBank1(x) (x+NB_ADC)
#endif /* ADC_HW_H */
#endif /* ADC_ARCH_H */
@@ -20,6 +20,13 @@
*
*/
/**
* @file arch/stm32/mcu_periph/can_arch.c
* @ingroup stm32_arch
*
* Handling of CAN hardware for STM32.
*/
#include <stdint.h>
#include <string.h>
@@ -20,6 +20,13 @@
*
*/
/**
* @file arch/stm32/mcu_periph/can_arch.h
* @ingroup stm32_arch
*
* Handling of CAN hardware for STM32.
*/
#ifndef MCU_PERIPH_STM32_CAN_ARCH_H
#define MCU_PERIPH_STM32_CAN_ARCH_H
@@ -1,3 +1,32 @@
/*
* Copyright (C) 2012 Piotr Esden-Tempski <piotr@esden.net>
*
* 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 arch/stm32/mcu_periph/gpio_arch.h
* @ingroup stm32_arch
*
* Handling of GPIOs for STM32.
*/
#ifndef MY_GPIO_ARCH_H
#define MY_GPIO_ARCH_H
@@ -1,3 +1,31 @@
/*
* Copyright (C) 2009-2012 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 arch/stm32/mcu_periph/i2c_arch.c
* @ingroup stm32_arch
* Handling of I2C hardware for STM32.
*/
#include "mcu_periph/i2c.h"
#include <libopencm3/stm32/f1/rcc.h>
+6 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Antoine Drouin <poinix@gmail.com>
* Copyright (C) 2009-2012 The Paparazzi Team
*
* This file is part of paparazzi.
*
@@ -19,8 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/*
* Hardware level I2C handling
/**
* @file arch/stm32/mcu_periph/i2c_arch.h
* @ingroup stm32_arch
*
* Hardware level I2C handling for the STM32.
*/
#ifndef I2C_HW_H
+16 -13
View File
@@ -22,6 +22,7 @@
/**
* @file arch/stm32/mcu_periph/spi_arch.c
* @ingroup stm32_arch
*
* Handling of SPI hardware for STM32.
* SPI Master code.
@@ -55,8 +56,10 @@ static void spi_rw(struct spi_periph* p, struct spi_transaction * _trans);
static void process_rx_dma_interrupt( struct spi_periph *spi );
static void process_tx_dma_interrupt( struct spi_periph *spi );
// This structure keeps track of specific ID's for each SPI bus,
// which allows for more code reuse.
/**
* This structure keeps track of specific ID's for each SPI bus,
* which allows for more code reuse.
*/
struct spi_periph_dma {
u32 spi;
u32 spidr;
@@ -181,18 +184,18 @@ static inline void SpiSlaveSelect(uint8_t slave)
}
}
/// Enable DMA rx channel interrupt
static void spi_arch_int_enable( struct spi_periph *spi ) {
// Enable DMA rx channel interrupt
nvic_set_priority( ((struct spi_periph_dma *)spi->init_struct)->nvic_irq, 0);
nvic_enable_irq( ((struct spi_periph_dma *)spi->init_struct)->nvic_irq );
}
/// Disable DMA rx channel interrupt
static void spi_arch_int_disable( struct spi_periph *spi ) {
// Disable DMA rx channel interrupt
nvic_disable_irq( ((struct spi_periph_dma *)spi->init_struct)->nvic_irq );
}
/**
/*
* These functions map the publically available "spi" structures to
* specific pins on this processor
*/
@@ -633,7 +636,7 @@ bool_t spi_resume(struct spi_periph* p, uint8_t slave) {
#ifdef USE_SPI1
// receive transferred over DMA
/// receive transferred over DMA
void dma1_channel2_isr(void)
{
struct spi_transaction *trans = spi1.trans[spi1.trans_extract_idx];
@@ -652,7 +655,7 @@ void dma1_channel2_isr(void)
process_rx_dma_interrupt( &spi1 );
}
// transmit transferred over DMA
/// transmit transferred over DMA
void dma1_channel3_isr(void)
{
struct spi_transaction *trans = spi1.trans[spi1.trans_extract_idx];
@@ -676,7 +679,7 @@ void dma1_channel3_isr(void)
#endif
#ifdef USE_SPI2
// receive transferred over DMA
/// receive transferred over DMA
void dma1_channel4_isr(void)
{
struct spi_transaction *trans = spi2.trans[spi2.trans_extract_idx];
@@ -695,7 +698,7 @@ void dma1_channel4_isr(void)
process_rx_dma_interrupt( &spi2 );
}
// transmit transferred over DMA
/// transmit transferred over DMA
void dma1_channel5_isr(void)
{
struct spi_transaction *trans = spi2.trans[spi2.trans_extract_idx];
@@ -718,7 +721,7 @@ void dma1_channel5_isr(void)
#endif
#if USE_SPI0
// receive transferred over DMA
/// receive transferred over DMA
void dma2_channel1_isr(void)
{
struct spi_transaction *trans = spi0.trans[spi0.trans_extract_idx];
@@ -737,7 +740,7 @@ void dma2_channel1_isr(void)
process_rx_dma_interrupt( &spi0 );
}
// transmit transferred over DMA
/// transmit transferred over DMA
void dma2_channel2_isr(void)
{
struct spi_transaction *trans = spi0.trans[spi0.trans_extract_idx];
@@ -760,7 +763,7 @@ void dma2_channel2_isr(void)
#endif
// Processing done after rx completes.
/// Processing done after rx completes.
void process_rx_dma_interrupt( struct spi_periph *spi ) {
struct spi_periph_dma *dma = spi->init_struct;
struct spi_transaction *trans = spi->trans[spi->trans_extract_idx];
@@ -789,7 +792,7 @@ void process_rx_dma_interrupt( struct spi_periph *spi ) {
spi_rw(spi, spi->trans[spi->trans_extract_idx]);
}
// Processing done after tx completes
/// Processing done after tx completes
void process_tx_dma_interrupt( struct spi_periph *spi ) {
struct spi_periph_dma *dma = spi->init_struct;
struct spi_transaction *trans = spi->trans[spi->trans_extract_idx];
@@ -22,6 +22,8 @@
/**
* @file arch/stm32/mcu_periph/spi_arch.h
* @ingroup stm32_arch
*
* Handling of SPI hardware for STM32.
*/
@@ -1,5 +1,4 @@
/*
*
* Copyright (C) 2009-2011 The Paparazzi Team
*
* This file is part of paparazzi.
@@ -22,7 +21,9 @@
/**
* @file arch/stm32/mcu_periph/sys_time_arch.c
* @brief STM32 timing functions.
* @ingroup stm32_arch
*
* STM32 timing functions.
*
*/
@@ -34,12 +35,12 @@
#include "led.h"
#endif
void sys_time_arch_init( void ) {
/* Generate SysTick interrupt every SYS_TIME_RESOLUTION_CPU_TICKS
/** Initialize SysTick.
* Generate SysTick interrupt every SYS_TIME_RESOLUTION_CPU_TICKS
* The timer interrupt is activated on the transition from 1 to 0,
* therefore it activates every n+1 clock ticks.
*/
void sys_time_arch_init( void ) {
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB);
systick_set_reload(SYS_TIME_RESOLUTION_CPU_TICKS-1);
@@ -23,7 +23,9 @@
/**
* @file arch/stm32/mcu_periph/sys_time_arch.h
* @brief STM32 timing functions.
* @ingroup stm32_arch
*
* STM32 timing functions.
*
*/
@@ -55,8 +57,9 @@ extern void sys_tick_handler(void);
#define SysTimeTimerStop(_t) { _t = ( GET_CUR_TIME_USEC() - (_t)); }
/** Busy wait, in microseconds */
// FIXME: directly use the SysTick->VAL here
/** Busy wait in microseconds.
* FIXME: directly use the SysTick->VAL here
*/
static inline void sys_time_usleep(uint32_t us) {
uint32_t end = GET_CUR_TIME_USEC() + us;
while ((uint32_t)GET_CUR_TIME_USEC() < end);
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/stm32/mcu_periph/uart_arch.c
* @ingroup stm32_arch
*
* Handling of UART hardware for STM32.
*/
#include "mcu_periph/uart.h"
#include <libopencm3/stm32/f1/nvic.h>
@@ -19,9 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/*
*\brief STM32 usart functions
/**
* @file arch/stm32/mcu_periph/uart_arch.h
* @ingroup stm32_arch
*
* Handling of UART hardware for STM32.
*/
#ifndef STM32_UART_ARCH_H
@@ -19,6 +19,14 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file arch/stm32/subsystems/radio_control/ppm_arch.c
* @ingroup stm32_arch
*
* STM32 ppm decoder.
*
*/
#include "subsystems/radio_control.h"
#include "subsystems/radio_control/ppm.h"
@@ -19,8 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/** \file booz_radio_control_ppm_hw.h
* \brief STM32 ppm decoder
/**
* @file arch/stm32/subsystems/radio_control/ppm_arch.h
* @ingroup stm32_arch
*
* STM32 ppm decoder.
*
*/
+4 -2
View File
@@ -20,8 +20,10 @@
*
*/
/** \file autopilot.c
* \brief Autopilot inititalization
/**
* @file firmwares/fixedwing/autopilot.c
*
* Autopilot inititalization.
*
*/
+4 -2
View File
@@ -20,8 +20,10 @@
*
*/
/** \file autopilot.h
* \brief Autopilot modes
/**
* @file firmwares/fixedwing/autopilot.h
*
* Autopilot modes.
*
*/
+5 -2
View File
@@ -19,10 +19,13 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file datalink.c
* \brief Handling of messages coming from ground and other A/Cs
/**
* @file firmwares/fixedwing/datalink.c
* Handling of messages coming from ground and other A/Cs.
*
*/
#define DATALINK_C
#define MODULES_DATALINK_C
+1 -1
View File
@@ -21,7 +21,7 @@
*/
/**
* @file main.c
* @file firmwares/fixedwing/main.c
* Main loop used both on single and dual MCU configuration.
*/
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot.c
*
* Autopilot.
*
*/
#include "firmwares/rotorcraft/autopilot.h"
#include "subsystems/radio_control.h"
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot.h
*
* Autopilot modes.
*
*/
#ifndef AUTOPILOT_H
#define AUTOPILOT_H
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot_arming_switch.h
*
* Arm the motors using a switch.
*
*/
#ifndef AUTOPILOT_ARMING_SWITCH_H
#define AUTOPILOT_ARMING_SWITCH_H
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot_arming_throttle.h
*
* Automatically arm the motors when applying throttle.
*
*/
#ifndef AUTOPILOT_ARMING_THROTTLE_H
#define AUTOPILOT_ARMING_THROTTLE_H
@@ -19,6 +19,13 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot_arming_yaw.h
*
* Arm the motors by with max yaw stick.
*
*/
#ifndef AUTOPILOT_ARMING_YAW_H
#define AUTOPILOT_ARMING_YAW_H
@@ -19,6 +19,12 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/autopilot_rc_helpers.h
*
* Some helper functions to check RC sticks.
*/
#ifndef AUTOPILOT_RC_HELPERS_H
#define AUTOPILOT_RC_HELPERS_H
@@ -19,6 +19,12 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/datalink.c
* Handling of messages coming from ground and other A/Cs.
*
*/
#define DATALINK_C
#define MODULES_DATALINK_C
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file firmware/rotorcraft/guidance/guidance_h.c
/** @file firmwares/rotorcraft/guidance/guidance_h.c
* Horizontal guidance for rotorcrafts.
*
*/
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file firmware/rotorcraft/guidance/guidance_h.h
/** @file firmwares/rotorcraft/guidance/guidance_h.h
* Horizontal guidance for rotorcrafts.
*
*/
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file firmware/rotorcraft/guidance/guidance_h_ref.h
/** @file firmwares/rotorcraft/guidance/guidance_h_ref.h
* Reference generation for horizontal guidance.
*
*/
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file guidance_v_adapt.h
/** @file firmwares/rotorcraft/guidance/guidance_v_adpt.h
* Adaptation bloc of the vertical guidance.
*
* This is a dimension one kalman filter estimating
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file firwmares/rotorcraft/guidance/guidance_v_ref.h
/** @file firmwares/rotorcraft/guidance/guidance_v_ref.h
* Reference generation for vertical guidance.
*
*/
+6
View File
@@ -20,6 +20,12 @@
*
*/
/**
* @file firmwares/rotorcraft/main.c
*
* Rotorcraft main loop.
*/
#define MODULES_C
#include <inttypes.h>
+6
View File
@@ -19,6 +19,12 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/main.h
*
* Rotorcraft main loop.
*/
#ifndef MAIN_H
#define MAIN_H
@@ -19,8 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/** \file stabilization_attitude_ref_float.c
* \brief Booz attitude reference generation (quaternion float version)
/**
* @file firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_float.c
*
* Rotorcraft attitude reference generation.
* (quaternion float version)
*
*/
@@ -18,6 +18,15 @@
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_float.h
*
* Rotorcraft attitude reference generation.
* (quaternion float version)
*
*/
#ifndef STABILIZATION_ATTITUDE_FLOAT_REF_QUAT_FLOAT_H
#define STABILIZATION_ATTITUDE_FLOAT_REF_QUAT_FLOAT_H
@@ -19,8 +19,11 @@
* Boston, MA 02111-1307, USA.
*/
/** @file stabilization_attitude_ref_int.c
* Rotorcraft attitude reference generation (quaternion int version)
/**
* @file firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_int.c
*
* Rotorcraft attitude reference generation.
* (quaternion int version)
*
*/
@@ -18,6 +18,15 @@
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/**
* @file firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_int.h
*
* Rotorcraft attitude reference generation.
* (quaternion int version)
*
*/
#ifndef STABILIZATION_ATTITUDE_INT_REF_QUAT_INT_H
#define STABILIZATION_ATTITUDE_INT_REF_QUAT_INT_H
@@ -20,7 +20,7 @@
*/
/**
* @file pprz_orientation_conversion.h
* @file math/pprz_orientation_conversion.h
*
* Generic orientation representation and conversion.
*
@@ -20,7 +20,7 @@
*/
/**
* @file pprz_orienation_conversion.h
* @file math/pprz_orienation_conversion.h
* Generic orientation representation and conversions.
*
* This file contains the functions to automatically convert between
+6 -3
View File
@@ -1,7 +1,5 @@
/*
* Paparazzi microcontroller initialisation function
*
* Copyright (C) 2010 The Paparazzi team
* Copyright (C) 2010-2012 The Paparazzi team
*
* This file is part of Paparazzi.
*
@@ -22,6 +20,11 @@
*
*/
/**
* @file mcu.c
* @brief Arch independent mcu ( Micro Controller Unit ) utilities.
*/
#include "mcu.h"
#ifdef PERIPHERALS_AUTO_INIT
+12 -7
View File
@@ -1,7 +1,5 @@
/*
* Paparazzi microcontroller functions
*
* Copyright (C) 2010 The Paparazzi team
* Copyright (C) 2010-2012 The Paparazzi team
*
* This file is part of Paparazzi.
*
@@ -22,8 +20,9 @@
*
*/
/** \file mcu.h
* \brief arch independent mcu ( Micro Controller Unit ) utilities
/**
* @file mcu.h
* @brief Arch independent mcu ( Micro Controller Unit ) utilities.
*/
#ifndef MCU_H
@@ -32,13 +31,19 @@
#include <mcu_arch.h>
/*
* Microcontroller initialisation
/**
* @defgroup mcu_periph MCU Peripherals
* @{
*/
/**
* Microcontroller peripherals initialization.
* This function is responisble for setting up the microcontroller
* after Reset.
*/
extern void mcu_init(void);
/** @}*/
#endif /* MCU_H */
+27
View File
@@ -1,3 +1,30 @@
/*
* Copyright (C) 2010-2012 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 mcu_periph/i2c.c
* Architecture independent I2C (Inter-Integrated Circuit Bus) API.
*/
#include "mcu_periph/i2c.h"
#ifdef USE_I2C0
+38
View File
@@ -1,3 +1,32 @@
/*
* Copyright (C) 2010-2012 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 mcu_periph/i2c.h
* Architecture independent I2C (Inter-Integrated Circuit Bus) API.
*
* Also see the @ref i2c "I2C interface" page.
*/
#ifndef MCU_PERIPH_I2C_H
#define MCU_PERIPH_I2C_H
@@ -5,6 +34,13 @@
#include "mcu_periph/i2c_arch.h"
/**
* @addtogroup mcu_periph
* @{
* @defgroup i2c I2C Interface
* @{
*/
enum I2CTransactionType {
I2CTransTx,
I2CTransRx,
@@ -161,5 +197,7 @@ extern void i2c_event(void);
i2c_submit(&(_p),&(_t)); \
}
/** @}*/
/** @}*/
#endif /* I2C_H */
+1
View File
@@ -22,6 +22,7 @@
/**
* @file mcu_periph/spi.c
*
* Architecture independent SPI (Serial Peripheral Interface) API.
*/
+14 -2
View File
@@ -22,10 +22,12 @@
/**
* @file mcu_periph/spi.h
*
* Architecture independent SPI (Serial Peripheral Interface) API.
*
* Also see the @ref spi "SPI interface" page.
*/
#ifndef SPI_H
#define SPI_H
@@ -33,6 +35,13 @@
#include "mcu_periph/spi_arch.h"
/**
* @addtogroup mcu_periph
* @{
* @defgroup spi SPI Interface
* @{
*/
// FIXME how to use this properly ?
enum SPIMode {
SPIMaster,
@@ -255,7 +264,7 @@ extern bool_t spi_lock(struct spi_periph* p, uint8_t slave);
* Only the slave that locks the fifo can unlock it.
* @param p spi peripheral to be used
* @param slave slave id
* @resume true if correctly unlocked
* @return true if correctly unlocked
*/
extern bool_t spi_resume(struct spi_periph* p, uint8_t slave);
@@ -322,4 +331,7 @@ extern bool_t spi_slave_wait(struct spi_periph* p);
#endif /* SPI_SLAVE */
/** @}*/
/** @}*/
#endif /* SPI_H */
@@ -20,10 +20,11 @@
*
*/
/** \file photogrammetry_calculator.h
/** @file modules/cartography/photogrammetry_calculator.h
Add to airframe file:
@verbatim
<section name="Photogrammetry" prefix="PHOTOGRAMMETRY_">
<!-- Camera Parameters -->
<define name="FOCAL_LENGTH" value="35" unit="mm"/>
@@ -40,17 +41,18 @@ Add to airframe file:
<modules>
<load name="photogrammetry_calculator.xml" />
</modules>
@endverbatim
Add to flightplan or airframe file:
<!-- Photogrammetry Parameters: define these in the flightplan
@verbatim
<!-- Photogrammetry Parameters: define these in the flightplan-->
<define name="OVERLAP" value="0.5" unit="PROCENT"/>
<define name="SIDELAP" value="0.5" unit="PROCENT"/>
<define name="RESOLUTION" value="50" unit="mm pixel projection"/>
-->
@endverbatim
Add to flightplan
@verbatim
<header>
#define PHOTOGRAMMETRY_SWEEP_ANGLE 53 // Degrees from the North
#define PHOTOGRAMMETRY_OVERLAP 50 // 1-99 Procent
@@ -66,7 +68,7 @@ Add to flightplan
<call fun="PhotogrammetryCalculatorPolygonSurveyADV(WP_1, 4)"/>
<call fun="poly_survey_adv()"/>
</block>
@endverbatim
*/
@@ -21,8 +21,8 @@
*/
/** \file led_cam_ctrl.h
* \brief Digital Camera Control
/** @file modules/digital_cam/led_cam_ctrl.h
* @brief Digital Camera Control
*
* Provides the control of the shutter and the zoom of a digital camera
* through standard binary IOs of the board.
@@ -30,13 +30,17 @@
* Configuration:
* Since the API of led.h is used, connected pins must be defined as led
* numbers (usually in the airframe file):
* @verbatim
* <define name="DC_SHUTTER_LED" value="10"/>
* <define name="DC_ZOOM_IN_LED" value="7"/>
* <define name="DC_ZOOM_OUT_LED" value="8"/>
* <define name="DC_POWER_LED" value="9"/>
* @endverbatim
* Related bank and pin must also be defined:
* @verbatim
* <define name="LED_10_BANK" value="0"/>
* <define name="LED_10_PIN" value="2"/>
* @endverbatim
* The required initialization (dc_init()) and periodic (4Hz) process
*
*/
@@ -21,8 +21,8 @@
*/
/** \file servo_cam_ctrl.h
* \brief Digital Camera Control
/** @file modules/digital_cam/servo_cam_ctrl.h
* @brief Digital Camera Control
*
* Provides the control of the shutter and the zoom of a digital camera
* through standard binary IOs of the board.
@@ -30,13 +30,17 @@
* Configuration:
* Since the API of led.h is used, connected pins must be defined as led
* numbers (usually in the airframe file):
* @verbatim
* <define name="DC_SHUTTER_SERVO" value="10"/>
* <define name="DC_ZOOM_IN_SERVO" value="7"/>
* <define name="DC_ZOOM_OUT_SERVO" value="8"/>
* <define name="DC_POWER_SERVO" value="9"/>
* @endverbatim
* Related bank and pin must also be defined:
* @verbatim
* <define name="LED_10_BANK" value="0"/>
* <define name="LED_10_PIN" value="2"/>
* @endverbatim
* The required initialization (dc_init()) and periodic (4Hz) process
*
*/
@@ -20,7 +20,7 @@
*/
/**
* @file baro_board_module.h
* @file modules/sensors/baro_board_module.h
*
* Wrapper for the board specific barometer.
*/
@@ -35,7 +35,9 @@
* in your airframe file when configuring baro_board module
* ex:
* for module baro_ets
* @verbatim
* <define name="BARO_ABS_EVENT" value="BaroEtsUpdate"/>
* @endverbatim
*/
#ifndef BARO_ABS_EVENT
#define BARO_ABS_EVENT NoBaro
+32 -7
View File
@@ -1,3 +1,29 @@
/*
* Copyright (C) 2008-2012 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 subsystems/navigation/OSAMNav.c
*
*/
#include "subsystems/navigation/OSAMNav.h"
#include "subsystems/nav.h"
@@ -142,13 +168,14 @@ launch the plane. After initialized, the plane will follow a line drawn by the p
position of the bungee (given in the arguments). Once the plane crosses the throttle line, which is perpendicular to the line the plane is following,
and intersects the position of the bungee (plus or minus a fixed distance (TakeOff_Distance in airframe file) from the bungee just in case the bungee doesn't release directly above the bungee) the prop will come on. The plane will then continue to follow the line until it has reached a specific
height (defined in as Takeoff_Height in airframe file) above the bungee waypoint and speed (defined as Takeoff_Speed in the airframe file).
@verbatim
<section name="Takeoff" prefix="Takeoff_">
<define name="Height" value="30" unit="m"/>
<define name="Speed" value="15" unit="m/s"/>
<define name="Distance" value="10" unit="m"/>
<define name="MinSpeed" value="5" unit="m/s"/>
</section>
@endverbatim
*/
#ifndef Takeoff_Distance
@@ -853,16 +880,16 @@ bool_t VerticalRaster(uint8_t l1, uint8_t l2, float radius, float AltSweep) {
}
/************** SkidLanding **********************************************/
/*
/**
Landing Routine
@verbatim
<section name="Landing" prefix="Landing_">
<define name="AFHeight" value="50" unit="m"/>
<define name="FinalHeight" value="5" unit="m"/>
<define name="FinalStageTime" value="5" unit="s"/>
</section>
@endverbatim
*/
#ifndef Landing_AFHeight
@@ -1159,9 +1186,7 @@ void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, fl
p->y = -temp*sin(Zrot)+p->y*cos(Zrot);
}
/*
Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY)
*/
/// Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY)
void RotateAndTranslateToWorld(struct Point2D *p, float Zrot, float transX, float transY)
{
float temp = p->x;
@@ -1,3 +1,29 @@
/*
* Copyright (C) 2008-2012 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 subsystems/navigation/OSAMNav.h
*
*/
#ifndef OSAMNav_H
#define OSAMNav_H