-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonan CM
committed
Nov 25, 2013
1 parent
c2c4620
commit e027e79
Showing
8 changed files
with
337 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "debug.h" | ||
|
||
#ifndef NDEBUG | ||
|
||
#include <p30fxxxx.h> | ||
|
||
void dbgmsg_uart1(char *c) | ||
{ | ||
for (; *c != 0; ++c) | ||
{ | ||
while (U1STAbits.UTXBF); | ||
U1TXREG = *c; | ||
} | ||
} | ||
|
||
void dbgmsg_uart2(char *c) | ||
{ | ||
for (; *c != 0; ++c) | ||
{ | ||
while (U2STAbits.UTXBF); | ||
U2TXREG = *c; | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef DEBUG_H | ||
#define DEBUG_H | ||
|
||
#define NDEBUG | ||
|
||
#ifndef NDEBUG | ||
void dbgmsg_uart1(char *c); | ||
#else | ||
#define dbgmsg_uart1(x) /* Define empty macro */ | ||
#endif | ||
|
||
#ifndef NDEBUG | ||
void dbgmsg_uart2(char *c); | ||
#else | ||
#define dbgmsg_uart2(x) /* Define empty macro */ | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.