aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/HardwareSerial.cpp
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 /wirish/HardwareSerial.cpp
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>
Diffstat (limited to 'wirish/HardwareSerial.cpp')
-rw-r--r--wirish/HardwareSerial.cpp4
1 files changed, 2 insertions, 2 deletions
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) || \