Changes to the header includes for all STM32 peripherals

to remove variations, redundancies, add missing, fix errors. All c files
refer only to the dispatch style headers in /include/stm32. Those headers
#include memorymap.h and cm3/common.h. All references to
these are removed from the family specific headers. Ethernet untouched as
it appears incomplete.

Added dummy spi.c for F0/F3. Fix some doxygen anomalies.
This commit is contained in:
Ken Sarkies
2014-02-21 09:04:19 +10:30
committed by Karl Palsson
parent 0f29fc8b1b
commit 7816501dbc
216 changed files with 191 additions and 322 deletions

View File

@@ -23,7 +23,6 @@
/**@{*/
#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/gpio.h>
#if !defined(AFIO_BASE)

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/common/crc_common_all.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_l1f013.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -29,4 +29,3 @@
*/
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/common/rtc_common_l1f024.h>

31
lib/stm32/f0/spi.c Normal file
View File

@@ -0,0 +1,31 @@
/** @defgroup spi_file SPI
@ingroup STM32F0xx
@brief <b>libopencm3 STM32F0xx SPI</b>
@version 1.0.0
@date 20 February 2014
LGPL License Terms @ref lgpl_license
*/
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/spi.h>

View File

@@ -1,4 +1,4 @@
/** @defgroup STM32F1xx_adc_file ADC
/** @defgroup adc_file ADC
@ingroup STM32F1xx
@@ -110,7 +110,7 @@ LGPL License Terms @ref lgpl_license
/**@{*/
#include <libopencm3/stm32/f1/adc.h>
#include <libopencm3/stm32/adc.h>
/*---------------------------------------------------------------------------*/
/** @brief ADC Power On

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/common/crc_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_l1f013.h>

View File

@@ -60,7 +60,6 @@
/**@{*/
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/memorymap.h>
/* Memory Size Register */
#define MEMORY_SIZE_REG MMIO32(DESIG_FLASH_SIZE_BASE)

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/i2c.h>
#include <libopencm3/stm32/common/i2c_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -50,8 +50,8 @@ LGPL License Terms @ref lgpl_license
/**@{*/
#include <libopencm3/cm3/assert.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
/** Default ppre1 peripheral clock frequency after reset. */
uint32_t rcc_ppre1_frequency = 8000000;

View File

@@ -29,4 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/spi.h>
#include <libopencm3/stm32/common/spi_common_all.h>

View File

@@ -36,7 +36,6 @@ in which case this file must be added to the compile list. */
*/
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/common/timer_common_all.h>
/*---------------------------------------------------------------------------*/
/** @brief Set Input Polarity

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/common/usart_common_all.h>

View File

@@ -29,6 +29,5 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/common/crc_common_all.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/crypto.h>
#include <libopencm3/stm32/common/crypto_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_f24.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/hash.h>
#include <libopencm3/stm32/common/hash_common_f24.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -38,8 +38,8 @@
*/
#include <libopencm3/cm3/assert.h>
#include <libopencm3/stm32/f2/rcc.h>
#include <libopencm3/stm32/f2/flash.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
/**@{*/

View File

@@ -29,4 +29,3 @@
*/
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/common/rtc_common_l1f024.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/spi.h>
#include <libopencm3/stm32/common/spi_common_f24.h>

View File

@@ -36,5 +36,3 @@ in which case this file must be added to the compile list. */
*/
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/common/timer_common_f24.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/common/usart_common_all.h>

View File

@@ -84,7 +84,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f3/adc.h>
#include <libopencm3/stm32/adc.h>
/**@{*/

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_l1f013.h>

View File

@@ -31,7 +31,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f3/gpio.h>
#include <libopencm3/stm32/gpio.h>
void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down,
uint16_t gpios)

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -35,9 +35,9 @@
/**@{*/
#include <libopencm3/cm3/assert.h>
#include <libopencm3/stm32/f3/rcc.h>
#include <libopencm3/stm32/f3/flash.h>
#include <libopencm3/stm32/f3/i2c.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/i2c.h>
/* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */
uint32_t rcc_ppre1_frequency = 8000000;

31
lib/stm32/f3/spi.c Normal file
View File

@@ -0,0 +1,31 @@
/** @defgroup spi_file SPI
@ingroup STM32F3xx
@brief <b>libopencm3 STM32F3xx SPI</b>
@version 1.0.0
@date 20 February 2014
LGPL License Terms @ref lgpl_license
*/
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/spi.h>

View File

@@ -29,7 +29,6 @@
*/
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/common/usart_common_all.h>
/*---------------------------------------------------------------------------*/
/** @brief USART Send a Data Word.

View File

@@ -1,4 +1,4 @@
/** @defgroup STM32F4xx_adc_file ADC
/** @defgroup adc_file ADC
@ingroup STM32F4xx
@@ -82,7 +82,7 @@ LGPL License Terms @ref lgpl_license
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/f4/adc.h>
#include <libopencm3/stm32/adc.h>
/**@{*/

View File

@@ -29,6 +29,5 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/common/crc_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_f24.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/hash.h>
#include <libopencm3/stm32/common/hash_common_f24.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/i2c.h>
#include <libopencm3/stm32/common/spi_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -38,9 +38,9 @@
*/
#include <libopencm3/cm3/assert.h>
#include <libopencm3/stm32/f4/rcc.h>
#include <libopencm3/stm32/f4/pwr.h>
#include <libopencm3/stm32/f4/flash.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/pwr.h>
#include <libopencm3/stm32/flash.h>
/**@{*/

View File

@@ -29,9 +29,8 @@
*/
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/f4/nvic.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/common/rtc_common_l1f024.h>
/*---------------------------------------------------------------------------*/

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/spi.h>
#include <libopencm3/stm32/common/spi_common_f24.h>

View File

@@ -36,5 +36,3 @@ in which case this file must be added to the compile list. */
*/
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/common/timer_common_f24.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/common/usart_common_all.h>

View File

@@ -1,4 +1,4 @@
/** @defgroup STM32L1xx_adc_file ADC
/** @defgroup adc_file ADC
@ingroup STM32L1xx
@@ -28,7 +28,7 @@ LGPL License Terms @ref lgpl_license
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/l1/adc.h>
#include <libopencm3/stm32/adc.h>
/**@{*/

View File

@@ -29,6 +29,5 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/crc.h>
#include <libopencm3/stm32/common/crc_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/common/dac_common_all.h>

View File

@@ -29,5 +29,3 @@
*/
#include <libopencm3/stm32/dma.h>
#include <libopencm3/stm32/common/dma_common_l1f013.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/i2c.h>
#include <libopencm3/stm32/common/spi_common_all.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/iwdg.h>
#include <libopencm3/stm32/common/iwdg_common_all.h>

View File

@@ -21,8 +21,8 @@
* Based on the F4 code...
*/
#include <libopencm3/stm32/l1/rcc.h>
#include <libopencm3/stm32/l1/flash.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/pwr.h>
/* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */

View File

@@ -29,4 +29,3 @@
*/
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/stm32/common/rtc_common_l1f024.h>

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/spi.h>
#include <libopencm3/stm32/common/spi_common_all.h>

View File

@@ -33,7 +33,6 @@
/**@{*/
#include <libopencm3/stm32/timer.h>
#include <libopencm3/stm32/common/timer_common_all.h>
/*---------------------------------------------------------------------------*/
/** @brief Set Timer Option

View File

@@ -29,5 +29,3 @@ LGPL License Terms @ref lgpl_license
*/
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/common/usart_common_all.h>