📄 hal-diagnostic-support.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Diagnostic Support</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="HAL Interfaces"HREF="hal-interfaces.html"><LINKREL="PREVIOUS"TITLE="Linker Scripts"HREF="hal-linker-scripts.html"><LINKREL="NEXT"TITLE="SMP Support"HREF="hal-smp-support.html"></HEAD><BODYCLASS="SECTION"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="hal-linker-scripts.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 9. HAL Interfaces</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="hal-smp-support.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECTION"><H1CLASS="SECTION"><ANAME="HAL-DIAGNOSTIC-SUPPORT">Diagnostic Support</H1><P>The HAL provides support for low level diagnostic IO. This isparticularly useful during early development as an aid to bringing upa new platform. Usually this diagnostic channel is a UART or someother serial IO device, but it may equally be a a memorybuffer, a simulator supported output channel, a ROM emulator virtualUART, and LCD panel, a memory mapped video buffer or any other outputdevice.</P><P><TTCLASS="FUNCTION">HAL_DIAG_INIT()</TT> performs any initializationrequired on the device being used to generate diagnostic output. Thismay include, for a UART, setting baud rate, and stop, parity andcharacter bits. For other devices it may include initializing acontroller or establishing contact with a remote device.</P><P><TTCLASS="FUNCTION">HAL_DIAG_WRITE_CHAR(c)</TT> writesthe character supplied to the diagnostic output device.</P><P><TTCLASS="FUNCTION">HAL_DIAG_READ_CHAR(c)</TT> reads a character from thediagnostic device into the supplied variable. This is not supportedfor all diagnostic devices.</P><P>These macros are defined in the header file<TTCLASS="FILENAME">cyg/hal/hal_diag.h</TT>. This file is usually suppliedby the variant or platform HAL, depending on where the IO device beingused is located. For example for on-chip UARTs it would be in thevariant HAL, but for a board-level LCD panel it would be in theplatform HAL.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="hal-linker-scripts.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="hal-smp-support.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Linker Scripts</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="hal-interfaces.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">SMP Support</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -