aboutsummaryrefslogtreecommitdiff
path: root/src/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'src/platforms')
-rw-r--r--src/platforms/native/traceswo.h29
-rw-r--r--src/platforms/stm32/cdcacm.c2
-rw-r--r--src/platforms/stm32/traceswo.c (renamed from src/platforms/native/traceswo.c)10
3 files changed, 5 insertions, 36 deletions
diff --git a/src/platforms/native/traceswo.h b/src/platforms/native/traceswo.h
deleted file mode 100644
index 9b2cf2c..0000000
--- a/src/platforms/native/traceswo.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the Black Magic Debug project.
- *
- * Copyright (C) 2012 Black Sphere Technologies Ltd.
- * Written by Gareth McMullin <gareth@blacksphere.co.nz>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __TRACESWO_H
-#define __TRACESWO_H
-
-#include <libopencm3/usb/usbd.h>
-
-void traceswo_init(void);
-void trace_buf_drain(usbd_device *dev, uint8_t ep);
-
-#endif
-
diff --git a/src/platforms/stm32/cdcacm.c b/src/platforms/stm32/cdcacm.c
index 2bbdcb6..9799d13 100644
--- a/src/platforms/stm32/cdcacm.c
+++ b/src/platforms/stm32/cdcacm.c
@@ -37,7 +37,7 @@
#include "platform.h"
#if defined(PLATFORM_HAS_TRACESWO)
-#include "traceswo.h"
+#include <traceswo.h>
#endif
#include <usbuart.h>
diff --git a/src/platforms/native/traceswo.c b/src/platforms/stm32/traceswo.c
index 7cd42d1..31fdc4e 100644
--- a/src/platforms/native/traceswo.c
+++ b/src/platforms/stm32/traceswo.c
@@ -130,19 +130,19 @@ void trace_isr(void)
duty = TIM_CCR2(TRACE_TIM);
/* Reset decoder state if crazy shit happened */
- if ((bt && (((duty / bt) > 2) || ((duty / bt) == 0))) || (duty == 0))
+ if ((bt && (((duty / bt) > 2) || ((duty / bt) == 0))) || (duty == 0))
goto flush_and_reset;
if(!(sr & TIM_SR_CC1IF)) notstart = 1;
if (!bt) {
- if (notstart) {
+ if (notstart) {
notstart = 0;
return;
}
/* First bit, sync decoder */
duty -= ALLOWED_DUTY_ERROR;
- if (((cycle / duty) != 2) &&
+ if (((cycle / duty) != 2) &&
((cycle / duty) != 3))
return;
bt = duty;
@@ -176,7 +176,7 @@ void trace_isr(void)
decbuf_pos++;
}
- if (decbuf_pos < 128)
+ if (decbuf_pos < 128)
return;
flush_and_reset:
@@ -187,5 +187,3 @@ flush_and_reset:
decbuf_pos = 0;
memset(decbuf, 0, sizeof(decbuf));
}
-
-