Subversion Repositories NaviCtrl

Rev

Rev 249 | Rev 308 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 249 Rev 254
Line 4... Line 4...
4
 
4
 
5
#include "91x_lib.h"
5
#include "91x_lib.h"
6
#include "main.h"
6
#include "main.h"
Line 7... Line 7...
7
#include "debug.h"
7
#include "debug.h"
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
#ifdef DEBUG                                                                                                                    // only include functions if DEBUG is defined in main.h
9
#ifdef DEBUG    // only include functions if DEBUG is defined in main.h
10
 
10
 
11
#warning : "### DEBUG-Funktion aktiv ###"
11
#warning : "### DEBUG-Funktion aktiv ###"
Line 12... Line 12...
12
 
12
 
13
 
13
 
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;
18
 
18
 
19
// function called from _printf_P to output character
19
// function called from _printf_P to output character
20
void Debug_Putchar(char c)
20
void Debug_Putchar(char c)
Line 21... Line 21...
21
{
21
{
22
        if (!SendDebugOutput)
22
        if (!SendDebugOutput)
23
        {
23
        {
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
        }
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
*/
-