aboutsummaryrefslogtreecommitdiffstats
path: root/src/wiring/comm
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-13 20:25:45 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-13 20:25:45 +0000
commitd468ccac449968009cbbd2eabd8cfa7d7f3a35e5 (patch)
treee3b8f20c4222c27f045f60c3871e7bbf5c74e927 /src/wiring/comm
parenta597f3f3ce79c38e0d41acb9591ed7ab2e22bb6a (diff)
downloadlibrambutan-d468ccac449968009cbbd2eabd8cfa7d7f3a35e5.tar.gz
librambutan-d468ccac449968009cbbd2eabd8cfa7d7f3a35e5.zip
added serial1 support
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@113 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src/wiring/comm')
-rw-r--r--src/wiring/comm/HardwareSerial.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wiring/comm/HardwareSerial.cpp b/src/wiring/comm/HardwareSerial.cpp
index 3d0a0ce..04d8d18 100644
--- a/src/wiring/comm/HardwareSerial.cpp
+++ b/src/wiring/comm/HardwareSerial.cpp
@@ -72,6 +72,8 @@ void HardwareSerial::begin(uint32_t baud) {
case 1:
gpio_set_mode(USART1_TX_PORT, USART1_TX_PIN, GPIO_MODE_AF_OUTPUT_PP);
gpio_set_mode(USART1_RX_PORT, USART1_RX_PIN, GPIO_MODE_INPUT_FLOATING);
+ /* Turn off any pwm */
+ timers_disable_channel(1, 2);
break;
case 2:
gpio_set_mode(USART2_TX_PORT, USART2_TX_PIN, GPIO_MODE_AF_OUTPUT_PP);