1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00
elua/doc/en/uart_doc.html

59 lines
2.9 KiB
HTML
Raw Normal View History

<!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>Product</title><link rel="stylesheet" type="text/css" href="./style.css"></head>
<body bgcolor="#ffffff">
<h3><a name="over"></a>uart</h3><br><p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">[uart.setup(</font><font face="Bitstream Vera Sans Mono, sans-serif"> id, baud, databits, </font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">uart.PARITY_EVEN |uart.</font><font face="Bitstream Vera Sans Mono, sans-serif">PARITY</font><font face="Bitstream Vera Sans Mono, sans-serif">_ODD | uart.</font><font face="Bitstream Vera Sans Mono, sans-serif">PARITY</font><font face="Bitstream Vera Sans Mono, sans-serif">_NONE, </font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">uart.STOPBITS_1 | uart.STOPBITS_1_5 | uart.STOPBITS_2 )]&nbsp;&nbsp;&nbsp;&nbsp; Actual_baud = uart.setup( id, baud, databits, </font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">uart.PAR_EVEN |uart.PAR_ODD | uart.PAR_NONE, </font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">uart.STOP_1 | uart.STOP_1_5 | uart.STOP_2 ): set the UART interface with the</font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">given parameters, returns the baud rate that was set for the UART.</font>
</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif"><br>
</font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">[</font><font face="Bitstream Vera Sans Mono, sans-serif">uart.send] </font><font face="Bitstream Vera Sans Mono, sans-serif">uart.send( id, Data1, Data2, ... ): send all the data to the specified UART interface.</font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">#### Data 1 only !?!!<br>
</font>
</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif"><br>
</font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">[</font><font face="Bitstream Vera Sans Mono, sans-serif">uart.recv(</font><font face="Bitstream Vera Sans Mono, sans-serif"> id, uart.TIMEOUT_NO | <strike>uart.TIMEOUT_INFINITE</strike> | timeout )</font><font face="Bitstream Vera Sans Mono, sans-serif"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font face="Bitstream Vera Sans Mono, sans-serif">Data = uart.recv( id, uart.NO_TIMEOUT | uart.INF_TIMEOUT | timeout ): reads a </font>
</p>
<p style="margin-bottom: 0in;">
<font face="Bitstream Vera Sans Mono, sans-serif">byte from the specified UART interface.</font>
</p>
<br>
</body></html>