aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-02 19:39:47 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-02 19:39:47 -0400
commit33b972e7e214e291bd62f83a0621fb87c267a9de (patch)
treeffc3548330837b38c7d38ad0883ef812a72a3bfb
parent66876d1883055bccae9ae5e73fb3c5d29cb2b453 (diff)
downloadlibrambutan-33b972e7e214e291bd62f83a0621fb87c267a9de.tar.gz
librambutan-33b972e7e214e291bd62f83a0621fb87c267a9de.zip
Oops; don't break the build on F1.
That was dumb. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--libmaple/stm32f1/include/series/stm32.h1
-rw-r--r--wirish/HardwareSerial.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/libmaple/stm32f1/include/series/stm32.h b/libmaple/stm32f1/include/series/stm32.h
index 59205c3..23c0591 100644
--- a/libmaple/stm32f1/include/series/stm32.h
+++ b/libmaple/stm32f1/include/series/stm32.h
@@ -119,7 +119,6 @@ extern "C" {
# define STM32_NR_INTERRUPTS 60
# define STM32_TIMER_MASK 0x1FE /* TIMER1--TIMER8 */
# define STM32_HAVE_FSMC 1
-# endif
# elif defined(STM32_XL_DENSITY)
# define STM32_NR_INTERRUPTS 60
# define STM32_TIMER_MASK 0x7FFE /* TIMER1--TIMER14 */
diff --git a/wirish/HardwareSerial.cpp b/wirish/HardwareSerial.cpp
index 3f418e2..75f5bbb 100644
--- a/wirish/HardwareSerial.cpp
+++ b/wirish/HardwareSerial.cpp
@@ -77,8 +77,8 @@ HardwareSerial::HardwareSerial(usart_dev *usart_device,
/* F1 MCUs have no GPIO_AFR[HL], so turn off PWM if there's a conflict
* on this GPIO bit. */
static void disable_timer_if_necessary(timer_dev *dev, uint8 ch) {
- if (txi->timer_device != NULL) {
- timer_set_mode(txi->timer_device, txi->timer_channel, TIMER_DISABLED);
+ if (dev != NULL) {
+ timer_set_mode(dev, ch, TIMER_DISABLED);
}
}
#elif (STM32_MCU_SERIES == STM32_SERIES_F2) || \