?? tmmon.h
字號:
// tmmon.h
#include "tmtypes.h"
#include "tmgmonDlg.h"
#define PROCESS_BUSY "Process is busy!"
#define MAX_STRING 256
#define MAX_ARGUMENT_COUNT 256
#define MAX_ARGUMENT_BUFFER 1024
typedef struct _CMD_LD_PARAM
{
DWORD dwCountArg;
DWORD dwIdxArgStr;
PVOID ArgumentPtr[MAX_ARGUMENT_COUNT];
CHAR ArgumentBuffer[MAX_ARGUMENT_BUFFER];
CHAR szExecutableFile[MAX_STRING];
} CMD_LD_PARAM, *PCMD_LD_PARAM;
enum ParserState
{ CMD_WAIT,
LD_PROCESS,
GO_ARGS,
ST_PROCESS,
TRACEP_CMD,
DSP_CMD
};
///////////////////////////////////////////////////////////////////////////////////////////
typedef enum
{
CMD_STATUS_OK, // 0 OK
CMD_STATUS_PARSEERR, // 1 Parser Error
CMD_STATUS_QUIT, // 2 End of Session
CMD_STATUS_INADEQUATE, // 3 Inadequate Input
CMD_STATUS_PARAMERR, // 4 Parameter Validation Error
CMD_STATUS_PARAMEXTRA, // 5 Extra Input
CMD_STATUS_COMPLETE // 6 Command Completed Successfully
} CMD_STATUS_CODE;
////////////////////////////////////////////////////////////////////
class CTmmon
{
public:
CTmmon();
~CTmmon();
// current DSP specific Parameters
UInt32 m_DSPCount;
UInt32 m_CurrentDSPNumber;
UInt32 m_CurrentDSPHandle;
tmmanDSPInfo m_CurrentDSPInfo;
// flags that can be altered via the set command
// UInt32 m_TMRunWindowSize;
// global context
UInt32 m_dwBaud;
UInt32 m_dwWindowLines;
CRunTimeParameterBlock m_TMCRTParams;
UInt32 m_CRTHandleArray[constTMMANMaximumDeviceCount];
WORD wState; // state of the parser FSM
// added for debug options and trace commands
BOOL DebugOn;
DWORD DebugOptions;
BOOL fTraceIntoFile;
DWORD ProgramState;
// string placeholders
CHAR szInputString[MAX_STRING];
CHAR szTraceFileName[MAX_STRING]; //trace filename
char* m_traceBuffer;
DWORD m_PrintableLength;
BOOL Initial();
void Exit();
void ShowProcessorInfo ( CTmgmonDlg* pTmgmonDlg);
CMD_STATUS_CODE halValidateAddress ( UINT wDataSize,
DWORD dwAddress,
PDWORD pLinear,
PDWORD pSize,
int *piMemtype);
// new function
BOOL ExeLoad(char *filename,char *arguments);
BOOL ExeRun(char *filename,char *arguments);
BOOL ExeStop( );
BOOL ExeTraceP( char *filename );
BOOL ExeDSP (UInt32 DSPNumber);
BOOL ctc_main (CTmgmonDlg* pTmgmonDlg,char* verstr);
void ctc_exit(void);
BOOL ctc_mem(HWND hwnd,DWORD PhyAddress,int dumptype,BOOL start);
void ctc_trace(CEdit * pEdit,char *str);
};
typedef struct _CMD_READMEMORY
{
BOOL fSDRAM; /* is this address in SDRAM range */
UInt16 wDataSize; /* word size for current command */
UInt32 dwAddress;
UInt32 dwLength;
} CMD_READMEMORY, *PCMD_READMEMORY;
typedef struct _CMD_WRITEMEMORY
{
BOOL fSDRAM; /* is this address in SDRAM range */
UInt16 wDataSize; /* word size for current command */
UInt32 dwAddress;
UInt32 dwData;
UInt32 dwLength;
UInt32 dwStartAddress; /* address where the writing started */
} CMD_WRITEMEMORY, *PCMD_WRITEMEMORY;
typedef struct _CMD_LOADRUN
{
BOOL fSDRAM; /* is this address in SDRAM range */
Bool fDynamicApplicaiton; /* szApplicaitonFile field is valid */
Int8 szExecutableFile[constTMManStringLength];
Int8 szApplicationFile[constTMManStringLength];
UInt32 dwCountArg;
UInt32 dwIdxArgStr;
Pointer ArgumentPtr[constTMManMaximumArgumentCount];
UInt8 ArgumentBuffer[constTMManMaximumArgumentBuffer];
} CMD_LOADRUN, *PCMD_LOADRUN;
typedef struct _CMD_DEBUG
{
BOOL fDebugOn;
UInt32 DebugOptions;
} CMD_DEBUG, *PCMD_DEBUG;
typedef struct _CMD_TRACEP
{
BOOL fTraceIntoFile;
UInt8 szTraceFileName[constTMManStringLength];
} CMD_TRACEP, *PCMD_TRACEP;
typedef struct _CMD_DSP
{
UInt32 DSPNumber;
} CMD_DSP, *PCMD_DSP;
typedef struct _CMD_SET
{
UInt32 Type;
Pointer Address;
} CMD_SET, *PCMD_SET;
///////////////////////////////////////////////////////////////////////////////////////////
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -