00001 /*! \file include/kernel/IdeDebug.h 00002 * \brief IDE driver::Debug header. 00003 * \author Luca Giovacchini 00004 * \date Last update: 2003-11-07 00005 * \note Copyright (©) 2003 Luca Giovacchini 00006 * 00007 * This driver is based on Atadrv by Hale Landis 00008 * but it is completely rearranged for the minirighi32. 00009 * \n 00010 * <b>IMPORTANT!!!</b>\n 00011 * Here you can find code for debugging and showing errors. 00012 */ 00013 00014 00015 #ifndef IDETRACE_H 00016 #define IDETRACE_H 00017 00018 #include <const.h> 00019 00020 #define DBG_SHOWMAT_ASCII 1 00021 #define DBG_SHOWMAT_HEX 2 00022 00023 // Command names structure store string name for each command code 00024 typedef struct CmdNames_Struct 00025 { 00026 byte CmdCode; 00027 char * CmdName; 00028 } CmdNames_Struct; 00029 00030 // Error names structure store string error message for each error code 00031 typedef struct ErrNames_Struct 00032 { 00033 byte ErrCode; 00034 char * ErrName; 00035 } ErrNames_Struct; 00036 00037 char * GetIdeErrorMessage(int Err); 00038 void ShowIdeErrorMessage(int Err,int Dump); 00039 void ShowIdeRegisterDump(); 00040 void PrintByteHex(byte Data); 00041 void ShowMatrixData(char * DataBuffer,int Col,int BytePerCol,int RowToWait,int Len, int Mode); 00042 00043 00044 00045 #endif