debug.h File Reference

Go to the source code of this file.

Defines

#define DEBUG_SYSTEM_ENABLE   1
#define DEBUG_VWEB_ENABLE   1
#define DEBUG_VW2010_ENABLE   1
#define DEBUG_SDCP_ENABLE   1
#define DEBUG_SAA7115_ENABLE   0
#define DEBUG_FMM_ENABLE   1

Functions

void DebugBufferDump (INT8U *pData, INT32U Length)
void DebugVwebFirmwareInfoShow (FIRMWARE_ENTRY *pFirmware)
void DebugHex2AsciiInt8uPrint (INT8U Data)
void DebugHex2AsciiInt16uPrint (INT16U Data)
void DebugHex2AsciiInt32uPrint (INT32U Data)
void DebugStringPrint (const char *pString)
void DebugFirmwareInfoShow (FIRMWARE_ENTRY *pFirmware)


Define Documentation

#define DEBUG_FMM_ENABLE   1

Definition at line 9 of file debug.h.

#define DEBUG_SAA7115_ENABLE   0

Definition at line 8 of file debug.h.

#define DEBUG_SDCP_ENABLE   1

Definition at line 7 of file debug.h.

#define DEBUG_SYSTEM_ENABLE   1

Definition at line 4 of file debug.h.

#define DEBUG_VW2010_ENABLE   1

Definition at line 6 of file debug.h.

#define DEBUG_VWEB_ENABLE   1

Definition at line 5 of file debug.h.


Function Documentation

void DebugBufferDump ( INT8U pData,
INT32U  Length 
)

Definition at line 17 of file debug.c.

00017                                                 {
00018     INT8U LineByteCounter,LineCounter;
00019     INT32U i;    
00020 
00021     LineByteCounter=0;
00022     LineCounter=0;
00023     //while(Length>0){
00024     for(i=0;i<Length;i++){
00025         if(LineByteCounter==16){
00026             LineByteCounter=0;
00027             LineCounter++;
00028         }
00029         if(LineByteCounter==0){
00030             DebugStringPrint("\n\r");
00031             DebugHex2AsciiInt8uPrint(LineCounter);   
00032             DebugStringPrint("h");                            
00033         }
00034         LineByteCounter++;                            
00035         DebugStringPrint(" ");
00036         DebugHex2AsciiInt8uPrint(*pData);
00037         pData++;
00038         //Length--;
00039    }
00040 }

void DebugFirmwareInfoShow ( FIRMWARE_ENTRY pFirmware  ) 

Definition at line 47 of file debug.c.

00047                                                      {
00048     if(pFirmware->HasFirmware==TRUE){
00049         DebugStringPrint("\n\r address: ");
00050         DebugHex2AsciiInt32uPrint(pFirmware->Address);
00051         DebugStringPrint(" length: ");
00052         DebugHex2AsciiInt32uPrint(pFirmware->Length);
00053         DebugStringPrint(" checksum: ");        
00054         DebugHex2AsciiInt8uPrint(pFirmware->Checksum);
00055     }
00056     else{
00057         DebugStringPrint("\r\n firmware 10 does not exist.");
00058     }
00059 }

void DebugHex2AsciiInt16uPrint ( INT16U  Data  ) 

Definition at line 81 of file debug.c.

00081                                            {
00082     INT8U i;
00083 
00084     i=(INT8U)((Data&0xf000)>>12);
00085     i=SystemlibHex2AsciiCharGet(i);
00086     Uart1CharTx(i);
00087     
00088     i=(INT8U)((Data&0x0f00)>>8);
00089     i=SystemlibHex2AsciiCharGet(i);
00090     Uart1CharTx(i);
00091     
00092     i=(INT8U)((Data&0x00f0)>>4);
00093     i=SystemlibHex2AsciiCharGet(i);
00094     Uart1CharTx(i);
00095 
00096     i=(INT8U)(Data&0x000f);
00097     i=SystemlibHex2AsciiCharGet(i);
00098     Uart1CharTx(i);
00099 }

void DebugHex2AsciiInt32uPrint ( INT32U  Data  ) 

Definition at line 105 of file debug.c.

00105                                            {
00106     INT8U i;
00107 
00108     i=(INT8U)((Data&0xf0000000)>>28);
00109     i=SystemlibHex2AsciiCharGet(i);
00110     Uart1CharTx(i);
00111     
00112     i=(INT8U)((Data&0x0f000000)>>24);
00113     i=SystemlibHex2AsciiCharGet(i);
00114     Uart1CharTx(i);
00115     
00116     i=(INT8U)((Data&0x00f00000)>>20);
00117     i=SystemlibHex2AsciiCharGet(i);
00118     Uart1CharTx(i);
00119 
00120     i=(INT8U)((Data&0x000f0000)>>16);
00121     i=SystemlibHex2AsciiCharGet(i);
00122     Uart1CharTx(i);
00123 
00124     i=(INT8U)((Data&0x0000f000)>>12);
00125     i=SystemlibHex2AsciiCharGet(i);
00126     Uart1CharTx(i);
00127     
00128     i=(INT8U)((Data&0x00000f00)>>8);
00129     i=SystemlibHex2AsciiCharGet(i);
00130     Uart1CharTx(i);
00131     
00132     i=(INT8U)((Data&0x000000f0)>>4);
00133     i=SystemlibHex2AsciiCharGet(i);
00134     Uart1CharTx(i);
00135 
00136     i=(INT8U)(Data&0x0000000f);
00137     i=SystemlibHex2AsciiCharGet(i);
00138     Uart1CharTx(i);
00139 }

void DebugHex2AsciiInt8uPrint ( INT8U  Data  ) 

Definition at line 65 of file debug.c.

00065                                          {
00066     INT8U i;
00067 
00068     i=Data&0xf0;
00069     i=i>>4;
00070     i=SystemlibHex2AsciiCharGet(i);
00071     Uart1CharTx(i);
00072     i=Data&0x0f;
00073     i=SystemlibHex2AsciiCharGet(i);
00074     Uart1CharTx(i);
00075 }

void DebugStringPrint ( const char *  pString  ) 

Definition at line 145 of file debug.c.

00145                                           {
00146     Uart1StringTx(pString);
00147 }

void DebugVwebFirmwareInfoShow ( FIRMWARE_ENTRY pFirmware  ) 


Generated on Tue Jul 7 20:39:55 2009 for A SIMPLE APPLICATION FOR PIC18F87J10 by  doxygen 1.5.9