mirror of
https://github.com/cwyark/sdk-ameba-v4.0b_without_nda_gcc.git
synced 2024-11-22 05:54:19 +00:00
863 lines
38 KiB
HTML
863 lines
38 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
||
|
<title>SDK4.0: UART</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectalign" style="padding-left: 0.5em;">
|
||
|
<div id="projectname">SDK4.0
|
||
|
</div>
|
||
|
<div id="projectbrief">This document shows Ameba SDK 4.0 APIs</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.11 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
</div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#enumval-members">Enumerator</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">UART<div class="ingroups"><a class="el" href="group__sdk.html">Ameba SDK</a> » <a class="el" href="group__hal.html">HAL</a></div></div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
|
||
|
<p>uart functions
|
||
|
<a href="#details">More...</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
|
||
|
Ameba Common</h2></td></tr>
|
||
|
<tr class="memitem:ga2c48912c12fd98a4f4faffbc7f20a9f6"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga2c48912c12fd98a4f4faffbc7f20a9f6">SerialParity</a> { <br />
|
||
|
  <a class="el" href="group__uart.html#gga2c48912c12fd98a4f4faffbc7f20a9f6acc1b5f7583b642d0565d0b5c564ba353">ParityNone</a> = 0,
|
||
|
<a class="el" href="group__uart.html#gga2c48912c12fd98a4f4faffbc7f20a9f6aafeb42f20ebe23268f54485545776eb9">ParityOdd</a> = 1,
|
||
|
<a class="el" href="group__uart.html#gga2c48912c12fd98a4f4faffbc7f20a9f6a4a03b07aec589fbf62d4cc09aea5ef10">ParityEven</a> = 2,
|
||
|
<a class="el" href="group__uart.html#gga2c48912c12fd98a4f4faffbc7f20a9f6a686de860a468d952d60d30eaf12ff8f6">ParityForced1</a> = 3,
|
||
|
<br />
|
||
|
  <a class="el" href="group__uart.html#gga2c48912c12fd98a4f4faffbc7f20a9f6ab95dcc23f911b83096e072255041f98f">ParityForced0</a> = 4
|
||
|
<br />
|
||
|
}<tr class="memdesc:ga2c48912c12fd98a4f4faffbc7f20a9f6"><td class="mdescLeft"> </td><td class="mdescRight">UART Parity mode used by serial_format. <a href="group__uart.html#ga2c48912c12fd98a4f4faffbc7f20a9f6">More...</a><br /></td></tr>
|
||
|
</td></tr>
|
||
|
<tr class="separator:ga2c48912c12fd98a4f4faffbc7f20a9f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga8dbaa98202e6883fc0398bcc14f582b7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">SerialIrq</a> { <a class="el" href="group__uart.html#gga8dbaa98202e6883fc0398bcc14f582b7ada2693bfed74737c8d61d4818bc6171f">RxIrq</a>,
|
||
|
<a class="el" href="group__uart.html#gga8dbaa98202e6883fc0398bcc14f582b7aa4066880713ec11ad8d574f89336aed0">TxIrq</a>
|
||
|
}<tr class="memdesc:ga8dbaa98202e6883fc0398bcc14f582b7"><td class="mdescLeft"> </td><td class="mdescRight">UART Interrupt enable/disable used by serial_irq_set. <a href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">More...</a><br /></td></tr>
|
||
|
</td></tr>
|
||
|
<tr class="separator:ga8dbaa98202e6883fc0398bcc14f582b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gae88006c219f95bae663fe0f2a2561dd7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gae88006c219f95bae663fe0f2a2561dd7">FlowControl</a> { <a class="el" href="group__uart.html#ggae88006c219f95bae663fe0f2a2561dd7a2f840702ab35486ee6fb2a9c47cda1ce">FlowControlNone</a>,
|
||
|
<a class="el" href="group__uart.html#ggae88006c219f95bae663fe0f2a2561dd7a147f23a0288db0a3d93da040ef80247c">FlowControlRTS</a>,
|
||
|
<a class="el" href="group__uart.html#ggae88006c219f95bae663fe0f2a2561dd7a658dc07c550efee6dd57ded2c190dbcf">FlowControlCTS</a>,
|
||
|
<a class="el" href="group__uart.html#ggae88006c219f95bae663fe0f2a2561dd7a07762176ebd2a742b8691e25b7eb627e">FlowControlRTSCTS</a>
|
||
|
}<tr class="memdesc:gae88006c219f95bae663fe0f2a2561dd7"><td class="mdescLeft"> </td><td class="mdescRight">UART FlowControl mode used by serial_set_flow_control. <a href="group__uart.html#gae88006c219f95bae663fe0f2a2561dd7">More...</a><br /></td></tr>
|
||
|
</td></tr>
|
||
|
<tr class="separator:gae88006c219f95bae663fe0f2a2561dd7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gafdf9fed473dc0148434ae42cc6a8a64e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafdf9fed473dc0148434ae42cc6a8a64e"></a>
|
||
|
typedef void(* </td><td class="memItemRight" valign="bottom"><b>uart_irq_handler</b>) (uint32_t id, <a class="el" href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">SerialIrq</a> event)</td></tr>
|
||
|
<tr class="separator:gafdf9fed473dc0148434ae42cc6a8a64e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaf8f14cde53cf29b42e3a46f0f3e347cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf8f14cde53cf29b42e3a46f0f3e347cd"></a>
|
||
|
typedef struct serial_s </td><td class="memItemRight" valign="bottom"><b>serial_t</b></td></tr>
|
||
|
<tr class="separator:gaf8f14cde53cf29b42e3a46f0f3e347cd"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga3096f72c7bb6c02936a2b5753ffe7157"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga3096f72c7bb6c02936a2b5753ffe7157">serial_init</a> (serial_t *obj, PinName tx, PinName rx)</td></tr>
|
||
|
<tr class="memdesc:ga3096f72c7bb6c02936a2b5753ffe7157"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the UART device, include clock/function/interrupt/UART registers. <a href="#ga3096f72c7bb6c02936a2b5753ffe7157">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga3096f72c7bb6c02936a2b5753ffe7157"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga29829ef7c866e140b2fb738195be3020"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga29829ef7c866e140b2fb738195be3020">serial_free</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga29829ef7c866e140b2fb738195be3020"><td class="mdescLeft"> </td><td class="mdescRight">Deinitializes the UART device, include clock/function/interrupt/UART registers. <a href="#ga29829ef7c866e140b2fb738195be3020">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga29829ef7c866e140b2fb738195be3020"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga33a5f814c050396d17bde80505c93188"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga33a5f814c050396d17bde80505c93188">serial_baud</a> (serial_t *obj, int baudrate)</td></tr>
|
||
|
<tr class="memdesc:ga33a5f814c050396d17bde80505c93188"><td class="mdescLeft"> </td><td class="mdescRight">Set UART device baudrate. <a href="#ga33a5f814c050396d17bde80505c93188">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga33a5f814c050396d17bde80505c93188"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gadd3983278709908656d97258002466e7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gadd3983278709908656d97258002466e7">serial_format</a> (serial_t *obj, int data_bits, <a class="el" href="group__uart.html#ga2c48912c12fd98a4f4faffbc7f20a9f6">SerialParity</a> parity, int stop_bits)</td></tr>
|
||
|
<tr class="memdesc:gadd3983278709908656d97258002466e7"><td class="mdescLeft"> </td><td class="mdescRight">Set UART format. <a href="#gadd3983278709908656d97258002466e7">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gadd3983278709908656d97258002466e7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga7f22516de1ec2fca735606495ab1f869"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga7f22516de1ec2fca735606495ab1f869">serial_irq_handler</a> (serial_t *obj, uart_irq_handler handler, uint32_t id)</td></tr>
|
||
|
<tr class="memdesc:ga7f22516de1ec2fca735606495ab1f869"><td class="mdescLeft"> </td><td class="mdescRight">Set UART interrupt hander if needed. <a href="#ga7f22516de1ec2fca735606495ab1f869">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga7f22516de1ec2fca735606495ab1f869"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gafefbd52507666563e36924676db7652e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gafefbd52507666563e36924676db7652e">serial_irq_set</a> (serial_t *obj, <a class="el" href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">SerialIrq</a> irq, uint32_t enable)</td></tr>
|
||
|
<tr class="memdesc:gafefbd52507666563e36924676db7652e"><td class="mdescLeft"> </td><td class="mdescRight">Enable/Disable UART interrupt. <a href="#gafefbd52507666563e36924676db7652e">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gafefbd52507666563e36924676db7652e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga6d3f8740a64b01ffc0ce607a638ece92"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga6d3f8740a64b01ffc0ce607a638ece92">serial_getc</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga6d3f8740a64b01ffc0ce607a638ece92"><td class="mdescLeft"> </td><td class="mdescRight">get one byte from UART. <a href="#ga6d3f8740a64b01ffc0ce607a638ece92">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga6d3f8740a64b01ffc0ce607a638ece92"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga25f76e4c233aa5298856d99ea3f4058e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga25f76e4c233aa5298856d99ea3f4058e">serial_putc</a> (serial_t *obj, int c)</td></tr>
|
||
|
<tr class="memdesc:ga25f76e4c233aa5298856d99ea3f4058e"><td class="mdescLeft"> </td><td class="mdescRight">send one byte use UART. <a href="#ga25f76e4c233aa5298856d99ea3f4058e">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga25f76e4c233aa5298856d99ea3f4058e"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga0c9040624bb759fd5cd2bc10a60831bd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga0c9040624bb759fd5cd2bc10a60831bd">serial_readable</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga0c9040624bb759fd5cd2bc10a60831bd"><td class="mdescLeft"> </td><td class="mdescRight">check if there is data in rx fifo. <a href="#ga0c9040624bb759fd5cd2bc10a60831bd">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga0c9040624bb759fd5cd2bc10a60831bd"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gadbfe8af954c543d045e9ca7b553578c8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gadbfe8af954c543d045e9ca7b553578c8">serial_writable</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:gadbfe8af954c543d045e9ca7b553578c8"><td class="mdescLeft"> </td><td class="mdescRight">check if write data to tx fifo is permitted. <a href="#gadbfe8af954c543d045e9ca7b553578c8">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gadbfe8af954c543d045e9ca7b553578c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga390a75da4b756c213661502dc71a0234"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga390a75da4b756c213661502dc71a0234">serial_clear</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga390a75da4b756c213661502dc71a0234"><td class="mdescLeft"> </td><td class="mdescRight">Clear Rx fifo. <a href="#ga390a75da4b756c213661502dc71a0234">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga390a75da4b756c213661502dc71a0234"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaf4e24d07fc05f2ce0cf59c61da149e01"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gaf4e24d07fc05f2ce0cf59c61da149e01">serial_break_set</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:gaf4e24d07fc05f2ce0cf59c61da149e01"><td class="mdescLeft"> </td><td class="mdescRight">enable UART break contol function. <a href="#gaf4e24d07fc05f2ce0cf59c61da149e01">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gaf4e24d07fc05f2ce0cf59c61da149e01"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga5348986db46756483d94b5040ab9a0a9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga5348986db46756483d94b5040ab9a0a9">serial_break_clear</a> (serial_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga5348986db46756483d94b5040ab9a0a9"><td class="mdescLeft"> </td><td class="mdescRight">disable UART break contol function. <a href="#ga5348986db46756483d94b5040ab9a0a9">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga5348986db46756483d94b5040ab9a0a9"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaf8be980153743b25bcbcff4c5855dbf3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gaf8be980153743b25bcbcff4c5855dbf3">serial_pinout_tx</a> (PinName tx)</td></tr>
|
||
|
<tr class="memdesc:gaf8be980153743b25bcbcff4c5855dbf3"><td class="mdescLeft"> </td><td class="mdescRight">set tx pinmux. <a href="#gaf8be980153743b25bcbcff4c5855dbf3">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gaf8be980153743b25bcbcff4c5855dbf3"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga17cb0ba1a2c4bdae299120e4d7557f4b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga17cb0ba1a2c4bdae299120e4d7557f4b">serial_set_flow_control</a> (serial_t *obj, <a class="el" href="group__uart.html#gae88006c219f95bae663fe0f2a2561dd7">FlowControl</a> type, PinName rxflow, PinName txflow)</td></tr>
|
||
|
<tr class="memdesc:ga17cb0ba1a2c4bdae299120e4d7557f4b"><td class="mdescLeft"> </td><td class="mdescRight">uart autoflow contol setting. <a href="#ga17cb0ba1a2c4bdae299120e4d7557f4b">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga17cb0ba1a2c4bdae299120e4d7557f4b"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<p>uart functions </p>
|
||
|
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
||
|
<a class="anchor" id="gae88006c219f95bae663fe0f2a2561dd7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">enum <a class="el" href="group__uart.html#gae88006c219f95bae663fe0f2a2561dd7">FlowControl</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>UART FlowControl mode used by serial_set_flow_control. </p>
|
||
|
<table class="fieldtable">
|
||
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggae88006c219f95bae663fe0f2a2561dd7a2f840702ab35486ee6fb2a9c47cda1ce"></a>FlowControlNone </td><td class="fielddoc">
|
||
|
<p>none RTS/CTS </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="ggae88006c219f95bae663fe0f2a2561dd7a147f23a0288db0a3d93da040ef80247c"></a>FlowControlRTS </td><td class="fielddoc">
|
||
|
<p>RTS enable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="ggae88006c219f95bae663fe0f2a2561dd7a658dc07c550efee6dd57ded2c190dbcf"></a>FlowControlCTS </td><td class="fielddoc">
|
||
|
<p>CTS enable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="ggae88006c219f95bae663fe0f2a2561dd7a07762176ebd2a742b8691e25b7eb627e"></a>FlowControlRTSCTS </td><td class="fielddoc">
|
||
|
<p>RTS/CTS enable </p>
|
||
|
</td></tr>
|
||
|
</table>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga8dbaa98202e6883fc0398bcc14f582b7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">enum <a class="el" href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">SerialIrq</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>UART Interrupt enable/disable used by serial_irq_set. </p>
|
||
|
<table class="fieldtable">
|
||
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga8dbaa98202e6883fc0398bcc14f582b7ada2693bfed74737c8d61d4818bc6171f"></a>RxIrq </td><td class="fielddoc">
|
||
|
<p>RX IRQ enable/disable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="gga8dbaa98202e6883fc0398bcc14f582b7aa4066880713ec11ad8d574f89336aed0"></a>TxIrq </td><td class="fielddoc">
|
||
|
<p>TX IRQ enable/disable </p>
|
||
|
</td></tr>
|
||
|
</table>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga2c48912c12fd98a4f4faffbc7f20a9f6"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">enum <a class="el" href="group__uart.html#ga2c48912c12fd98a4f4faffbc7f20a9f6">SerialParity</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>UART Parity mode used by serial_format. </p>
|
||
|
<table class="fieldtable">
|
||
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga2c48912c12fd98a4f4faffbc7f20a9f6acc1b5f7583b642d0565d0b5c564ba353"></a>ParityNone </td><td class="fielddoc">
|
||
|
<p>parity disable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="gga2c48912c12fd98a4f4faffbc7f20a9f6aafeb42f20ebe23268f54485545776eb9"></a>ParityOdd </td><td class="fielddoc">
|
||
|
<p>odd parity enable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="gga2c48912c12fd98a4f4faffbc7f20a9f6a4a03b07aec589fbf62d4cc09aea5ef10"></a>ParityEven </td><td class="fielddoc">
|
||
|
<p>even paroty enable </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="gga2c48912c12fd98a4f4faffbc7f20a9f6a686de860a468d952d60d30eaf12ff8f6"></a>ParityForced1 </td><td class="fielddoc">
|
||
|
<p>same action with ParityOdd </p>
|
||
|
</td></tr>
|
||
|
<tr><td class="fieldname"><a class="anchor" id="gga2c48912c12fd98a4f4faffbc7f20a9f6ab95dcc23f911b83096e072255041f98f"></a>ParityForced0 </td><td class="fielddoc">
|
||
|
<p>same action with ParityEven </p>
|
||
|
</td></tr>
|
||
|
</table>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<h2 class="groupheader">Function Documentation</h2>
|
||
|
<a class="anchor" id="ga33a5f814c050396d17bde80505c93188"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_baud </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int </td>
|
||
|
<td class="paramname"><em>baudrate</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Set UART device baudrate. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">baudrate</td><td>Baud Rate Val, like 115200 (unit is HZ). </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga5348986db46756483d94b5040ab9a0a9"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_break_clear </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>disable UART break contol function. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gaf4e24d07fc05f2ce0cf59c61da149e01"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_break_set </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>enable UART break contol function. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga390a75da4b756c213661502dc71a0234"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_clear </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Clear Rx fifo. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gadd3983278709908656d97258002466e7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_format </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int </td>
|
||
|
<td class="paramname"><em>data_bits</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype"><a class="el" href="group__uart.html#ga2c48912c12fd98a4f4faffbc7f20a9f6">SerialParity</a> </td>
|
||
|
<td class="paramname"><em>parity</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int </td>
|
||
|
<td class="paramname"><em>stop_bits</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Set UART format. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">data_bits</td><td>data bits, this parameter can be one of the following values: <ul>
|
||
|
<li>7 </li>
|
||
|
<li>8 </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
<tr><td class="paramname">parity</td><td>this parameter can be one of the following values: <ul>
|
||
|
<li>ParityNone </li>
|
||
|
<li>ParityOdd </li>
|
||
|
<li>ParityEven </li>
|
||
|
<li>ParityForced1: same action with ParityOdd </li>
|
||
|
<li>ParityForced0: same action with ParityEven </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
<tr><td class="paramname">stop_bits</td><td>this parameter can be one of the following values: <ul>
|
||
|
<li>2 </li>
|
||
|
<li>1 </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga29829ef7c866e140b2fb738195be3020"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_free </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Deinitializes the UART device, include clock/function/interrupt/UART registers. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga6d3f8740a64b01ffc0ce607a638ece92"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int serial_getc </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>get one byte from UART. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname"></td><td>received character </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section note"><dt>Note</dt><dd>this function is asynchronous API. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga3096f72c7bb6c02936a2b5753ffe7157"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_init </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>tx</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>rx</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Initializes the UART device, include clock/function/interrupt/UART registers. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">tx</td><td>Tx PinName according to pinmux spec. </td></tr>
|
||
|
<tr><td class="paramname">rx</td><td>Rx PinName according to pinmux spec. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga7f22516de1ec2fca735606495ab1f869"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_irq_handler </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">uart_irq_handler </td>
|
||
|
<td class="paramname"><em>handler</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">uint32_t </td>
|
||
|
<td class="paramname"><em>id</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Set UART interrupt hander if needed. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">handler</td><td>interrupt callback function </td></tr>
|
||
|
<tr><td class="paramname">id</td><td>interrupt callback parameter </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gafefbd52507666563e36924676db7652e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_irq_set </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype"><a class="el" href="group__uart.html#ga8dbaa98202e6883fc0398bcc14f582b7">SerialIrq</a> </td>
|
||
|
<td class="paramname"><em>irq</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">uint32_t </td>
|
||
|
<td class="paramname"><em>enable</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Enable/Disable UART interrupt. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">irq</td><td>Tx or Rx interrupt, this parameter can be one of the following values: <ul>
|
||
|
<li>RxIrq </li>
|
||
|
<li>TxIrq </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
<tr><td class="paramname">enable</td><td>this parameter can be one of the following values: <ul>
|
||
|
<li>0 disable </li>
|
||
|
<li>1 enable </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gaf8be980153743b25bcbcff4c5855dbf3"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_pinout_tx </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>tx</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>set tx pinmux. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">tx</td><td>Tx PinName according to pinmux spec. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga25f76e4c233aa5298856d99ea3f4058e"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_putc </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int </td>
|
||
|
<td class="paramname"><em>c</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>send one byte use UART. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">c</td><td>the data to transmit. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section note"><dt>Note</dt><dd>this function is asynchronous API. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga0c9040624bb759fd5cd2bc10a60831bd"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int serial_readable </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>check if there is data in rx fifo. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">1</td><td>TRUE </td></tr>
|
||
|
<tr><td class="paramname">0</td><td>FALSE </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga17cb0ba1a2c4bdae299120e4d7557f4b"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void serial_set_flow_control </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype"><a class="el" href="group__uart.html#gae88006c219f95bae663fe0f2a2561dd7">FlowControl</a> </td>
|
||
|
<td class="paramname"><em>type</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>rxflow</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>txflow</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>uart autoflow contol setting. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">type</td><td>autoflow control type. </td></tr>
|
||
|
<tr><td class="paramname">rxflow</td><td>RTS pin. </td></tr>
|
||
|
<tr><td class="paramname">txflow</td><td>CTS pin. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">none</td><td></td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gadbfe8af954c543d045e9ca7b553578c8"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int serial_writable </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">serial_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>check if write data to tx fifo is permitted. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>uart object define in application software. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="retval"><dt>Return values</dt><dd>
|
||
|
<table class="retval">
|
||
|
<tr><td class="paramname">1</td><td>TRUE </td></tr>
|
||
|
<tr><td class="paramname">0</td><td>FALSE </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.11
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|