aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple/util.c')
-rw-r--r--libmaple/util.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libmaple/util.c b/libmaple/util.c
index 36173ee..08e29fc 100644
--- a/libmaple/util.c
+++ b/libmaple/util.c
@@ -36,13 +36,6 @@
#include "adc.h"
#include "timers.h"
-#define ERROR_LED_PORT GPIOA_BASE
-#define ERROR_LED_PIN 5
-#define ERROR_USART_NUM 2
-#define ERROR_USART_BAUD 9600
-#define ERROR_TX_PIN 2
-#define ERROR_TX_PORT GPIOA_BASE
-
/* Error assert + fade */
void _fail(const char* file, int line, const char* exp) {
int32 slope = 1;
@@ -60,9 +53,7 @@ void _fail(const char* file, int line, const char* exp) {
adc_disable();
/* Turn off all usarts */
- usart_disable(1);
- usart_disable(2);
- usart_disable(3);
+ usart_disable_all();
/* Initialize the error usart */
gpio_set_mode(ERROR_TX_PORT, ERROR_TX_PIN, GPIO_MODE_AF_OUTPUT_PP);