1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00
elua/doc/en/arch_platform.html
James Snyder 4873051483 Almost finished documenting the platform interace, only ADC left. The platform
interface documentation is now dynamically generated by the "builddoc.lua"
script, with the description files located in doc/arch_platform/*.lua directory.
The same script will be used to generate the reference manual and ultimately
will be modified to generate a different format of the reference manual,
suitable for embedding directly into eLua (thus providing on-line help).
To generate the platform interface documentation, simply execute the
"build_all_docs.sh" script from the doc/ directory.
2009-06-29 16:42:12 +00:00

23 lines
2.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Language" content="en-us"><title>eLua platform interface</title>
<link rel="stylesheet" type="text/css" href="../style.css"></head>
<body style="background-color: rgb(255, 255, 255);">
<h3>The platform interface</h3>
<p>The platform interface is the part of <b>eLua</b> that makes it easily portable between different hardware platforms by grouping the common elements
of all platforms supported by <b>eLua</b> in a common interface. For more details about the platform interface and the overall structure of
<b>eLua</b> in general, check <a href="arch_overview.html">this link</a>.</p>
<p>The platform interface is defined in the <i>inc/platform.h</i> header file from the <b>eLua</b> source distribution. It is a collection of various
components (UART, SPI, timers ...), each of them is detailed in the next subsections. Each such component has an <b>id</b> which is a number that
identifies that component in <b>eLua</b>. Generally, numbers are assigned to components in their "natural" order; for example, PORTA will have the id
0, PORTB will have 1 and so on. Similarly, the second SPI interface (SPI1) of the MCU will probably have an id equal to 1. However, this is not a strict
rule. The implementation of the platform interface might choose to expose only some of the peripherals (components) of the MCU, thus this rule might be
broken. For example, if a board has 3 UARTs, but for some reason the second UART (UART1) is dedicated and can't be touched by <b>eLua</b>, then UART0 will have the id 0 and UART2 will
have the id 1, so UART1 won't ever be accesible to the code. Such cases are documented in the <a href="">##specific usage notes</a> section.</p>
<p>With some exceptions (most notably the low-level support functions), the different modules supported by the platform interface are
mirrored more or less accurately in separate Lua modules that can be used directly from <b>eLua</b>. Check <a href="">the reference manual</a> for a
complete description of these modules.</p>
</body></html>