Rev 249 | Rev 313 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 249 | Rev 254 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | 10 | ||
Line 11... | Line 11... | ||
11 | #warning : "### DEBUG-Funktion aktiv ###" |
11 | #warning : "### DEBUG-Funktion aktiv ###" |
12 | 12 | ||
13 | 13 | ||
Line 14... | Line 14... | ||
14 | 14 | ||
15 | unsigned char Debug_BufPtr = 0; |
15 | u8 Debug_BufPtr = 0; |
16 | struct str_Debug tDebug; |
16 | Debug_t tDebug; |
17 | unsigned char SendDebugOutput = 0; |
17 | u8 SendDebugOutput = 0; |
Line 24... | Line 24... | ||
24 | tDebug.Text[Debug_BufPtr++] = c; // copy character to buffer |
24 | tDebug.Text[Debug_BufPtr++] = c; // copy character to buffer |
25 | if (Debug_BufPtr > 30) Debug_BufPtr = 30; // avoid buffer overflow |
25 | if (Debug_BufPtr > 30) Debug_BufPtr = 30; // avoid buffer overflow |
26 | } |
26 | } |
27 | } |
27 | } |
Line 28... | Line 28... | ||
28 | 28 | ||
29 | void DebugSend(unsigned char cmd) |
29 | void DebugSend(u8 cmd) |
30 | { |
30 | { |
31 | if (!SendDebugOutput) |
31 | if (!SendDebugOutput) |
32 | { |
32 | { |
33 | tDebug.Cmd = cmd; |
33 | tDebug.Cmd = cmd; |
Line 36... | Line 36... | ||
36 | SendDebugOutput = 1; // set flag to trasmit data the next time in serial transmit function |
36 | SendDebugOutput = 1; // set flag to trasmit data the next time in serial transmit function |
37 | } |
37 | } |
38 | } |
38 | } |
39 | #endif |
39 | #endif |
Line 40... | Line -... | ||
40 | - | ||
41 | /* |
- | |
42 | add the following code block to the serial transmit function |
- | |
43 | - | ||
44 | #ifdef DEBUG // only include functions if DEBUG is defined |
- | |
45 | if(SendDebugOutput && UebertragungAbgeschlossen) |
- | |
46 | { |
- | |
47 | SendOutData('0', FC_ADDRESS, 1, (unsigned char *) &tDebug, sizeof(tDebug)); |
- | |
48 | SendDebugOutput = 0; |
- | |
49 | } |
- | |
50 | #endif |
- | |
51 | - | ||
52 | */ |
- |