424 lines
21 KiB
HTML
424 lines
21 KiB
HTML
|
<!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" lang="en-US">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||
|
<meta name="generator" content="Doxygen 1.9.6"/>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
<title>Solar panel: mcc_generated_files/tmr0.c File Reference</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="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="resize.js"></script>
|
||
|
<script type="text/javascript" src="navtreedata.js"></script>
|
||
|
<script type="text/javascript" src="navtree.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 id="projectrow">
|
||
|
<td id="projectalign">
|
||
|
<div id="projectname">Solar panel
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.9.6 -->
|
||
|
<script type="text/javascript">
|
||
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||
|
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||
|
$(function() {
|
||
|
initMenu('',true,false,'search.php','Search');
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
});
|
||
|
/* @license-end */
|
||
|
</script>
|
||
|
<div id="main-nav"></div>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||
|
$(document).ready(function(){initNavTree('tmr0_8c.html',''); initResizable(); });
|
||
|
/* @license-end */
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- 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">
|
||
|
<div id="MSearchResults">
|
||
|
<div class="SRPage">
|
||
|
<div id="SRIndex">
|
||
|
<div id="SRResults"></div>
|
||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#func-members">Functions</a> |
|
||
|
<a href="#var-members">Variables</a> </div>
|
||
|
<div class="headertitle"><div class="title">tmr0.c File Reference</div></div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<div class="textblock"><code>#include <xc.h></code><br />
|
||
|
<code>#include "<a class="el" href="tmr0_8h_source.html">tmr0.h</a>"</code><br />
|
||
|
</div>
|
||
|
<p><a href="tmr0_8c_source.html">Go to the source code of this file.</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||
|
Functions</h2></td></tr>
|
||
|
<tr class="memitem:a73398a18b711af030af4db3c4c6c15e1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a73398a18b711af030af4db3c4c6c15e1">TMR0_Initialize</a> (void)</td></tr>
|
||
|
<tr class="separator:a73398a18b711af030af4db3c4c6c15e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a3e1b5e411afd874143ff241d08e52e07"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a3e1b5e411afd874143ff241d08e52e07">TMR0_StartTimer</a> (void)</td></tr>
|
||
|
<tr class="separator:a3e1b5e411afd874143ff241d08e52e07"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:afeaf0b9a17eeabda5d079bf63ed2b545"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#afeaf0b9a17eeabda5d079bf63ed2b545">TMR0_StopTimer</a> (void)</td></tr>
|
||
|
<tr class="separator:afeaf0b9a17eeabda5d079bf63ed2b545"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:abc520383c193d0d597a40bfa9de2a250"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#abc520383c193d0d597a40bfa9de2a250">TMR0_ReadTimer</a> (void)</td></tr>
|
||
|
<tr class="separator:abc520383c193d0d597a40bfa9de2a250"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a7842dca344326cf264fa7026d34256d5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a7842dca344326cf264fa7026d34256d5">TMR0_WriteTimer</a> (uint16_t timerVal)</td></tr>
|
||
|
<tr class="separator:a7842dca344326cf264fa7026d34256d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a61659c2dc0ff29595abe23b24cf81d14"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a61659c2dc0ff29595abe23b24cf81d14">TMR0_Reload</a> (void)</td></tr>
|
||
|
<tr class="separator:a61659c2dc0ff29595abe23b24cf81d14"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a8a465e070e24fe06a488f952b089886d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a8a465e070e24fe06a488f952b089886d">TMR0_ISR</a> (void)</td></tr>
|
||
|
<tr class="separator:a8a465e070e24fe06a488f952b089886d"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a1b6adc623040b0e791871a0f9652a67f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a1b6adc623040b0e791871a0f9652a67f">TMR0_SetInterruptHandler</a> (void(*InterruptHandler)(void))</td></tr>
|
||
|
<tr class="separator:a1b6adc623040b0e791871a0f9652a67f"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:aab6153f25bf68ecb07d33a269e5b8dc4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#aab6153f25bf68ecb07d33a269e5b8dc4">TMR0_DefaultInterruptHandler</a> (void)</td></tr>
|
||
|
<tr class="separator:aab6153f25bf68ecb07d33a269e5b8dc4"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table><table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
||
|
Variables</h2></td></tr>
|
||
|
<tr class="memitem:a809211677d0753d6397e04afdbb945a3"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#a809211677d0753d6397e04afdbb945a3">TMR0_InterruptHandler</a> )(void)</td></tr>
|
||
|
<tr class="separator:a809211677d0753d6397e04afdbb945a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:afefa19b0b4ed96c0c664ab681aa60b3c"><td class="memItemLeft" align="right" valign="top">volatile uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="tmr0_8c.html#afefa19b0b4ed96c0c664ab681aa60b3c">timer0ReloadVal</a></td></tr>
|
||
|
<tr class="separator:afefa19b0b4ed96c0c664ab681aa60b3c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<h2 class="groupheader">Function Documentation</h2>
|
||
|
<a id="aab6153f25bf68ecb07d33a269e5b8dc4" name="aab6153f25bf68ecb07d33a269e5b8dc4"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#aab6153f25bf68ecb07d33a269e5b8dc4">◆ </a></span>TMR0_DefaultInterruptHandler()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_DefaultInterruptHandler </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Default Timer Interrupt Handler</p>
|
||
|
<p>@Description This is the default Interrupt Handler function</p>
|
||
|
<p>@Preconditions Initialize the TMR0 module with interrupt before calling this isr.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns None </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00160">160</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a73398a18b711af030af4db3c4c6c15e1" name="a73398a18b711af030af4db3c4c6c15e1"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a73398a18b711af030af4db3c4c6c15e1">◆ </a></span>TMR0_Initialize()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_Initialize </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>Section: TMR0 APIs </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00067">67</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a8a465e070e24fe06a488f952b089886d" name="a8a465e070e24fe06a488f952b089886d"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a8a465e070e24fe06a488f952b089886d">◆ </a></span>TMR0_ISR()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_ISR </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Timer Interrupt Service Routine</p>
|
||
|
<p>@Description Timer Interrupt Service Routine is called by the Interrupt Manager.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 module with interrupt before calling this isr.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns None </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00136">136</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="abc520383c193d0d597a40bfa9de2a250" name="abc520383c193d0d597a40bfa9de2a250"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#abc520383c193d0d597a40bfa9de2a250">◆ </a></span>TMR0_ReadTimer()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">uint16_t TMR0_ReadTimer </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Reads the 16 bits TMR0 register value.</p>
|
||
|
<p>@Description This function reads the 16 bits TMR0 register value and return it.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 before calling this function.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns This function returns the 16 bits value of TMR0 register.</p>
|
||
|
<p>@Example <code> Initialize TMR0 module</code></p>
|
||
|
<p><code>Start TMR0 <a class="el" href="tmr0_8h.html#a3e1b5e411afd874143ff241d08e52e07">TMR0_StartTimer()</a>;</code></p>
|
||
|
<p><code>Read the current value of TMR0 if(0 == <a class="el" href="tmr0_8h.html#abc520383c193d0d597a40bfa9de2a250">TMR0_ReadTimer()</a>) { Do something else...</code></p>
|
||
|
<p><code>Reload the TMR value <a class="el" href="tmr0_8h.html#a61659c2dc0ff29595abe23b24cf81d14">TMR0_Reload()</a>; } </code> </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00109">109</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a61659c2dc0ff29595abe23b24cf81d14" name="a61659c2dc0ff29595abe23b24cf81d14"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a61659c2dc0ff29595abe23b24cf81d14">◆ </a></span>TMR0_Reload()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_Reload </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Reload the 16 bits value to TMR0 register.</p>
|
||
|
<p>@Description This function reloads the 16 bit value to TMR0 register. This function must be called to write initial value into TMR0 register.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 before calling this function.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns None</p>
|
||
|
<p>@Example <code> while(1) { if(TMR0IF) { Do something else...</code></p>
|
||
|
<p><code>clear the TMR0 interrupt flag TMR0IF = 0;</code></p>
|
||
|
<p><code>Reload the initial value of TMR0 <a class="el" href="tmr0_8h.html#a61659c2dc0ff29595abe23b24cf81d14">TMR0_Reload()</a>; } } </code> </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00129">129</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a1b6adc623040b0e791871a0f9652a67f" name="a1b6adc623040b0e791871a0f9652a67f"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a1b6adc623040b0e791871a0f9652a67f">◆ </a></span>TMR0_SetInterruptHandler()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_SetInterruptHandler </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void(*)(void) </td>
|
||
|
<td class="paramname"><em>InterruptHandler</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Set Timer Interrupt Handler</p>
|
||
|
<p>@Description This sets the function to be called during the ISR</p>
|
||
|
<p>@Preconditions Initialize the TMR0 module with interrupt before calling this.</p>
|
||
|
<p>@Param Address of function to be set</p>
|
||
|
<p>@Returns None </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00156">156</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a3e1b5e411afd874143ff241d08e52e07" name="a3e1b5e411afd874143ff241d08e52e07"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a3e1b5e411afd874143ff241d08e52e07">◆ </a></span>TMR0_StartTimer()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_StartTimer </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary This function starts the TMR0.</p>
|
||
|
<p>@Description This function starts the TMR0 operation. This function must be called after the initialization of TMR0.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 before calling this function.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns None</p>
|
||
|
<p>@Example <code> Initialize TMR0 module</code></p>
|
||
|
<p><code>Start TMR0 <a class="el" href="tmr0_8h.html#a3e1b5e411afd874143ff241d08e52e07">TMR0_StartTimer()</a>;</code></p>
|
||
|
<p><code>Do something else... </code> </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00097">97</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="afeaf0b9a17eeabda5d079bf63ed2b545" name="afeaf0b9a17eeabda5d079bf63ed2b545"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#afeaf0b9a17eeabda5d079bf63ed2b545">◆ </a></span>TMR0_StopTimer()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_StopTimer </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary This function stops the TMR0.</p>
|
||
|
<p>@Description This function stops the TMR0 operation. This function must be called after the start of TMR0.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 before calling this function.</p>
|
||
|
<p>@Param None</p>
|
||
|
<p>@Returns None</p>
|
||
|
<p>@Example <code> Initialize TMR0 module</code></p>
|
||
|
<p><code>Start TMR0 <a class="el" href="tmr0_8h.html#a3e1b5e411afd874143ff241d08e52e07">TMR0_StartTimer()</a>;</code></p>
|
||
|
<p><code>Do something else...</code></p>
|
||
|
<p><code>Stop TMR0; <a class="el" href="tmr0_8h.html#afeaf0b9a17eeabda5d079bf63ed2b545">TMR0_StopTimer()</a>; </code> </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00103">103</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a7842dca344326cf264fa7026d34256d5" name="a7842dca344326cf264fa7026d34256d5"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a7842dca344326cf264fa7026d34256d5">◆ </a></span>TMR0_WriteTimer()</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void TMR0_WriteTimer </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">uint16_t </td>
|
||
|
<td class="paramname"><em>timerVal</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>@Summary Writes the 16 bits value to TMR0 register.</p>
|
||
|
<p>@Description This function writes the 16 bits value to TMR0 register. This function must be called after the initialization of TMR0.</p>
|
||
|
<p>@Preconditions Initialize the TMR0 before calling this function.</p>
|
||
|
<p>@Param timerVal - Value to write into TMR0 register.</p>
|
||
|
<p>@Returns None</p>
|
||
|
<p>@Example <code> #define PERIOD 0x8000 #define ZERO 0x0000</code></p>
|
||
|
<p><code> while(1) { Read the TMR0 register if(ZERO == <a class="el" href="tmr0_8h.html#abc520383c193d0d597a40bfa9de2a250">TMR0_ReadTimer()</a>) { Do something else...</code></p>
|
||
|
<p><code>Write the TMR0 register TMR0_WriteTimer(PERIOD); }</code></p>
|
||
|
<p><code>Do something else... } </code> </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00122">122</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<h2 class="groupheader">Variable Documentation</h2>
|
||
|
<a id="afefa19b0b4ed96c0c664ab681aa60b3c" name="afefa19b0b4ed96c0c664ab681aa60b3c"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#afefa19b0b4ed96c0c664ab681aa60b3c">◆ </a></span>timer0ReloadVal</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">volatile uint16_t timer0ReloadVal</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00060">60</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a id="a809211677d0753d6397e04afdbb945a3" name="a809211677d0753d6397e04afdbb945a3"></a>
|
||
|
<h2 class="memtitle"><span class="permalink"><a href="#a809211677d0753d6397e04afdbb945a3">◆ </a></span>TMR0_InterruptHandler</h2>
|
||
|
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void(* TMR0_InterruptHandler) (void) </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void </td>
|
||
|
<td class="paramname"></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
<p>TMR0 Generated Driver File</p>
|
||
|
<p>@Company Microchip Technology Inc.</p>
|
||
|
<p>@File Name <a class="el" href="tmr0_8c.html">tmr0.c</a></p>
|
||
|
<p>@Summary This is the generated driver implementation file for the TMR0 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs</p>
|
||
|
<p>@Description This source file provides APIs for TMR0. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 Device : PIC18F97J60 Driver Version : 2.01 The generated drivers are tested against the following: Compiler : XC8 2.36 and above MPLAB : MPLAB X 6.00 Section: Included Files Section: Global Variables Definitions </p>
|
||
|
|
||
|
<p class="definition">Definition at line <a class="el" href="tmr0_8c_source.html#l00058">58</a> of file <a class="el" href="tmr0_8c_source.html">tmr0.c</a>.</p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div><!-- contents -->
|
||
|
</div><!-- doc-content -->
|
||
|
<!-- start footer part -->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="dir_0ad8aa10ae8c15a00cc43e117933779f.html">mcc_generated_files</a></li><li class="navelem"><a class="el" href="tmr0_8c.html">tmr0.c</a></li>
|
||
|
<li class="footer">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.6 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|