diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-08-16 04:18:37 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-08-16 06:13:48 -0400 |
commit | 8cc1a026fde32b1d4d2c96cf8a4a8883acbc801b (patch) | |
tree | 3b42f4bb68a792dd2cfbc6ac08f1c52ec8272b71 /wirish/comm/HardwareSerial.cpp | |
parent | 383378b497ace6dc6b363bed185b69578e00866c (diff) | |
download | librambutan-8cc1a026fde32b1d4d2c96cf8a4a8883acbc801b.tar.gz librambutan-8cc1a026fde32b1d4d2c96cf8a4a8883acbc801b.zip |
HardwareSerial.cpp: Respect PCLK1 and PCLK2.
Diffstat (limited to 'wirish/comm/HardwareSerial.cpp')
-rw-r--r-- | wirish/comm/HardwareSerial.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wirish/comm/HardwareSerial.cpp b/wirish/comm/HardwareSerial.cpp index fba68fd..7824a4d 100644 --- a/wirish/comm/HardwareSerial.cpp +++ b/wirish/comm/HardwareSerial.cpp @@ -29,6 +29,7 @@ * @brief Wirish serial port implementation. */ +#include "libmaple.h" #include "gpio.h" #include "timer.h" @@ -48,13 +49,12 @@ #define RX5 BOARD_UART5_RX_PIN #endif -// TODO Put these magic numbers into boards.h #defines -HardwareSerial Serial1(USART1, TX1, RX1, 72000000UL); -HardwareSerial Serial2(USART2, TX2, RX2, 36000000UL); -HardwareSerial Serial3(USART3, TX3, RX3, 36000000UL); +HardwareSerial Serial1(USART1, TX1, RX1, PCLK2); +HardwareSerial Serial2(USART2, TX2, RX2, PCLK1); +HardwareSerial Serial3(USART3, TX3, RX3, PCLK1); #if defined(STM32_HIGH_DENSITY) && !defined(BOARD_maple_RET6) -HardwareSerial Serial4(UART4, TX4, RX4, 36000000UL); -HardwareSerial Serial5(UART5, TX5, RX5, 36000000UL); +HardwareSerial Serial4(UART4, TX4, RX4, PCLK1); +HardwareSerial Serial5(UART5, TX5, RX5, PCLK1); #endif HardwareSerial::HardwareSerial(usart_dev *usart_device, |