Cleaned up header inclusion selection macros.

This commit is contained in:
Piotr Esden-Tempski
2011-11-16 18:05:45 -08:00
parent bf4f8480a6
commit 679f39426f
2 changed files with 15 additions and 23 deletions

View File

@@ -20,18 +20,14 @@
#ifndef LIBOPENCM3_MEMORYMAP_COMMON_H
#define LIBOPENCM3_MEMORYMAP_COMMON_H
#ifdef STM32F1
#include <libopencm3/stm32/f1/memorymap.h>
#if defined(STM32F1)
# include <libopencm3/stm32/f1/memorymap.h>
#elif defined(STM32F2)
# include <libopencm3/stm32/f2/memorymap.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/memorymap.h>
#else
#ifdef STM32F2
#include <libopencm3/stm32/f2/memorymap.h>
#else
#ifdef STM32F4
#include <libopencm3/stm32/f4/memorymap.h>
#else
#error "stm32 family not defined."
#endif
#endif
# error "stm32 family not defined."
#endif
#endif
#endif /* LIBOPENCM3_MEMORYMAP_COMMON_H */

View File

@@ -82,18 +82,14 @@
* specific header file in the corresponding subfolder.
*/
#ifdef STM32F1
#include <libopencm3/stm32/f1/nvic_f1.h>
#if defined(STM32F1)
# include <libopencm3/stm32/f1/nvic_f1.h>
#elif defined(STM32F2)
# include <libopencm3/stm32/f2/nvic_f2.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/nvic_f4.h>
#else
#ifdef STM32F2
#include <libopencm3/stm32/f2/nvic_f2.h>
#else
#ifdef STM32F4
#include <libopencm3/stm32/f4/nvic_f4.h>
#else
#error "stm32 family not defined."
#endif
#endif
# error "stm32 family not defined."
#endif