[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"
@@ -147,4 +149,4 @@ void pwm_input_isr2(void)
#endif //ACTIVE_LOW
}
}
#endif //USE_PWM_INPUT2
#endif //USE_PWM_INPUT2
@@ -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
@@ -48,4 +50,4 @@ extern void pwm_input_isr2(void);
#define PWM_INPUT_ISR_2() pwm_input_isr2()
#endif //USE_PWM_INPUT2
#endif /* PWM_INPUT_ARCH_H */
#endif /* 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>
+7 -3
View File
@@ -19,9 +19,13 @@
* Boston, MA 02111-1307, USA.
*
*/
/** \file interrupt_hw.h
* \brief STM32 Low level interrupt handling
* Empty for now, just to match what we have on LPC
/**
* @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
*/
#ifndef INTERRUPT_HW_H
+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
/** 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 ) {
/* 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.
*/
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.
*
*/

Some files were not shown because too many files have changed in this diff Show More