STM32: Moved SPI code into the common area.

Updated the documentation so that it appears in all families
Also added it to the L1 area, but is untested. An addition to the memorymap
allows commonality and a #ifdef added to the spi_common_all code to
exclude the case of SPI3 for L1 and F0 as SPI3 doesn't exist in those.
An rcc dispatch header was added to remove same code from the spi header.
This commit is contained in:
Ken Sarkies
2012-12-05 15:36:44 +10:30
parent 4d234c7e27
commit 7ec382c7d5
27 changed files with 790 additions and 498 deletions

View File

@@ -105,4 +105,9 @@
#define DESIG_FLASH_SIZE_BASE (INFO_BASE + 0x8004C)
#define DESIG_UNIQUE_ID_BASE (INFO_BASE + 0x80050)
/* Make the map names match those for other families to allow commonality */
#define SPI1_I2S_BASE SPI1_BASE
#define SPI2_I2S_BASE SPI2_BASE
#define SPI3_I2S_BASE SPI3_BASE
#endif

View File

@@ -0,0 +1,40 @@
/** @defgroup spi_defines SPI Defines
@brief <b>Defined Constants and Types for the STM32L1xx SPI</b>
@ingroup STM32L1xx_defines
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
@date 5 December 2012
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/>.
*/
#ifndef LIBOPENCM3_SPI_H
#define LIBOPENCM3_SPI_H
#include <libopencm3/stm32/l1/memorymap.h>
#include <libopencm3/stm32/common/spi_common_all.h>
#endif