/*************************************************************
** 标题:通过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.
| Zone | Description |
| OAL_ERROR | Logs errors. This trace zone is not associated with any modules. |
| OAL_WARN | Logs warnings. This trace zone is not associated with any modules. |
| OAL_FUNC | Logs 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_INFO | Specifies that informational messages will be logged. This trace zone must be set with a module-based trace zone when specified in a function. |
| OAL_VERBOSE | Logs in verbose mode. This trace zone must be set with a module-based trace zone when specified in a function. |
| OAL_STUB | Logs messages from the stub module. |
| OAL_KEYVAL | Logs messages from the keyval module. |
| OAL_IO | Logs messages from the IO module. |
| OAL_CACHE | Logs messages from the cache module. |
| OAL_RTC | Logs messages from the RTC module. |
| OAL_POWER | Logs messages from the power module. |
| OAL_PCI | Logs messages from the PCI module. |
| OAL_ARGS | Logs messages from the arguments module. |
| OAL_MEMORY | Logs messages from the memory module. |
| OAL_IOCTL | Logs messages from the IOCTL module. |
| OAL_TIMER | Logs messages from the timer module. |
| OAL_ETHER | Logs messages from the Ethernet module |
| OAL_FLASH | Logs messages from the flash module. |
| OAL_INTR | Logs messages from the interrupts module. |
| OAL_KITL | Logs messages from the KITL module. |
本文介绍如何使用OALLogSetZones()函数开启OAL层的全面调试信息,并详细解释了OALTraceZones中各调试区域的作用及组合方式。

1087

被折叠的 条评论
为什么被折叠?



