1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
arduinolibs/classDS3231RTC.html
Rhys Weatherley 52795520e2 Update docs
2015-04-06 09:30:30 +10:00

722 lines
54 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.6"/>
<title>ArduinoLibs: DS3231RTC Class 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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 style="padding-left: 0.5em;">
<div id="projectname">ArduinoLibs
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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&#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>
<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>
<!-- 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><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</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>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classDS3231RTC-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">DS3231RTC Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Communicates with a DS3231 realtime clock chip via I2C.
<a href="classDS3231RTC.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="DS3231RTC_8h_source.html">DS3231RTC.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for DS3231RTC:</div>
<div class="dyncontent">
<div class="center">
<img src="classDS3231RTC.png" usemap="#DS3231RTC_map" alt=""/>
<map id="DS3231RTC_map" name="DS3231RTC_map">
<area href="classRTC.html" title="Base class for realtime clock handlers. " alt="RTC" shape="rect" coords="0,0,81,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a45df320cabed4ea2d5c34b437eda7e9f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a45df320cabed4ea2d5c34b437eda7e9f">DS3231RTC</a> (<a class="el" href="classI2CMaster.html">I2CMaster</a> &amp;bus, uint8_t oneHzPin=255)</td></tr>
<tr class="memdesc:a45df320cabed4ea2d5c34b437eda7e9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attaches to a realtime clock slave device on <em>bus</em>. <a href="#a45df320cabed4ea2d5c34b437eda7e9f">More...</a><br/></td></tr>
<tr class="separator:a45df320cabed4ea2d5c34b437eda7e9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fa6fdd1f9e2b2b99be077c73639dce0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fa6fdd1f9e2b2b99be077c73639dce0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a2fa6fdd1f9e2b2b99be077c73639dce0">isRealTime</a> () const </td></tr>
<tr class="memdesc:a2fa6fdd1f9e2b2b99be077c73639dce0"><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 class="separator:a2fa6fdd1f9e2b2b99be077c73639dce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a180bea03bd68df8f696e529cd1582095"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a180bea03bd68df8f696e529cd1582095"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a180bea03bd68df8f696e529cd1582095">hasUpdates</a> ()</td></tr>
<tr class="memdesc:a180bea03bd68df8f696e529cd1582095"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if there are updates. <br/></td></tr>
<tr class="separator:a180bea03bd68df8f696e529cd1582095"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a2c448b152c401fb598c487ef0ed288"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a3a2c448b152c401fb598c487ef0ed288">readTime</a> (<a class="el" href="structRTCTime.html">RTCTime</a> *value)</td></tr>
<tr class="memdesc:a3a2c448b152c401fb598c487ef0ed288"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current time from the realtime clock into <em>value</em>. <a href="#a3a2c448b152c401fb598c487ef0ed288">More...</a><br/></td></tr>
<tr class="separator:a3a2c448b152c401fb598c487ef0ed288"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a498a1a37b78993ab52780198c5b4a9df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a498a1a37b78993ab52780198c5b4a9df">readDate</a> (<a class="el" href="structRTCDate.html">RTCDate</a> *value)</td></tr>
<tr class="memdesc:a498a1a37b78993ab52780198c5b4a9df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current date from the realtime clock into <em>value</em>. <a href="#a498a1a37b78993ab52780198c5b4a9df">More...</a><br/></td></tr>
<tr class="separator:a498a1a37b78993ab52780198c5b4a9df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9bee8f68f9e124562230175ca9d15c3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#ae9bee8f68f9e124562230175ca9d15c3">writeTime</a> (const <a class="el" href="structRTCTime.html">RTCTime</a> *value)</td></tr>
<tr class="memdesc:ae9bee8f68f9e124562230175ca9d15c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the time in the realtime clock to match <em>value</em>. <a href="#ae9bee8f68f9e124562230175ca9d15c3">More...</a><br/></td></tr>
<tr class="separator:ae9bee8f68f9e124562230175ca9d15c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a450a143514a5aa228f8ef7a23d83d036"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a450a143514a5aa228f8ef7a23d83d036">writeDate</a> (const <a class="el" href="structRTCDate.html">RTCDate</a> *value)</td></tr>
<tr class="memdesc:a450a143514a5aa228f8ef7a23d83d036"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the date in the realtime clock to match <em>value</em>. <a href="#a450a143514a5aa228f8ef7a23d83d036">More...</a><br/></td></tr>
<tr class="separator:a450a143514a5aa228f8ef7a23d83d036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab56929e759a49a90785729cceb72f2e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#aab56929e759a49a90785729cceb72f2e">readAlarm</a> (uint8_t alarmNum, <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *value)</td></tr>
<tr class="memdesc:aab56929e759a49a90785729cceb72f2e"><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="#aab56929e759a49a90785729cceb72f2e">More...</a><br/></td></tr>
<tr class="separator:aab56929e759a49a90785729cceb72f2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ed8945018024816600f709c6eb0c749"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a1ed8945018024816600f709c6eb0c749">writeAlarm</a> (uint8_t alarmNum, const <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *value)</td></tr>
<tr class="memdesc:a1ed8945018024816600f709c6eb0c749"><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="#a1ed8945018024816600f709c6eb0c749">More...</a><br/></td></tr>
<tr class="separator:a1ed8945018024816600f709c6eb0c749"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb8b36354f00ea0a862cce6b1805d4c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#adb8b36354f00ea0a862cce6b1805d4c0">setAlarm</a> (uint8_t alarmNum, const <a class="el" href="structRTCAlarm.html">RTCAlarm</a> *value)</td></tr>
<tr class="memdesc:adb8b36354f00ea0a862cce6b1805d4c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the alarm with index <em>alarmNum</em> from <em>value</em>. <a href="#adb8b36354f00ea0a862cce6b1805d4c0">More...</a><br/></td></tr>
<tr class="separator:adb8b36354f00ea0a862cce6b1805d4c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1dcb7897fd14ae745720a19fbe71e37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#ad1dcb7897fd14ae745720a19fbe71e37">readTemperature</a> ()</td></tr>
<tr class="memdesc:ad1dcb7897fd14ae745720a19fbe71e37"><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="#ad1dcb7897fd14ae745720a19fbe71e37">More...</a><br/></td></tr>
<tr class="separator:ad1dcb7897fd14ae745720a19fbe71e37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e9509219b2c7259accd68a55aaa5faf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf">enableAlarmInterrupts</a> ()</td></tr>
<tr class="memdesc:a0e9509219b2c7259accd68a55aaa5faf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the generation of interrupts for alarms 0 and 1. <a href="#a0e9509219b2c7259accd68a55aaa5faf">More...</a><br/></td></tr>
<tr class="separator:a0e9509219b2c7259accd68a55aaa5faf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a245a56a9396ef49a4e089d743c759cdb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a245a56a9396ef49a4e089d743c759cdb">disableAlarmInterrupts</a> ()</td></tr>
<tr class="memdesc:a245a56a9396ef49a4e089d743c759cdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the generation of interrupts for alarms 0 and 1. <a href="#a245a56a9396ef49a4e089d743c759cdb">More...</a><br/></td></tr>
<tr class="separator:a245a56a9396ef49a4e089d743c759cdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a5b3717ff65528de566c021eb821b94"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a6a5b3717ff65528de566c021eb821b94">firedAlarm</a> ()</td></tr>
<tr class="memdesc:a6a5b3717ff65528de566c021eb821b94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines which of alarms 0 or 1 have fired since the last call. <a href="#a6a5b3717ff65528de566c021eb821b94">More...</a><br/></td></tr>
<tr class="separator:a6a5b3717ff65528de566c021eb821b94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a032cf784eb82ccf6ff0a9745b47ac86b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a032cf784eb82ccf6ff0a9745b47ac86b">enable32kHzOutput</a> ()</td></tr>
<tr class="memdesc:a032cf784eb82ccf6ff0a9745b47ac86b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the 32 kHz output on the DS3231 chip. <a href="#a032cf784eb82ccf6ff0a9745b47ac86b">More...</a><br/></td></tr>
<tr class="separator:a032cf784eb82ccf6ff0a9745b47ac86b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c9c197c6f27c26e0cb9c5ddc95633c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a7c9c197c6f27c26e0cb9c5ddc95633c8">disable32kHzOutput</a> ()</td></tr>
<tr class="memdesc:a7c9c197c6f27c26e0cb9c5ddc95633c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the 32 kHz output on the DS3231 chip. <a href="#a7c9c197c6f27c26e0cb9c5ddc95633c8">More...</a><br/></td></tr>
<tr class="separator:a7c9c197c6f27c26e0cb9c5ddc95633c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0a0614c48d4f809fee6017cd7350372"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#ad0a0614c48d4f809fee6017cd7350372">enableAlarm</a> (uint8_t alarmNum)</td></tr>
<tr class="memdesc:ad0a0614c48d4f809fee6017cd7350372"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables a specific alarm. <a href="#ad0a0614c48d4f809fee6017cd7350372">More...</a><br/></td></tr>
<tr class="separator:ad0a0614c48d4f809fee6017cd7350372"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21e2667c53d30aa425043ec08a117c47"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDS3231RTC.html#a21e2667c53d30aa425043ec08a117c47">disableAlarm</a> (uint8_t alarmNum)</td></tr>
<tr class="memdesc:a21e2667c53d30aa425043ec08a117c47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables a specific alarm. <a href="#a21e2667c53d30aa425043ec08a117c47">More...</a><br/></td></tr>
<tr class="separator:a21e2667c53d30aa425043ec08a117c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classRTC"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classRTC')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classRTC.html">RTC</a></td></tr>
<tr class="memitem:ada31c5120d18d2dd2863b3d440308da2 inherit pub_methods_classRTC"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#ada31c5120d18d2dd2863b3d440308da2">RTC</a> ()</td></tr>
<tr class="memdesc:ada31c5120d18d2dd2863b3d440308da2 inherit pub_methods_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new realtime clock handler. <a href="#ada31c5120d18d2dd2863b3d440308da2">More...</a><br/></td></tr>
<tr class="separator:ada31c5120d18d2dd2863b3d440308da2 inherit pub_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfdebfb449710e44e11f9a3675e14fd8 inherit pub_methods_classRTC"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#acfdebfb449710e44e11f9a3675e14fd8">byteCount</a> () const </td></tr>
<tr class="memdesc:acfdebfb449710e44e11f9a3675e14fd8 inherit pub_methods_classRTC"><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="#acfdebfb449710e44e11f9a3675e14fd8">More...</a><br/></td></tr>
<tr class="separator:acfdebfb449710e44e11f9a3675e14fd8 inherit pub_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f47b10b436e3f9d36e04ec907579431 inherit pub_methods_classRTC"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a0f47b10b436e3f9d36e04ec907579431">readByte</a> (uint8_t offset)</td></tr>
<tr class="memdesc:a0f47b10b436e3f9d36e04ec907579431 inherit pub_methods_classRTC"><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="#a0f47b10b436e3f9d36e04ec907579431">More...</a><br/></td></tr>
<tr class="separator:a0f47b10b436e3f9d36e04ec907579431 inherit pub_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cab6397ec04b1e2b3feea5b3cd1f749 inherit pub_methods_classRTC"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a1cab6397ec04b1e2b3feea5b3cd1f749">writeByte</a> (uint8_t offset, uint8_t value)</td></tr>
<tr class="memdesc:a1cab6397ec04b1e2b3feea5b3cd1f749 inherit pub_methods_classRTC"><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="#a1cab6397ec04b1e2b3feea5b3cd1f749">More...</a><br/></td></tr>
<tr class="separator:a1cab6397ec04b1e2b3feea5b3cd1f749 inherit pub_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classRTC"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classRTC')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classRTC.html">RTC</a></td></tr>
<tr class="memitem:ab2ca0cbee608ec32d3d6e04d40298f11 inherit pub_types_classRTC"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#ab2ca0cbee608ec32d3d6e04d40298f11">DayOfWeek</a> { <br/>
&#160;&#160;<b>Monday</b> = 1,
<b>Tuesday</b>,
<b>Wednesday</b>,
<b>Thursday</b>,
<br/>
&#160;&#160;<b>Friday</b>,
<b>Saturday</b>,
<b>Sunday</b>
<br/>
}</td></tr>
<tr class="memdesc:ab2ca0cbee608ec32d3d6e04d40298f11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Day of the week corresponding to a date. <a href="classRTC.html#ab2ca0cbee608ec32d3d6e04d40298f11">More...</a><br/></td></tr>
<tr class="separator:ab2ca0cbee608ec32d3d6e04d40298f11 inherit pub_types_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classRTC"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classRTC')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classRTC.html">RTC</a></td></tr>
<tr class="memitem:adc29d7c43efc5a192d21965da5c3ee1d inherit pub_static_methods_classRTC"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#adc29d7c43efc5a192d21965da5c3ee1d">adjustDays</a> (<a class="el" href="structRTCDate.html">RTCDate</a> *date, uint8_t flags)</td></tr>
<tr class="memdesc:adc29d7c43efc5a192d21965da5c3ee1d inherit pub_static_methods_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjusts <em>date</em> up or down one day according to <em>flags</em>. <a href="#adc29d7c43efc5a192d21965da5c3ee1d">More...</a><br/></td></tr>
<tr class="separator:adc29d7c43efc5a192d21965da5c3ee1d inherit pub_static_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeca597e6e37a05716e664242f9cfc5f4 inherit pub_static_methods_classRTC"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#aeca597e6e37a05716e664242f9cfc5f4">adjustMonths</a> (<a class="el" href="structRTCDate.html">RTCDate</a> *date, uint8_t flags)</td></tr>
<tr class="memdesc:aeca597e6e37a05716e664242f9cfc5f4 inherit pub_static_methods_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjusts <em>date</em> up or down one month according to <em>flags</em>. <a href="#aeca597e6e37a05716e664242f9cfc5f4">More...</a><br/></td></tr>
<tr class="separator:aeca597e6e37a05716e664242f9cfc5f4 inherit pub_static_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31d10cb2f7cac8839bd4be2d858b802d inherit pub_static_methods_classRTC"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a31d10cb2f7cac8839bd4be2d858b802d">adjustYears</a> (<a class="el" href="structRTCDate.html">RTCDate</a> *date, uint8_t flags)</td></tr>
<tr class="memdesc:a31d10cb2f7cac8839bd4be2d858b802d inherit pub_static_methods_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjusts <em>date</em> up or down one year according to <em>flags</em>. <a href="#a31d10cb2f7cac8839bd4be2d858b802d">More...</a><br/></td></tr>
<tr class="separator:a31d10cb2f7cac8839bd4be2d858b802d inherit pub_static_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a525a9c1dad89613708f47a683eb316aa inherit pub_static_methods_classRTC"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classRTC.html#ab2ca0cbee608ec32d3d6e04d40298f11">DayOfWeek</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a525a9c1dad89613708f47a683eb316aa">dayOfWeek</a> (const <a class="el" href="structRTCDate.html">RTCDate</a> *date)</td></tr>
<tr class="memdesc:a525a9c1dad89613708f47a683eb316aa inherit pub_static_methods_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the day of the week corresponding to <em>date</em>. <a href="#a525a9c1dad89613708f47a683eb316aa">More...</a><br/></td></tr>
<tr class="separator:a525a9c1dad89613708f47a683eb316aa inherit pub_static_methods_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_attribs_classRTC"><td colspan="2" onclick="javascript:toggleInherit('pub_static_attribs_classRTC')"><img src="closed.png" alt="-"/>&#160;Static Public Attributes inherited from <a class="el" href="classRTC.html">RTC</a></td></tr>
<tr class="memitem:aee5ae8f600ee5296e65635c0d836fca3 inherit pub_static_attribs_classRTC"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee5ae8f600ee5296e65635c0d836fca3"></a>
static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#aee5ae8f600ee5296e65635c0d836fca3">ALARM_COUNT</a> = 4</td></tr>
<tr class="memdesc:aee5ae8f600ee5296e65635c0d836fca3 inherit pub_static_attribs_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of alarms that are supported by <a class="el" href="classRTC.html#ade282d7a60147c3f0269f1fcd59c8d66" title="Reads the details of the alarm with index alarmNum into value. ">RTC::readAlarm()</a> and <a class="el" href="classRTC.html#a0e96c91efd9e7a6340effdae3eadf17e" title="Updates the details of the alarm with index alarmNum from value. ">RTC::writeAlarm()</a>. <br/></td></tr>
<tr class="separator:aee5ae8f600ee5296e65635c0d836fca3 inherit pub_static_attribs_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ed5480b362a83f1f45c4d3bcf7c3bf8 inherit pub_static_attribs_classRTC"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ed5480b362a83f1f45c4d3bcf7c3bf8"></a>
static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a9ed5480b362a83f1f45c4d3bcf7c3bf8">NO_TEMPERATURE</a> = 32767</td></tr>
<tr class="memdesc:a9ed5480b362a83f1f45c4d3bcf7c3bf8 inherit pub_static_attribs_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Value that is returned from <a class="el" href="classRTC.html#aeca3c8387332e8cabfd09c1806276e5a" title="Reads the value of the temperature sensor and returns the temperature in quarters of a degree celcius...">readTemperature()</a> if the realtime clock chip cannot determine the temperature. <br/></td></tr>
<tr class="separator:a9ed5480b362a83f1f45c4d3bcf7c3bf8 inherit pub_static_attribs_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacbe3ebbf893685950b05327c11d5c37 inherit pub_static_attribs_classRTC"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aacbe3ebbf893685950b05327c11d5c37"></a>
static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#aacbe3ebbf893685950b05327c11d5c37">INCREMENT</a> = 0x0000</td></tr>
<tr class="memdesc:aacbe3ebbf893685950b05327c11d5c37 inherit pub_static_attribs_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment the day, month, or year in a call to <a class="el" href="classRTC.html#adc29d7c43efc5a192d21965da5c3ee1d" title="Adjusts date up or down one day according to flags. ">adjustDays()</a>, <a class="el" href="classRTC.html#aeca597e6e37a05716e664242f9cfc5f4" title="Adjusts date up or down one month according to flags. ">adjustMonths()</a>, or <a class="el" href="classRTC.html#a31d10cb2f7cac8839bd4be2d858b802d" title="Adjusts date up or down one year according to flags. ">adjustYears()</a>. <br/></td></tr>
<tr class="separator:aacbe3ebbf893685950b05327c11d5c37 inherit pub_static_attribs_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05b1bd1479afc80682abdd4f3e58dc6f inherit pub_static_attribs_classRTC"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05b1bd1479afc80682abdd4f3e58dc6f"></a>
static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a05b1bd1479afc80682abdd4f3e58dc6f">DECREMENT</a> = 0x0001</td></tr>
<tr class="memdesc:a05b1bd1479afc80682abdd4f3e58dc6f inherit pub_static_attribs_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrement the day, month, or year in a call to <a class="el" href="classRTC.html#adc29d7c43efc5a192d21965da5c3ee1d" title="Adjusts date up or down one day according to flags. ">adjustDays()</a>, <a class="el" href="classRTC.html#aeca597e6e37a05716e664242f9cfc5f4" title="Adjusts date up or down one month according to flags. ">adjustMonths()</a>, or <a class="el" href="classRTC.html#a31d10cb2f7cac8839bd4be2d858b802d" title="Adjusts date up or down one year according to flags. ">adjustYears()</a>. <br/></td></tr>
<tr class="separator:a05b1bd1479afc80682abdd4f3e58dc6f inherit pub_static_attribs_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02ace2d775063be9a99035851c9274eb inherit pub_static_attribs_classRTC"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02ace2d775063be9a99035851c9274eb"></a>
static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRTC.html#a02ace2d775063be9a99035851c9274eb">WRAP</a> = 0x0002</td></tr>
<tr class="memdesc:a02ace2d775063be9a99035851c9274eb inherit pub_static_attribs_classRTC"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrap around to the beginning of the current month/year rather than advance to the next one. <br/></td></tr>
<tr class="separator:a02ace2d775063be9a99035851c9274eb inherit pub_static_attribs_classRTC"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Communicates with a DS3231 realtime clock chip via I2C. </p>
<p>This class simplifies the process of reading and writing the time and date information in a DS3231 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 DS3231 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="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf" title="Enables the generation of interrupts for alarms 0 and 1. ">enableAlarmInterrupts()</a>. The <a class="el" href="classDS3231RTC.html#a6a5b3717ff65528de566c021eb821b94" 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.</p>
<p>The DS3231 uses a 2-digit year so this class is limited to dates between 2000 and 2099 inclusive.</p>
<p>The structure <a class="el" href="structRTCAlarm.html" title="Stores alarm information from a realtime clock chip. ">RTCAlarm</a> is used to read and write the alarms. It has a flags field which is analogous to the alarm mask bits found in the DS3231 manual. Bit 7 signals whether this is an alarm structure with settings for alarm 0 or 1 (as these are different, see manual).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classRTC.html" title="Base class for realtime clock handlers. ">RTC</a>, <a class="el" href="classDS3232RTC.html" title="Communicates with a DS3232 realtime clock chip via I2C. ">DS3232RTC</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="DS3231RTC_8h_source.html#l00035">35</a> of file <a class="el" href="DS3231RTC_8h_source.html">DS3231RTC.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a45df320cabed4ea2d5c34b437eda7e9f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS3231RTC::DS3231RTC </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="classDS3231RTC.html#a180bea03bd68df8f696e529cd1582095" title="Returns true if there are updates. ">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="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf" title="Enables the generation of interrupts for alarms 0 and 1. ">enableAlarmInterrupts()</a>, then <em>oneHzPin</em> must be 255.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a180bea03bd68df8f696e529cd1582095" title="Returns true if there are updates. ">hasUpdates()</a>, <a class="el" href="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf" title="Enables the generation of interrupts for alarms 0 and 1. ">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00125">125</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a7c9c197c6f27c26e0cb9c5ddc95633c8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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 DS3231 chip. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a032cf784eb82ccf6ff0a9745b47ac86b" title="Enables the 32 kHz output on the DS3231 chip. ">enable32kHzOutput()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00575">575</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a21e2667c53d30aa425043ec08a117c47"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::disableAlarm </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>alarmNum</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disables a specific alarm. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">alarmNum</td><td>The alarm to disable.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#ad0a0614c48d4f809fee6017cd7350372" title="Enables a specific alarm. ">enableAlarm()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00625">625</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a245a56a9396ef49a4e089d743c759cdb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf" title="Enables the generation of interrupts for alarms 0 and 1. ">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00508">508</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a032cf784eb82ccf6ff0a9745b47ac86b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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 DS3231 chip. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a7c9c197c6f27c26e0cb9c5ddc95633c8" title="Disables the 32 kHz output on the DS3231 chip. ">disable32kHzOutput()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00562">562</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ad0a0614c48d4f809fee6017cd7350372"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::enableAlarm </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>alarmNum</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables a specific alarm. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">alarmNum</td><td>The alarm to enable.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a21e2667c53d30aa425043ec08a117c47" title="Disables a specific alarm. ">disableAlarm()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00606">606</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a0e9509219b2c7259accd68a55aaa5faf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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="classDS3231RTC.html#a6a5b3717ff65528de566c021eb821b94" 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="classDS3231RTC.html#a6a5b3717ff65528de566c021eb821b94" 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="classDS3231RTC.html#a180bea03bd68df8f696e529cd1582095" title="Returns true if there are updates. ">hasUpdates()</a> reports that there is an update available.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a245a56a9396ef49a4e089d743c759cdb" title="Disables the generation of interrupts for alarms 0 and 1. ">disableAlarmInterrupts()</a>, <a class="el" href="classDS3231RTC.html#a6a5b3717ff65528de566c021eb821b94" 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="DS3231RTC_8cpp_source.html#l00494">494</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a6a5b3717ff65528de566c021eb821b94"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int DS3231RTC::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 DS3231.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a0e9509219b2c7259accd68a55aaa5faf" title="Enables the generation of interrupts for alarms 0 and 1. ">enableAlarmInterrupts()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00530">530</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aab56929e759a49a90785729cceb72f2e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </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="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a1ed8945018024816600f709c6eb0c749" 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="DS3231RTC_8cpp_source.html#l00280">280</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a498a1a37b78993ab52780198c5b4a9df"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </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="classDS3231RTC.html#a3a2c448b152c401fb598c487ef0ed288" 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="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a450a143514a5aa228f8ef7a23d83d036" title="Updates the date in the realtime clock to match value. ">writeDate()</a>, <a class="el" href="classDS3231RTC.html#a3a2c448b152c401fb598c487ef0ed288" 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="DS3231RTC_8cpp_source.html#l00228">228</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ad1dcb7897fd14ae745720a19fbe71e37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int DS3231RTC::readTemperature </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </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="DS3231RTC_8cpp_source.html#l00470">470</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3a2c448b152c401fb598c487ef0ed288"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads the current time from the realtime clock into <em>value</em>. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#ae9bee8f68f9e124562230175ca9d15c3" title="Updates the time in the realtime clock to match value. ">writeTime()</a>, <a class="el" href="classDS3231RTC.html#a498a1a37b78993ab52780198c5b4a9df" 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="DS3231RTC_8cpp_source.html#l00207">207</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="adb8b36354f00ea0a862cce6b1805d4c0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool DS3231RTC::setAlarm </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></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets 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>
<dl class="section return"><dt>Returns</dt><dd>Returns true if the alarm was set; false otherwise.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a1ed8945018024816600f709c6eb0c749" title="Updates the details of the alarm with index alarmNum from value. ">writeAlarm()</a> </dd></dl>
<p>Definition at line <a class="el" href="DS3231RTC_8cpp_source.html#l00408">408</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a1ed8945018024816600f709c6eb0c749"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </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="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#aab56929e759a49a90785729cceb72f2e" 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="DS3231RTC_8cpp_source.html#l00374">374</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a450a143514a5aa228f8ef7a23d83d036"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates the date in the realtime clock to match <em>value</em>. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a498a1a37b78993ab52780198c5b4a9df" title="Reads the current date from the realtime clock into value. ">readDate()</a>, <a class="el" href="classDS3231RTC.html#ae9bee8f68f9e124562230175ca9d15c3" 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="DS3231RTC_8cpp_source.html#l00266">266</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae9bee8f68f9e124562230175ca9d15c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void DS3231RTC::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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates the time in the realtime clock to match <em>value</em>. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classDS3231RTC.html#a3a2c448b152c401fb598c487ef0ed288" title="Reads the current time from the realtime clock into value. ">readTime()</a>, <a class="el" href="classDS3231RTC.html#a450a143514a5aa228f8ef7a23d83d036" 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="DS3231RTC_8cpp_source.html#l00252">252</a> of file <a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="DS3231RTC_8h_source.html">DS3231RTC.h</a></li>
<li><a class="el" href="DS3231RTC_8cpp_source.html">DS3231RTC.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Apr 6 2015 09:30:16 for ArduinoLibs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>