mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
bd1465ca50
Conflicts: SConstruct doc/en/arch_platform.html doc/en/comunity.html doc/en/overview.html doc/en/refman.html doc/en/refman_gen.html doc/en/status.html doc/en/tut_bootstick.html doc/images/lng_pt.png doc/images/minusnode.png doc/images/next.png doc/images/node.png doc/images/nodelast.png doc/images/plusnode.png doc/images/plusnodelast.png doc/images/previous.png doc/images/showall.png doc/images/sync.png doc/images/vertline.png doc/pt/arch.html doc/pt/arch_coding.html doc/pt/arch_con_term.html doc/pt/arch_newport.html doc/pt/arch_overview.html doc/pt/arch_platform.html doc/pt/arch_tcpip.html doc/pt/building.html doc/pt/comunity.html doc/pt/dl_binaries.html doc/pt/dl_old.html doc/pt/dl_sources.html doc/pt/downloads.html doc/pt/examples.html doc/pt/faq.html doc/pt/installing_i386.html doc/pt/installing_lm3s.html doc/pt/news.html doc/pt/overview.html doc/pt/refman_dep.html doc/pt/refman_gen.html doc/pt/status.html doc/pt/tc_386.html doc/pt/toolchains.html doc/pt/tut_openocd.html doc/pt/using.html romfs/LM3S.lua romfs/led.lua romfs/morse.lua romfs/pong.lua src/lua/linit.c src/modules/auxmods.h src/platform/lm3s/platform.c src/platform/lm3s/platform_conf.h src/platform/sim/platform_conf.h
159 lines
4.4 KiB
HTML
159 lines
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
|
|
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<meta http-equiv="Content-Language" content="en-us"><title>Product</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="../style.css"></link>
|
|
</head>
|
|
<body style="background-color: rgb(255, 255, 255);">
|
|
<h3><a name="over"></a>tmr</h3>
|
|
<span style="font-weight: bold;"></span><big><br>
|
|
</big>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">It allows Lua to
|
|
execute timer specific operations (delay, read timer value,</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">start timer, get
|
|
time difference).</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <br>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="delay"></a>tmr.delay( id, delay ): uses timer
|
|
'id' to wait for 'delay' us.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <br>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><span style="font-style: italic;"><a name="read"></a></span>Data
|
|
= tmr.read( id ): reads the value of timer 'id'. The returned value is </font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">platform
|
|
dependent.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><span style="font-style: italic;"><a name="start"></a></span>Data
|
|
= tmr.start( id ): start the timer 'id', and also returns its value at</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">the moment of
|
|
start. The returned value is platform dependent.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="diff"></a>diff
|
|
= tmr.diff( id, end, start ): returns the time difference (in us)
|
|
between</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">the timer values
|
|
'end' and 'start' (obtained from calling tmr.start or</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">tmr.read). The
|
|
order of end/start is irrelevant. </font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="mindelay"></a>Data = tmr.mindelay( id ): returns
|
|
the minimum delay (in us ) that can be </font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">achieved by
|
|
calling the tmr.delay function. If the return value is 0, the </font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">platform layer
|
|
is capable of executing sub-microsecond delays.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="maxdelay"></a>Data = tmr.maxdelay( id ): returns
|
|
the maximum delay (in us) that can be</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">achieved by
|
|
calling the tmr.delay function.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="setclock"></a>Data = tmr.setclock( id, clock ):
|
|
sets the clock of the given timer. Returns the</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif">actual clock set
|
|
for the timer.</font>
|
|
</p>
|
|
<p style="margin-bottom: 0in;">
|
|
</p>
|
|
<p style="margin-bottom: 0in;"> <font face="Bitstream Vera Sans Mono, sans-serif"><a name="getclock"></a>Data = tmr.getclock( id ): return
|
|
the clock of the given timer.</font>
|
|
</p>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<p style="margin-bottom: 0in;"> <br>
|
|
</p>
|
|
<big><br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br style="font-family: Helvetica,Arial,sans-serif;">
|
|
<br style="font-family: Helvetica,Arial,sans-serif;">
|
|
<br style="font-family: Helvetica,Arial,sans-serif;">
|
|
<span style="font-family: Helvetica,Arial,sans-serif;">
|
|
|
|
</span></big> <br>
|
|
<br style="font-family: Verdana;">
|
|
</body></html> |