Skip to content

Commit

Permalink
CPU diagnosztika a megszakításban (issue-2 szerint)
Browse files Browse the repository at this point in the history
  • Loading branch information
Endruu committed Oct 22, 2013
1 parent c0f57cc commit a6ec68e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions program/headers/device/bf_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@
#undef DEBUG_FUNCTIONS_ENABLED // disable debug functions
#undef LOGGING_ENABLED // disable log

#define CPU_DIAGNOSTIC_ENABLED

#endif
13 changes: 13 additions & 0 deletions program/source/device/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include "../../headers/device/uart.h"

#ifdef CPU_DIAGNOSTIC_ENABLED
#include "../../headers/diagnostics.h"
#endif

int aLeftIn;
int aRightIn;
int aLeftOut = 0;
Expand Down Expand Up @@ -42,7 +46,16 @@ EX_INTERRUPT_HANDLER(Sport0_RX_ISR)
// run filter
aLeftOut = aRightIn;
//aRightOut = aLeftIn;
#ifdef CPU_DIAGNOSTIC_ENABLED
startClock();
#endif

aRightOut = (filterBank[actualFilter].filter)(aRightIn >> 8, coeffLineR, delayLineR) >> 8;

#ifdef CPU_DIAGNOSTIC_ENABLED
stopClock();
setTick();
#endif

}

Expand Down

1 comment on commit a6ec68e

@Endruu
Copy link
Owner Author

@Endruu Endruu commented on a6ec68e Oct 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nem issue-2 ( #2 ), hanem issue #4

Please sign in to comment.