diff options
author | joeycastillo <joeycastillo@users.noreply.github.com> | 2022-01-27 15:51:46 +0000 |
---|---|---|
committer | joeycastillo <joeycastillo@users.noreply.github.com> | 2022-01-27 15:51:46 +0000 |
commit | bbf146166834b91cf72d36d81b9d5d1145dbc6f2 (patch) | |
tree | 3717dc40c37d9472fbc20dcdae78c0d1af5a0472 /group__uart.html | |
parent | c0090716995447bd59954c8a7e24cd5c20598f7a (diff) | |
download | Sensor-Watch-bbf146166834b91cf72d36d81b9d5d1145dbc6f2.tar.gz Sensor-Watch-bbf146166834b91cf72d36d81b9d5d1145dbc6f2.tar.bz2 Sensor-Watch-bbf146166834b91cf72d36d81b9d5d1145dbc6f2.zip |
deploy: 14e4562b7a44ab6882180b69145665d4920769ac
Diffstat (limited to 'group__uart.html')
-rw-r--r-- | group__uart.html | 249 |
1 files changed, 249 insertions, 0 deletions
diff --git a/group__uart.html b/group__uart.html new file mode 100644 index 00000000..d0c23375 --- /dev/null +++ b/group__uart.html @@ -0,0 +1,249 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>Sensor Watch: 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> +<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">Sensor Watch +  <span id="projectnumber">0.0.0</span> + </div> + <div id="projectbrief">A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.9.1 --> +<script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); +/* @license-end */ +</script> +<script type="text/javascript" src="menudata.js"></script> +<script type="text/javascript" src="menu.js"></script> +<script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +$(function() { + initMenu('',true,false,'search.php','Search'); + $(document).ready(function() { init_search(); }); +}); +/* @license-end */</script> +<div id="main-nav"></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="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">UART</div> </div> +</div><!--header--> +<div class="contents"> + +<p>This section covers functions related to the UART peripheral. +<a href="#details">More...</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:ga38e750d3e02939bf056fde77f4ef6235"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga38e750d3e02939bf056fde77f4ef6235">watch_enable_uart</a> (const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud)</td></tr> +<tr class="memdesc:ga38e750d3e02939bf056fde77f4ef6235"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the debug UART. <a href="group__uart.html#ga38e750d3e02939bf056fde77f4ef6235">More...</a><br /></td></tr> +<tr class="separator:ga38e750d3e02939bf056fde77f4ef6235"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga5d62683298c511f24adaab4bf6615c50"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga5d62683298c511f24adaab4bf6615c50">watch_uart_puts</a> (char *s)</td></tr> +<tr class="memdesc:ga5d62683298c511f24adaab4bf6615c50"><td class="mdescLeft"> </td><td class="mdescRight">Transmits a string of bytes on the UART's TX pin. <a href="group__uart.html#ga5d62683298c511f24adaab4bf6615c50">More...</a><br /></td></tr> +<tr class="separator:ga5d62683298c511f24adaab4bf6615c50"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga0c400bfcd52bb71e8de62c5ab2373db6"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga0c400bfcd52bb71e8de62c5ab2373db6">watch_uart_getc</a> (void)</td></tr> +<tr class="memdesc:ga0c400bfcd52bb71e8de62c5ab2373db6"><td class="mdescLeft"> </td><td class="mdescRight">Receives a single byte from the UART's RX pin. <a href="group__uart.html#ga0c400bfcd52bb71e8de62c5ab2373db6">More...</a><br /></td></tr> +<tr class="separator:ga0c400bfcd52bb71e8de62c5ab2373db6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:gab9e48ca472abf422d1e6389f371d8fbf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#gab9e48ca472abf422d1e6389f371d8fbf">__attribute__</a> ((deprecated("Use <a class="el" href="group__uart.html#ga38e750d3e02939bf056fde77f4ef6235">watch_enable_uart</a> to enable the UART."))) void watch_enable_debug_uart(uint32_t baud)</td></tr> +<tr class="memdesc:gab9e48ca472abf422d1e6389f371d8fbf"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the debug UART. <a href="group__uart.html#gab9e48ca472abf422d1e6389f371d8fbf">More...</a><br /></td></tr> +<tr class="separator:gab9e48ca472abf422d1e6389f371d8fbf"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga42455c49e1756fc2eabbabec6f0bd530"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga42455c49e1756fc2eabbabec6f0bd530">__attribute__</a> ((deprecated("Use <a class="el" href="group__uart.html#ga5d62683298c511f24adaab4bf6615c50">watch_uart_puts</a> to print to the UART, or printf to log debug messages over USB."))) void watch_debug_putc(char c)</td></tr> +<tr class="memdesc:ga42455c49e1756fc2eabbabec6f0bd530"><td class="mdescLeft"> </td><td class="mdescRight">Outputs a single character on the debug UART. <a href="group__uart.html#ga42455c49e1756fc2eabbabec6f0bd530">More...</a><br /></td></tr> +<tr class="separator:ga42455c49e1756fc2eabbabec6f0bd530"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> +<p>This section covers functions related to the UART peripheral. </p> +<h2 class="groupheader">Function Documentation</h2> +<a id="gab9e48ca472abf422d1e6389f371d8fbf"></a> +<h2 class="memtitle"><span class="permalink"><a href="#gab9e48ca472abf422d1e6389f371d8fbf">◆ </a></span>__attribute__() <span class="overload">[1/2]</span></h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">__attribute__ </td> + <td>(</td> + <td class="paramtype">(deprecated("Use <a class="el" href="group__uart.html#ga38e750d3e02939bf056fde77f4ef6235">watch_enable_uart</a> to enable the UART.")) </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Initializes the debug UART. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">baud</td><td>The baud rate </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a id="ga42455c49e1756fc2eabbabec6f0bd530"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ga42455c49e1756fc2eabbabec6f0bd530">◆ </a></span>__attribute__() <span class="overload">[2/2]</span></h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">__attribute__ </td> + <td>(</td> + <td class="paramtype">(deprecated("Use <a class="el" href="group__uart.html#ga5d62683298c511f24adaab4bf6615c50">watch_uart_puts</a> to print to the UART, or printf to log debug messages over USB.")) </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Outputs a single character on the debug UART. </p> +<p>Outputs a string on the debug UART.</p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">c</td><td>The character you wish to output.</td></tr> + <tr><td class="paramname">s</td><td>A null-terminated string. </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a id="ga38e750d3e02939bf056fde77f4ef6235"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ga38e750d3e02939bf056fde77f4ef6235">◆ </a></span>watch_enable_uart()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void watch_enable_uart </td> + <td>(</td> + <td class="paramtype">const uint8_t </td> + <td class="paramname"><em>tx_pin</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const uint8_t </td> + <td class="paramname"><em>rx_pin</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint32_t </td> + <td class="paramname"><em>baud</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Initializes the debug UART. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">tx_pin</td><td>The pin the watch will use to transmit, or 0 for a receive-only UART. If specified, must be either A2 or A4. </td></tr> + <tr><td class="paramname">rx_pin</td><td>The pin the watch will use to receive, or 0 for a transmit-only UART. If specified, must be A1, A2, A3 or A4 (pin A0 cannot receive UART data). </td></tr> + <tr><td class="paramname">baud</td><td>The baud rate for the UART. A typical value is 19200. </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +<a id="ga0c400bfcd52bb71e8de62c5ab2373db6"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ga0c400bfcd52bb71e8de62c5ab2373db6">◆ </a></span>watch_uart_getc()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">char watch_uart_getc </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Receives a single byte from the UART's RX pin. </p> +<dl class="section return"><dt>Returns</dt><dd>the received byte. </dd></dl> +<dl class="section note"><dt>Note</dt><dd>This method will block until a byte is received! </dd></dl> + +</div> +</div> +<a id="ga5d62683298c511f24adaab4bf6615c50"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ga5d62683298c511f24adaab4bf6615c50">◆ </a></span>watch_uart_puts()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void watch_uart_puts </td> + <td>(</td> + <td class="paramtype">char * </td> + <td class="paramname"><em>s</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Transmits a string of bytes on the UART's TX pin. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">s</td><td>A null-terminated string containing the bytes you wish to transmit. </td></tr> + </table> + </dd> +</dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 +</small></address> +</body> +</html> |