1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
arduinolibs/classDS3232RTC.html
Rhys Weatherley a108e5742e Update docs
2012-06-13 15:23:00 +10:00

604 lines
39 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"/>
<title>ArduinoLibs: DS3232RTC Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">ArduinoLibs</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">DS3232RTC Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="DS3232RTC" --><!-- doxytag: inherits="RTC" -->
<p>Communicates with a DS3232 realtime clock chip via I2C.
<a href="classDS3232RTC.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="DS3232RTC_8h_source.html">DS3232RTC.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for DS3232RTC:</div>
<div class="dyncontent">
<div class="center">
<img src="classDS3232RTC.png" usemap="#DS3232RTC_map" alt=""/>
<map id="DS3232RTC_map" name="DS3232RTC_map">
<area href="classRTC.html" title="Base class for realtime clock handlers." alt="RTC" shape="rect" coords="0,0,81,24"/>
</map>
</div></div>
<p><a href="classDS3232RTC-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#aa959454ae01b11c48d6ec7ec192b4ccb">DS3232RTC</a> (<a class="el" href="classI2CMaster.html">I2CMaster</a> &amp;bus, uint8_t oneHzPin=255)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attaches to a realtime clock slave device on <em>bus</em>. <a href="#aa959454ae01b11c48d6ec7ec192b4ccb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc5908a3743afb4c26bd75e22cad87a4"></a><!-- doxytag: member="DS3232RTC::isRealTime" ref="acc5908a3743afb4c26bd75e22cad87a4" args="() const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#acc5908a3743afb4c26bd75e22cad87a4">isRealTime</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the realtime clock is on the I2C bus; false if the time and date are simulated. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc">hasUpdates</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the realtime clock has updated since the last call to this function. <a href="#a619ffee1bc013c9ddf4ae415115798bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747">readTime</a> (<a class="el" href="structRTCTime.html">RTCTime</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current time from the realtime clock into <em>value</em>. <a href="#af89e68c68f1c4b7e94286f800b5b2747"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#ab03358e3b5996e38d766e2f9f6ab62ca">readDate</a> (<a class="el" href="structRTCDate.html">RTCDate</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current date from the realtime clock into <em>value</em>. <a href="#ab03358e3b5996e38d766e2f9f6ab62ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#ab0ca13a8b80da856b37fc53b84e27c78">writeTime</a> (const <a class="el" href="structRTCTime.html">RTCTime</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the time in the realtime clock to match <em>value</em>. <a href="#ab0ca13a8b80da856b37fc53b84e27c78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a31c004a90c724979d8267c31f2dbf5ed">writeDate</a> (const <a class="el" href="structRTCDate.html">RTCDate</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the date in the realtime clock to match <em>value</em>. <a href="#a31c004a90c724979d8267c31f2dbf5ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a09c7073c687dcbbc423baf48074c7873">readAlarm</a> (uint8_t alarmNum, <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the details of the alarm with index <em>alarmNum</em> into <em>value</em>. <a href="#a09c7073c687dcbbc423baf48074c7873"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a8b0a65e0ac479aec8fad6ca3147dbe75">writeAlarm</a> (uint8_t alarmNum, const <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the details of the alarm with index <em>alarmNum</em> from <em>value</em>. <a href="#a8b0a65e0ac479aec8fad6ca3147dbe75"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e">byteCount</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. <a href="#a1319fe936dcb7e9d6bdf200b77a94f8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a5ba83a3ef7d65d45c2f3241afdd8fef7">readByte</a> (uint8_t offset)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the byte at <em>offset</em> within the realtime clock's non-volatile memory. <a href="#a5ba83a3ef7d65d45c2f3241afdd8fef7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a9acebf12c5cecdd6d84e0ff9ed41765a">writeByte</a> (uint8_t offset, uint8_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes <em>value</em> to <em>offset</em> within the realtime clock's non-volatile memory. <a href="#a9acebf12c5cecdd6d84e0ff9ed41765a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a0faf40c25ab019a326a60f301c2bb41b">readTemperature</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. <a href="#a0faf40c25ab019a326a60f301c2bb41b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9">enableAlarmInterrupts</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the generation of interrupts for alarms 0 and 1. <a href="#ab91e79271a1f8e75b07bddbb04445dc9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a225b8c62d617aa1b7be7d20e8a033be9">disableAlarmInterrupts</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the generation of interrupts for alarms 0 and 1. <a href="#a225b8c62d617aa1b7be7d20e8a033be9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3">firedAlarm</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines which of alarms 0 or 1 have fired since the last call. <a href="#a79649f100a4562b9c1ba7c69e85cbca3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#a3966de6f4241d86f198a8b9dd5e7e59a">enable32kHzOutput</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the 32 kHz output on the DS3232 chip. <a href="#a3966de6f4241d86f198a8b9dd5e7e59a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3232RTC.html#ada732bae42fc2833e59ae293aa27ddcb">disable32kHzOutput</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the 32 kHz output on the DS3232 chip. <a href="#ada732bae42fc2833e59ae293aa27ddcb"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Communicates with a DS3232 realtime clock chip via I2C. </p>
<p>This class simplifies the process of reading and writing the time and date information in a DS3232 realtime clock chip. The class also provides support for reading and writing information about alarms and other clock settings.</p>
<p>If there is no DS3232 chip on the I2C bus, this class will fall back to the <a class="el" href="classRTC.html" title="Base class for realtime clock handlers.">RTC</a> class to simulate the current time and date based on the value of millis().</p>
<p>Alarms 0 and 1 can be set to generate an interrupt when they fire using <a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9" title="Enables the generation of interrupts for alarms 0 and 1.">enableAlarmInterrupts()</a>. The <a class="el" href="classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3" title="Determines which of alarms 0 or 1 have fired since the last call.">firedAlarm()</a> function can be used to determine which alarm has fired. Alarms 2 and 3 cannot be monitored with interrupts.</p>
<p>The DS3232 uses a 2-digit year so this class is limited to dates between 2000 and 2099 inclusive.</p>
<p>Note: if this class has not been used with the DS3232 chip before, then the contents of NVRAM will be cleared. Any previous contents will be lost.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRTC.html" title="Base class for realtime clock handlers.">RTC</a>, <a class="el" href="classDS1307RTC.html" title="Communicates with a DS1307 realtime clock chip via I2C.">DS1307RTC</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8h_source.html#l00030">30</a> of file <a class="el" href="DS3232RTC_8h_source.html">DS3232RTC.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa959454ae01b11c48d6ec7ec192b4ccb"></a><!-- doxytag: member="DS3232RTC::DS3232RTC" ref="aa959454ae01b11c48d6ec7ec192b4ccb" args="(I2CMaster &amp;bus, uint8_t oneHzPin=255)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS3232RTC::DS3232RTC </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classI2CMaster.html">I2CMaster</a> &amp;&#160;</td>
<td class="paramname"><em>bus</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>oneHzPin</em> = <code>255</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Attaches to a realtime clock slave device on <em>bus</em>. </p>
<p>If <em>oneHzPin</em> is not 255, then it indicates a digital input pin that is connected to the 1 Hz square wave output on the realtime clock. This input is used by <a class="el" href="classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc" title="Returns true if the realtime clock has updated since the last call to this function.">hasUpdates()</a> to determine if the time information has changed in a non-trivial manner.</p>
<p>If you wish to use <a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9" title="Enables the generation of interrupts for alarms 0 and 1.">enableAlarmInterrupts()</a>, then <em>oneHzPin</em> must be 255.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc" title="Returns true if the realtime clock has updated since the last call to this function.">hasUpdates()</a>, <a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9" title="Enables the generation of interrupts for alarms 0 and 1.">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00126">126</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1319fe936dcb7e9d6bdf200b77a94f8e"></a><!-- doxytag: member="DS3232RTC::byteCount" ref="a1319fe936dcb7e9d6bdf200b77a94f8e" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int DS3232RTC::byteCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings, excluding storage used by alarms. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a5ba83a3ef7d65d45c2f3241afdd8fef7" title="Reads the byte at offset within the realtime clock&#39;s non-volatile memory.">readByte()</a>, <a class="el" href="classDS3232RTC.html#a9acebf12c5cecdd6d84e0ff9ed41765a" title="Writes value to offset within the realtime clock&#39;s non-volatile memory.">writeByte()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#acfdebfb449710e44e11f9a3675e14fd8">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00335">335</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ada732bae42fc2833e59ae293aa27ddcb"></a><!-- doxytag: member="DS3232RTC::disable32kHzOutput" ref="ada732bae42fc2833e59ae293aa27ddcb" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::disable32kHzOutput </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Disables the 32 kHz output on the DS3232 chip. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a3966de6f4241d86f198a8b9dd5e7e59a" title="Enables the 32 kHz output on the DS3232 chip.">enable32kHzOutput()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00458">458</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a225b8c62d617aa1b7be7d20e8a033be9"></a><!-- doxytag: member="DS3232RTC::disableAlarmInterrupts" ref="a225b8c62d617aa1b7be7d20e8a033be9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::disableAlarmInterrupts </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Disables the generation of interrupts for alarms 0 and 1. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9" title="Enables the generation of interrupts for alarms 0 and 1.">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00393">393</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3966de6f4241d86f198a8b9dd5e7e59a"></a><!-- doxytag: member="DS3232RTC::enable32kHzOutput" ref="a3966de6f4241d86f198a8b9dd5e7e59a" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::enable32kHzOutput </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enables the 32 kHz output on the DS3232 chip. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#ada732bae42fc2833e59ae293aa27ddcb" title="Disables the 32 kHz output on the DS3232 chip.">disable32kHzOutput()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00444">444</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ab91e79271a1f8e75b07bddbb04445dc9"></a><!-- doxytag: member="DS3232RTC::enableAlarmInterrupts" ref="ab91e79271a1f8e75b07bddbb04445dc9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::enableAlarmInterrupts </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enables the generation of interrupts for alarms 0 and 1. </p>
<p>When the interrupt occurs, use <a class="el" href="classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3" title="Determines which of alarms 0 or 1 have fired since the last call.">firedAlarm()</a> to determine which alarm has fired. The application is responsible for implementing the interrupt service routine to watch for the interrupt.</p>
<p>Note: this function does nothing if the 1 Hz pin was enabled in the constructor, but <a class="el" href="classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3" title="Determines which of alarms 0 or 1 have fired since the last call.">firedAlarm()</a> can still be used to determine which alarm has fired when <a class="el" href="classDS3232RTC.html#a619ffee1bc013c9ddf4ae415115798bc" title="Returns true if the realtime clock has updated since the last call to this function.">hasUpdates()</a> reports that there is an update available.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a225b8c62d617aa1b7be7d20e8a033be9" title="Disables the generation of interrupts for alarms 0 and 1.">disableAlarmInterrupts()</a>, <a class="el" href="classDS3232RTC.html#a79649f100a4562b9c1ba7c69e85cbca3" title="Determines which of alarms 0 or 1 have fired since the last call.">firedAlarm()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00380">380</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a79649f100a4562b9c1ba7c69e85cbca3"></a><!-- doxytag: member="DS3232RTC::firedAlarm" ref="a79649f100a4562b9c1ba7c69e85cbca3" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int DS3232RTC::firedAlarm </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determines which of alarms 0 or 1 have fired since the last call. </p>
<p>Returns 0 if alarm 0 has fired, 1 if alarm 1 has fired, 2 if both alarms have fired, or -1 if neither alarm has fired.</p>
<p>The fired alarm state will be cleared, ready for the next call.</p>
<p>This function cannot be used to determine if alarms 2 or 3 have fired as they are stored in NVRAM and are not handled specially by the DS3232.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#ab91e79271a1f8e75b07bddbb04445dc9" title="Enables the generation of interrupts for alarms 0 and 1.">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00416">416</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a619ffee1bc013c9ddf4ae415115798bc"></a><!-- doxytag: member="DS3232RTC::hasUpdates" ref="a619ffee1bc013c9ddf4ae415115798bc" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool DS3232RTC::hasUpdates </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns true if the realtime clock has updated since the last call to this function. </p>
<p>The default implementation returns true, indicating that an update is always available to be read. </p>
<p>Reimplemented from <a class="el" href="classRTC.html#a3690761f29654a2c9e676fcbfa32dd30">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00166">166</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a09c7073c687dcbbc423baf48074c7873"></a><!-- doxytag: member="DS3232RTC::readAlarm" ref="a09c7073c687dcbbc423baf48074c7873" args="(uint8_t alarmNum, RTCAlarm *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::readAlarm </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>alarmNum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structRTCAlarm.html">RTCAlarm</a> *&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads the details of the alarm with index <em>alarmNum</em> into <em>value</em>. </p>
<p>The <em>alarmNum</em> parameter must be between 0 and <a class="el" href="classRTC.html#aee5ae8f600ee5296e65635c0d836fca3">ALARM_COUNT</a> - 1.</p>
<p>Alarm details are stored at the end of the realtime clock's non-volatile memory.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a8b0a65e0ac479aec8fad6ca3147dbe75" title="Updates the details of the alarm with index alarmNum from value.">writeAlarm()</a>, alarmCount() </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#ade282d7a60147c3f0269f1fcd59c8d66">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00278">278</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5ba83a3ef7d65d45c2f3241afdd8fef7"></a><!-- doxytag: member="DS3232RTC::readByte" ref="a5ba83a3ef7d65d45c2f3241afdd8fef7" args="(uint8_t offset)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t DS3232RTC::readByte </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>offset</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads the byte at <em>offset</em> within the realtime clock's non-volatile memory. </p>
<p>The <em>offset</em> parameter must be between 0 and <a class="el" href="classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e" title="Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...">byteCount()</a> - 1.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a9acebf12c5cecdd6d84e0ff9ed41765a" title="Writes value to offset within the realtime clock&#39;s non-volatile memory.">writeByte()</a>, <a class="el" href="classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e" title="Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...">byteCount()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#a0f47b10b436e3f9d36e04ec907579431">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00340">340</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ab03358e3b5996e38d766e2f9f6ab62ca"></a><!-- doxytag: member="DS3232RTC::readDate" ref="ab03358e3b5996e38d766e2f9f6ab62ca" args="(RTCDate *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::readDate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structRTCDate.html">RTCDate</a> *&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads the current date from the realtime clock into <em>value</em>. </p>
<p>The time should be read first with <a class="el" href="classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747" title="Reads the current time from the realtime clock into value.">readTime()</a> as the default implementation only advances the date when the time is read and it crosses midnight.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a31c004a90c724979d8267c31f2dbf5ed" title="Updates the date in the realtime clock to match value.">writeDate()</a>, <a class="el" href="classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747" title="Reads the current time from the realtime clock into value.">readTime()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#aa1e21bf42ebd4456919744ae0f4f631e">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00225">225</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a0faf40c25ab019a326a60f301c2bb41b"></a><!-- doxytag: member="DS3232RTC::readTemperature" ref="a0faf40c25ab019a326a60f301c2bb41b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int DS3232RTC::readTemperature </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius. </p>
<p>Returns the value NO_TEMPERATURE if the realtime clock chip cannot determine the temperature. </p>
<p>Reimplemented from <a class="el" href="classRTC.html#aeca3c8387332e8cabfd09c1806276e5a">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00356">356</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af89e68c68f1c4b7e94286f800b5b2747"></a><!-- doxytag: member="DS3232RTC::readTime" ref="af89e68c68f1c4b7e94286f800b5b2747" args="(RTCTime *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::readTime </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structRTCTime.html">RTCTime</a> *&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads the current time from the realtime clock into <em>value</em>. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#ab0ca13a8b80da856b37fc53b84e27c78" title="Updates the time in the realtime clock to match value.">writeTime()</a>, <a class="el" href="classDS3232RTC.html#ab03358e3b5996e38d766e2f9f6ab62ca" title="Reads the current date from the realtime clock into value.">readDate()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#aaf0a5c1f32f210a49718d148620b5bec">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00205">205</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a8b0a65e0ac479aec8fad6ca3147dbe75"></a><!-- doxytag: member="DS3232RTC::writeAlarm" ref="a8b0a65e0ac479aec8fad6ca3147dbe75" args="(uint8_t alarmNum, const RTCAlarm *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::writeAlarm </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>alarmNum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Updates the details of the alarm with index <em>alarmNum</em> from <em>value</em>. </p>
<p>The <em>alarmNum</em> parameter must be between 0 and <a class="el" href="classRTC.html#aee5ae8f600ee5296e65635c0d836fca3">ALARM_COUNT</a> - 1.</p>
<p>Alarm details are stored at the end of the realtime clock's non-volatile memory.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a09c7073c687dcbbc423baf48074c7873" title="Reads the details of the alarm with index alarmNum into value.">readAlarm()</a>, alarmCount() </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#a0e96c91efd9e7a6340effdae3eadf17e">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00298">298</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a9acebf12c5cecdd6d84e0ff9ed41765a"></a><!-- doxytag: member="DS3232RTC::writeByte" ref="a9acebf12c5cecdd6d84e0ff9ed41765a" args="(uint8_t offset, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::writeByte </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes <em>value</em> to <em>offset</em> within the realtime clock's non-volatile memory. </p>
<p>The <em>offset</em> parameter must be between 0 and <a class="el" href="classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e" title="Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...">byteCount()</a> - 1.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#a5ba83a3ef7d65d45c2f3241afdd8fef7" title="Reads the byte at offset within the realtime clock&#39;s non-volatile memory.">readByte()</a>, <a class="el" href="classDS3232RTC.html#a1319fe936dcb7e9d6bdf200b77a94f8e" title="Returns the number of bytes of non-volatile memory that can be used for storage of arbitrary settings...">byteCount()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#a1cab6397ec04b1e2b3feea5b3cd1f749">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00348">348</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a31c004a90c724979d8267c31f2dbf5ed"></a><!-- doxytag: member="DS3232RTC::writeDate" ref="a31c004a90c724979d8267c31f2dbf5ed" args="(const RTCDate *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::writeDate </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structRTCDate.html">RTCDate</a> *&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Updates the date in the realtime clock to match <em>value</em>. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#ab03358e3b5996e38d766e2f9f6ab62ca" title="Reads the current date from the realtime clock into value.">readDate()</a>, <a class="el" href="classDS3232RTC.html#ab0ca13a8b80da856b37fc53b84e27c78" title="Updates the time in the realtime clock to match value.">writeTime()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#ae667600d05c8e7b06a93574dd068a4d7">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00264">264</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ab0ca13a8b80da856b37fc53b84e27c78"></a><!-- doxytag: member="DS3232RTC::writeTime" ref="ab0ca13a8b80da856b37fc53b84e27c78" args="(const RTCTime *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3232RTC::writeTime </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structRTCTime.html">RTCTime</a> *&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Updates the time in the realtime clock to match <em>value</em>. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDS3232RTC.html#af89e68c68f1c4b7e94286f800b5b2747" title="Reads the current time from the realtime clock into value.">readTime()</a>, <a class="el" href="classDS3232RTC.html#a31c004a90c724979d8267c31f2dbf5ed" title="Updates the date in the realtime clock to match value.">writeDate()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classRTC.html#a102e2ec15bf0273d8f7e9ce4b6dcc96e">RTC</a>.</p>
<p>Definition at line <a class="el" href="DS3232RTC_8cpp_source.html#l00250">250</a> of file <a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="DS3232RTC_8h_source.html">DS3232RTC.h</a></li>
<li><a class="el" href="DS3232RTC_8cpp_source.html">DS3232RTC.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></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>
<hr class="footer"/><address class="footer"><small>Generated on Wed Jun 13 2012 15:22:30 for ArduinoLibs by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>