From ea5538b23ac066187635b1e34e620b445562d21e Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 1 Sep 2011 09:38:39 -0400 Subject: wirish/boards: Move includes into .cpp files. The headers just #define some numbers, so there's no need for them to be including libmaple headers. --- wirish/boards/maple.cpp | 7 ++++--- wirish/boards/maple.h | 6 +----- wirish/boards/maple_RET6.cpp | 8 ++++++-- wirish/boards/maple_RET6.h | 5 ----- wirish/boards/maple_mini.cpp | 9 ++++++--- wirish/boards/maple_mini.h | 5 ----- wirish/boards/maple_native.cpp | 6 +++--- 7 files changed, 20 insertions(+), 26 deletions(-) (limited to 'wirish') diff --git a/wirish/boards/maple.cpp b/wirish/boards/maple.cpp index c82a113..43d4386 100644 --- a/wirish/boards/maple.cpp +++ b/wirish/boards/maple.cpp @@ -30,12 +30,13 @@ * @brief Maple PIN_MAP and boardInit(). */ -#include "gpio.h" -#include "timer.h" +#ifdef BOARD_maple #include "maple.h" -#ifdef BOARD_maple +#include "gpio.h" +#include "timer.h" +#include "wirish_types.h" void boardInit(void) { } diff --git a/wirish/boards/maple.h b/wirish/boards/maple.h index bfa9bc2..e26de99 100644 --- a/wirish/boards/maple.h +++ b/wirish/boards/maple.h @@ -30,8 +30,6 @@ * @brief Private include file for Maple in boards.h */ -#include "wirish_types.h" - #ifndef _BOARD_MAPLE_H_ #define _BOARD_MAPLE_H_ @@ -79,9 +77,7 @@ * these are just BOARD_LED_PIN and BOARD_BUTTON_PIN. */ #define BOARD_NR_USED_PINS 7 -/* - * Debug port pins - */ +/* Debug port pins */ #define BOARD_JTMS_SWDIO_PIN 39 #define BOARD_JTCK_SWCLK_PIN 40 #define BOARD_JTDI_PIN 41 diff --git a/wirish/boards/maple_RET6.cpp b/wirish/boards/maple_RET6.cpp index 25cdb10..cbd7e25 100644 --- a/wirish/boards/maple_RET6.cpp +++ b/wirish/boards/maple_RET6.cpp @@ -27,12 +27,16 @@ /** * @file maple_RET6.cpp * @author Marti Bolivar - * @brief Maple RET6 Edition PIN_MAP and boardInit() + * @brief Maple RET6 Edition board file */ +#ifdef BOARD_maple_RET6 + #include "maple_RET6.h" -#ifdef BOARD_maple_RET6 +#include "gpio.h" +#include "timer.h" +#include "wirish_types.h" void boardInit(void) { } diff --git a/wirish/boards/maple_RET6.h b/wirish/boards/maple_RET6.h index 755f400..352d565 100644 --- a/wirish/boards/maple_RET6.h +++ b/wirish/boards/maple_RET6.h @@ -32,11 +32,6 @@ * See maple.h for more information on these definitions. */ -#include "gpio.h" -#include "timer.h" - -#include "wirish_types.h" - #ifndef _BOARDS_MAPLE_RET6_H_ #define _BOARDS_MAPLE_RET6_H_ diff --git a/wirish/boards/maple_mini.cpp b/wirish/boards/maple_mini.cpp index 6a3a86b..f111a14 100644 --- a/wirish/boards/maple_mini.cpp +++ b/wirish/boards/maple_mini.cpp @@ -27,14 +27,17 @@ /** * @file maple_mini.cpp * @author Marti Bolivar - * @brief Maple Mini PIN_MAP and boardInit(). + * @brief Maple Mini board file. */ +#ifdef BOARD_maple_mini + #include "maple_mini.h" + #include "gpio.h" +#include "timer.h" #include "wirish_debug.h" - -#ifdef BOARD_maple_mini +#include "wirish_types.h" /* Since we want the Serial Wire/JTAG pins as GPIOs, disable both SW * and JTAG debug support */ diff --git a/wirish/boards/maple_mini.h b/wirish/boards/maple_mini.h index 51d63cd..7bf7016 100644 --- a/wirish/boards/maple_mini.h +++ b/wirish/boards/maple_mini.h @@ -32,11 +32,6 @@ * See maple.h for more information on these definitions. */ -#include "gpio.h" -#include "timer.h" - -#include "wirish_types.h" - #ifndef _BOARD_MAPLE_MINI_H_ #define _BOARD_MAPLE_MINI_H_ diff --git a/wirish/boards/maple_native.cpp b/wirish/boards/maple_native.cpp index b263622..2617005 100644 --- a/wirish/boards/maple_native.cpp +++ b/wirish/boards/maple_native.cpp @@ -27,9 +27,11 @@ /** * @file maple_native.cpp * @author Marti Bolivar - * @brief Maple Native PIN_MAP and boardInit(). + * @brief Maple Native board file. */ +#ifdef BOARD_maple_native + #include "maple_native.h" #include "fsmc.h" @@ -39,8 +41,6 @@ #include "wirish_types.h" -#ifdef BOARD_maple_native - static void initSRAMChip(void); void boardInit(void) { -- cgit v1.2.3