aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
Diffstat (limited to 'wirish')
-rw-r--r--wirish/comm/HardwareSPI.cpp4
-rw-r--r--wirish/comm/HardwareSerial.cpp4
-rw-r--r--wirish/wirish.c6
-rw-r--r--wirish/wirish.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/wirish/comm/HardwareSPI.cpp b/wirish/comm/HardwareSPI.cpp
index 3dfe10a..eadcdd7 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 */
- timers_disable_channel(3, 2);
- timers_disable_channel(3, 1);
+ timer_set_mode(3, 2, TIMER_DISABLED);
+ timer_set_mode(3, 1, TIMER_DISABLED);
}
endianness = (endianness == LSBFIRST) ? SPI_LSBFIRST : SPI_MSBFIRST;
diff --git a/wirish/comm/HardwareSerial.cpp b/wirish/comm/HardwareSerial.cpp
index fc0d01e..7157e74 100644
--- a/wirish/comm/HardwareSerial.cpp
+++ b/wirish/comm/HardwareSerial.cpp
@@ -78,13 +78,13 @@ void HardwareSerial::begin(uint32 baud) {
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);
+ timer_set_mode(1, 2, TIMER_DISABLED);
break;
case 2:
gpio_set_mode(USART2_TX_PORT, USART2_TX_PIN, GPIO_MODE_AF_OUTPUT_PP);
gpio_set_mode(USART2_RX_PORT, USART2_RX_PIN, GPIO_MODE_INPUT_FLOATING);
/* Turn off any pwm */
- timers_disable_channel(2, 3);
+ timer_set_mode(2, 3, TIMER_DISABLED);
break;
case 3:
gpio_set_mode(USART3_TX_PORT, USART3_TX_PIN, GPIO_MODE_AF_OUTPUT_PP);
diff --git a/wirish/wirish.c b/wirish/wirish.c
index e21f792..520079c 100644
--- a/wirish/wirish.c
+++ b/wirish/wirish.c
@@ -31,17 +31,17 @@
#include "systick.h"
#include "gpio.h"
#include "nvic.h"
-#include "usb.h"
+//#include "usb.h"
void init(void) {
rcc_init();
nvic_init();
- systick_init();
+// systick_init();
gpio_init();
adc_init();
timer_init(1, 1);
timer_init(2, 1);
timer_init(3, 1);
timer_init(4, 1);
- setupUSB();
+ //setupUSB();
}
diff --git a/wirish/wirish.h b/wirish/wirish.h
index 2541e5e..34464a2 100644
--- a/wirish/wirish.h
+++ b/wirish/wirish.h
@@ -43,7 +43,7 @@
#ifdef __cplusplus
#include "HardwareSPI.h"
#include "HardwareSerial.h"
-#include "usb_serial.h"
+//#include "usb_serial.h"
#endif
#ifdef __cplusplus