aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-09-05 18:34:44 -0400
committerbnewbold <bnewbold@robocracy.org>2010-09-05 22:58:36 -0400
commitb6e3624a705b36b15e7f4c0637d133c7dab059bd (patch)
tree700df3f574cb1ea64faf719de4bd6607a1addc6e /wirish/comm
parent16b4c1fce5b1023cfb8210f9c12f09c71d4a755d (diff)
downloadlibrambutan-b6e3624a705b36b15e7f4c0637d133c7dab059bd.tar.gz
librambutan-b6e3624a705b36b15e7f4c0637d133c7dab059bd.zip
timer refactor (c, not c++)
also removed an old ASSERT()
Diffstat (limited to 'wirish/comm')
-rw-r--r--wirish/comm/HardwareSPI.cpp4
-rw-r--r--wirish/comm/HardwareSerial.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/wirish/comm/HardwareSPI.cpp b/wirish/comm/HardwareSPI.cpp
index eadcdd7..5f42db7 100644
--- a/wirish/comm/HardwareSPI.cpp
+++ b/wirish/comm/HardwareSPI.cpp
@@ -95,8 +95,8 @@ void HardwareSPI::begin(SPIFrequency freq, uint32 endianness, uint32 mode) {
}
/* Turn off PWM on shared pins */
- timer_set_mode(3, 2, TIMER_DISABLED);
- timer_set_mode(3, 1, TIMER_DISABLED);
+ timer_set_mode(TIMER3, 2, TIMER_DISABLED);
+ timer_set_mode(TIMER3, 1, TIMER_DISABLED);
}
endianness = (endianness == LSBFIRST) ? SPI_LSBFIRST : SPI_MSBFIRST;
diff --git a/wirish/comm/HardwareSerial.cpp b/wirish/comm/HardwareSerial.cpp
index 6399ad5..902b160 100644
--- a/wirish/comm/HardwareSerial.cpp
+++ b/wirish/comm/HardwareSerial.cpp
@@ -34,8 +34,8 @@
#include "gpio.h"
#include "timers.h"
-HardwareSerial Serial1(USART1, 4500000UL, GPIOA_BASE, 9, 10, 1, 2);
-HardwareSerial Serial2(USART2, 2250000UL, GPIOA_BASE, 2, 3, 2, 3);
+HardwareSerial Serial1(USART1, 4500000UL, GPIOA_BASE, 9, 10, TIMER1, 2);
+HardwareSerial Serial2(USART2, 2250000UL, GPIOA_BASE, 2, 3, TIMER2, 3);
HardwareSerial Serial3(USART3, 2250000UL, GPIOB_BASE, 10, 11, 0, 0);
// TODO: High density device ports