diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-26 18:13:12 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-26 18:13:12 -0400 |
commit | c6073e4886da4606679bc3e9d770c9cff9390597 (patch) | |
tree | 8f0dc29cc9e58b37af92a3c21f72e3d4ffc2439d /wirish | |
parent | fbbf35ee079d1c979909981c95132ba7eaca7215 (diff) | |
download | librambutan-c6073e4886da4606679bc3e9d770c9cff9390597.tar.gz librambutan-c6073e4886da4606679bc3e9d770c9cff9390597.zip |
STM32F1: Bring back HardwareSPI.
We're going to merge into master without F2 support for this.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/include/wirish/wirish.h | 6 | ||||
-rw-r--r-- | wirish/rules.mk | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/wirish/include/wirish/wirish.h b/wirish/include/wirish/wirish.h index 360b502..4ebd66f 100644 --- a/wirish/include/wirish/wirish.h +++ b/wirish/include/wirish/wirish.h @@ -34,6 +34,8 @@ #ifndef _WIRISH_WIRISH_H_ #define _WIRISH_WIRISH_H_ +#include <libmaple/stm32.h> + #include <wirish/boards.h> #include <wirish/io.h> #include <wirish/bit_constants.h> @@ -42,7 +44,9 @@ #include <wirish/wirish_debug.h> #include <wirish/wirish_math.h> #include <wirish/wirish_time.h> -/* FIXME put this back when you can #include <wirish/HardwareSPI.h> */ +#if STM32_MCU_SERIES == STM32_SERIES_F1 /* FIXME [0.0.13?] port to F2 */ +#include <wirish/HardwareSPI.h> +#endif #include <wirish/HardwareSerial.h> #include <wirish/HardwareTimer.h> #include <wirish/usb_serial.h> diff --git a/wirish/rules.mk b/wirish/rules.mk index f895213..1cac74a 100644 --- a/wirish/rules.mk +++ b/wirish/rules.mk @@ -31,6 +31,7 @@ cppSRCS_$(d) += Print.cpp cppSRCS_$(d) += pwm.cpp ifeq ($(MCU_SERIES), stm32f1) cppSRCS_$(d) += usb_serial.cpp # HACK: this is currently STM32F1 only. +cppSRCS_$(d) += HardwareSPI.cpp # FIXME: port to F2 and fix wirish.h endif cppSRCS_$(d) += wirish_analog.cpp cppSRCS_$(d) += wirish_digital.cpp @@ -41,8 +42,6 @@ cppSRCS_$(d) += $(MCU_SERIES)/boards_setup.cpp cppSRCS_$(d) += $(MCU_SERIES)/wirish_digital.cpp cppSRCS_$(d) += $(MCU_SERIES)/wirish_debug.cpp cppSRCS_$(d) += $(WIRISH_BOARD_PATH)/board.cpp -# TODO: revise these appropriately for F2 and put them back in: -# HardwareSPI.cpp sFILES_$(d) := $(sSRCS_$(d):%=$(d)/%) cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%) |