trace.h

来自「嵌入式系统内核模拟器」· C头文件 代码 · 共 45 行

H
45
字号
/*
===============================================================================
| Copyright (C) 2004 RuanHaiShen, All rights reserved.
| SUMMARY: 
|   Macros and prototypes for the tracing system.
|
| DESCRIPTION:
|   See http://www.01s.org for documentation, latest information, license 
|   and contact details.
|   email:ruanhaishen@01s.org
=============================================================================*/
#ifndef __trace_h__
#define __trace_h__
/*===========================================================================*/

#if CFG_DUMP_BUFSZ > 0
void printk(const char *fmt, ...);
#else
# define printk
#endif
//

#define __ui_writec(s, count)


#if CFG_DEBUG > 0
# define __TRACE(x)
# define __ASSERT(x) \
do { \
    if (!(x)) { \
        printk("%s %s (%d)", "!! ASSERT FAIL:", __FILE__, __LINE__); \
        task_lock(); \
        while(1); \
    } \
} while (0)

#else
# define __TRACE(x)         __MPT
# define __ASSERT(x)        __MPT
#endif

/*===========================================================================*/
#endif

⌨️ 快捷键说明

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