diff options
Diffstat (limited to 'wirish/comm')
-rw-r--r-- | wirish/comm/HardwareSPI.cpp | 4 | ||||
-rw-r--r-- | wirish/comm/HardwareSerial.cpp | 4 |
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 |