Documentation updates

This commit is contained in:
Jeff Parsons 2016-02-07 11:05:12 -08:00
commit 070ea74f2f
13 changed files with 230 additions and 40 deletions

View file

@ -46,16 +46,19 @@ if (NODE) {
*
* The SerialPort component has the following component-specific (parmsSerial) properties:
*
* adapter: 1 (for port 0x3F8) or 2 (for port 0x2F8); 0 if not defined
* adapter: 1 (port 0x3F8) or 2 (port 0x2F8); 0 if not defined
*
* binding: name of a control (based on its "binding" attribute) to bind to this port's I/O
*
* tabSize: set to a non-zero number to convert tabs to spaces (applies only to output to
* the above binding); default is 0 (no conversion)
*
* WARNING: Since the XSL file defines 'adapter' as a number, not a string, there's no need to
* use parseInt(), and as an added benefit, we don't need to worry about whether a hex or decimal
* format was used.
* In the future, we may support 'port' and 'irq' properties that allow the machine to define a
* non-standard serial port configuration, instead of only our pre-defined 'adapter' configurations.
*
* NOTE: Since the XSL file defines 'adapter' as a number, not a string, there's no need to use
* parseInt(), and as an added benefit, we don't need to worry about whether a hex or decimal format
* was used.
*
* This hard-coded approach mimics the original IBM PC Asynchronous Adapter configuration, which
* contained a pair of "shunt modules" that allowed the user to select a port address of either

View file

@ -697,6 +697,33 @@
</xsl:call-template>
</xsl:template>
<xsl:template match="parallel[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($componentFile)/parallel"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
</xsl:template>
<xsl:template match="parallel[not(@ref)]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="adapter">
<xsl:choose>
<xsl:when test="@adapter"><xsl:value-of select="@adapter"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="binding">
<xsl:choose>
<xsl:when test="@binding"><xsl:value-of select="@binding"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="component">
<xsl:with-param name="machine" select="$machine"/>
<xsl:with-param name="class">parallel</xsl:with-param>
<xsl:with-param name="parms">,adapter:<xsl:value-of select="$adapter"/>,binding:'<xsl:value-of select="$binding"/>'</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="serial[@ref]">
<xsl:param name="machine" select="''"/>
<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>