⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.c

📁 一个操作系统源代码 用于嵌入式设备 在Vc++环境下仿真 成功移植到多款处理器上
💻 C
字号:
#define _SIZE_T_DEFINED
#include <windows.h>
#include <string.h>
#include <stdio.h>

#include <kernel\ros33\ros33.h>

// simulator header
#include <simsrv\export\simsrv.h>

__declspec( dllimport ) char		tcaDebugLog[82];

extern HANDLE	hEnEventInt;

void AppendDebugLogString( char *text, FILE *file )
{
    ID id;

	ResetEvent( hEnEventInt );	// disable interrupt

	if( file == NULL )
	{
		get_tid( &id );
		sprintf( tcaDebugLog, "%02d:", id );
		strncpy( tcaDebugLog+3, text, 77 );
		tcaDebugLog[80]=0;
//		PostMessage( hwndPanel, WM_USER, 0, 0 );
		SendMessage( hwndPanel, WM_USER, 0, 0 );
	}
	else
		fprintf( file, "%s\n", text );

	SetEvent( hEnEventInt );	// enable interrupt

	return;
}

void DebugLog( char *format, ... )
{
//	var_list

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -