aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) || \