Ability to choose memorymap for stm_common headers with define.

This commit is contained in:
Fergus Noble 2011-09-12 20:48:41 -07:00 committed by Stephen Caudle
parent 424b094ce8
commit 76700510e0
8 changed files with 42 additions and 7 deletions

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_CAN_H #ifndef LIBOPENCM3_CAN_H
#define LIBOPENCM3_CAN_H #define LIBOPENCM3_CAN_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */ /* --- Convenience macros -------------------------------------------------- */

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_CRC_H #ifndef LIBOPENCM3_CRC_H
#define LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- CRC registers ------------------------------------------------------- */ /* --- CRC registers ------------------------------------------------------- */

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_STM32_DBGMCU_H #ifndef LIBOPENCM3_STM32_DBGMCU_H
#define LIBOPENCM3_STM32_DBGMCU_H #define LIBOPENCM3_STM32_DBGMCU_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- DBGMCU registers ---------------------------------------------------- */ /* --- DBGMCU registers ---------------------------------------------------- */

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_EXTI_H #ifndef LIBOPENCM3_EXTI_H
#define LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- EXTI registers ------------------------------------------------------ */ /* --- EXTI registers ------------------------------------------------------ */

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_FSMC_H #ifndef LIBOPENCM3_FSMC_H
#define LIBOPENCM3_FSMC_H #define LIBOPENCM3_FSMC_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */ /* --- Convenience macros -------------------------------------------------- */

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_IWDG_H #ifndef LIBOPENCM3_IWDG_H
#define LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- IWDG registers ------------------------------------------------------ */ /* --- IWDG registers ------------------------------------------------------ */

View File

@ -0,0 +1,35 @@
/*
* This file is part of the libopencm3 project.
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_MEMORYMAP_COMMON_H
#define LIBOPENCM3_MEMORYMAP_COMMON_H
#include <libopencm3/cm3/memorymap.h>
#ifdef STM32F1
#include <libopencm3/stm32f1/memorymap.h>
#else
#ifdef STM32F1
#include <libopencm3/stm32f2/memorymap.h>
#else
#error "stm32 family not defined."
#endif
#endif
#endif

View File

@ -20,7 +20,7 @@
#ifndef LIBOPENCM3_WWDG_H #ifndef LIBOPENCM3_WWDG_H
#define LIBOPENCM3_WWDG_H #define LIBOPENCM3_WWDG_H
#include <libopencm3/stm32/memorymap.h> #include <libopencm3/stm32_common/memorymap.h>
#include <libopencm3/cm3/common.h> #include <libopencm3/cm3/common.h>
/* --- WWDG registers ------------------------------------------------------ */ /* --- WWDG registers ------------------------------------------------------ */