traceswo: Move (now-constant) traceswo.c to platforms/stm32

This commit is contained in:
Uwe Bonnes 2013-01-16 16:54:30 +01:00
parent 09715e1db8
commit 15d7077115
3 changed files with 5 additions and 8 deletions

View File

@ -26,4 +26,3 @@ void traceswo_init(void);
void trace_buf_drain(usbd_device *dev, uint8_t ep);
#endif

View File

@ -37,7 +37,7 @@
#include "platform.h"
#if defined(PLATFORM_HAS_TRACESWO)
#include "traceswo.h"
#include <traceswo.h>
#endif
#include <usbuart.h>

View File

@ -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));
}