通过OALLogSetZones()函数打开OAL全部调试信息

本文介绍如何使用OALLogSetZones()函数开启OAL层的全面调试信息,并详细解释了OALTraceZones中各调试区域的作用及组合方式。

/*************************************************************

**  标题:通过OALLogSetZones()函数打开OAL全部调试信息
**  作者:Veabol & 韦伯嵌入式开发网

**  发布日期:2010-09-08

**  最后修改:2010-09-12

**  注意事项:转载需注明出处,且转载过程中不得修改、删除文章中的任何内容;未经作者同意,商业网站不可转载

*************************************************************/

 

 

OAL层代码中诸如 OALMSG(OAL_FUNC, (L"+OEMInit/r/n"));类型的代码默认只有使用OAL_ERROR和OAL_WARN才能输出调试信息,实际上可以通过简单地通过OALLogSetZones()函数打开OAL全部调试信息。

在MSDN中函数说明如下:

This function updates the current trace zone mask.

void OALLogSetZones(  UINT32 zones);

Parameterszones [in] Specifies the trace zones to be logged. See OAL Trace Zones for descriptions of the valid trace zones. The trace zones can be combined in this argument using Boolean operators. Return Values

None.

(原创文章,转载请注明出处: http://www.veabol.com/thread-17-1-1.html)

OAL Trace Zones 描述如下:

OAL trace zones determine the type and source of logging information. Several trace zone constants, OAL_FUNC, OAL_INFO, and OAL_VERBOSE, are module-dependent. These constants must be combined with module-based trace zone constants. For example, to log function calls in the memory module, use OAL_FUNC and OAL_MEMORY.

OAL_ERROR and OAL_WARN specify general logging and are not associated with any modules.

The following table shows the supported OAL trace zones.

ZoneDescription
OAL_ERRORLogs errors. This trace zone is not associated with any modules.
OAL_WARNLogs warnings. This trace zone is not associated with any modules.
OAL_FUNCLogs function calls. Use this trace zone to log program flow information. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_INFOSpecifies that informational messages will be logged. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_VERBOSELogs in verbose mode. This trace zone must be set with a module-based trace zone when specified in a function.
OAL_STUBLogs messages from the stub module.
OAL_KEYVALLogs messages from the keyval module.
OAL_IOLogs messages from the IO module.
OAL_CACHELogs messages from the cache module.
OAL_RTCLogs messages from the RTC module.
OAL_POWERLogs messages from the power module.
OAL_PCILogs messages from the PCI module.
OAL_ARGSLogs messages from the arguments module.
OAL_MEMORYLogs messages from the memory module.
OAL_IOCTLLogs messages from the IOCTL module.
OAL_TIMERLogs messages from the timer module.
OAL_ETHERLogs messages from the Ethernet module
OAL_FLASHLogs messages from the flash module.
OAL_INTRLogs messages from the interrupts module.
OAL_KITLLogs messages from the KITL module.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值