Skip to content

Commit

Permalink
update for LazuriteIDE Feb,08,2017 version.
Browse files Browse the repository at this point in the history
  • Loading branch information
NaotakaSaito committed Feb 9, 2017
1 parent c05b6bf commit c8d00ff
Show file tree
Hide file tree
Showing 9 changed files with 970 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
_vti_pvt/
_vti_cnf/
desktop.ini
/contents/data
Binary file added contents/data/bnimg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions contents/data/redirect.html
@@ -0,0 +1 @@
<meta http-equiv="refresh" content="1;URL=http://www.lapis-semi.com/lazurite-jp/lazurite/10675.html">
39 changes: 28 additions & 11 deletions contents/reference/Lazurite_Reference.html
Expand Up @@ -79,14 +79,7 @@
}
.auto-style23 {
color: #006CD8;
font-size: large;
}
.auto-style24 {
color: #666666;
font-size: large;
}
.auto-style25 {
text-decoration: none;
font-size: small;
}
.auto-style26 {
font-size: small;
Expand Down Expand Up @@ -275,8 +268,14 @@ <h2>データFlash※</h2>
<br/>
<br/>
&nbsp;
<a href="serial.html"target="_blank"><span class="auto-style23">
非同期シリアル通信 Serial</span><a href="serial.html"target="_blank" class="auto-style25"><span class="auto-style24"></span><a href="serial.html"target="_blank">
<h2>非同期シリアル通信 Serial</h2>
<a href="serial.html"target="_blank"><span class="auto-style23">
非同期シリアル通信 Serial</span></a><span class="auto-style26">に関連するライブラリです。PCとのインタフェースや、UARTに対応した周辺機器と通信することが出来ます。</span><br class="auto-style26" />
<br class="auto-style26" />
<h2>電源電圧測定</h2>
<span class="auto-style26">電源電圧を測定する関数です</span><br />
<a href="voltage_check.html">voltage_check(level)</a><br />
<br />
<td valign="top" style="width: 35%" class="auto-style9">
<h2>ライブラリ</h2>
<br />
Expand Down Expand Up @@ -333,7 +332,25 @@ <h2>タイマー割込み用ライブラリ(MsTimer2)</h2>
<a href="timer2_start.html">timer2.start()</a><br />
<a href="timer2_stop.html">timer2.stop()</a><br />
<a href="timer2_wait_event_timeout.html">
timer2.wait_event_timeout(*flag, ms)</a></td>
timer2.wait_event_timeout(*flag, ms)</a><br />
<br />
<h2>SDカードライブラリ(SD)</h2>
<span class="auto-style26">SDカードを使用できるライブラリです。</span><br />
<br />
<a href="SD.html"><span class="auto-style17">SD</span></a><br />
<br />
<h2>RTCライブラリ(RTC)</h2>
<span class="auto-style26">RTCを使用するためのライブラリです。</span><br />
<br />
<a href="RTC.html"><span class="auto-style17">RTC</span></a><br />
<br />
<h2>デバック用ライブラリ(libdebug)</h2>
<span class="auto-style26">デバックを簡単にするためのライブラリ(マクロ)です。</span><br />
<br />
<a href="libdebug.html">libdebug</a><br />
<br />
<br />
</td>
</table>

<p>&nbsp;</p>
Expand Down
265 changes: 265 additions & 0 deletions contents/reference/RTC.html
@@ -0,0 +1,265 @@
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>RTC</title>
<style type="text/css">
#contents{
width:800px;
margin-left:auto;
margin-right:auto;
}
.auto-style1 {
margin-left: 40px;
}
.auto-style5 {
text-align: center;
}
.auto-style2 {
border: 1px solid #000000;
margin-left: 40px;
}
.auto-style3 {
border: 1px solid #000000;
}
.auto-style7 {
color: #666666;
font-weight: normal;
font-family: メイリオ;
}
.auto-style8 {
font-family: メイリオ;
color: #666666;
}
.auto-style9 {
margin-left: 40px;
font-family: メイリオ;
color: #666666;
}
.auto-style11 {
border: 1px solid #000000;
text-align: center;
color: #666666;
font-family: メイリオ;
}
.auto-style12 {
font-family: メイリオ;
}
td{
padding:0px 5px;
}
</style>
</head>

<body>
<h1 class="auto-style5">
<img height="35" src="../Lazurite_logo.png" width="179" class="auto-style1" /> <span class="auto-style7">Lazurite
日本語リファレンス</span></h1>
<hr />
<div id="contents">
<h1 class="auto-style7">RTC</h1>
<br/>
<h3 class="auto-style8">概要</h3>
<p class="auto-style9">RTCライブラリは、ML620Q504Hの16bitタイマを用いてソフトウェアでRTC(Real Time Clock)を実現するための関数群です。</p>

<p class="auto-style9">消費電力を低減させるため、RTCは毎秒ではなく<b>2秒毎</b>に更新しています。Lazuriteのスリープ中もRTCは動作します。Lazuriteがリセットされた場合、日時情報は初期化されます。初期値は<b>"2017年1月1日(日) 0時0分0秒"</b>です。</p>

<p class="auto-style9">本ライブラリにはアラーム機能があり、指定の日時で指定した関数を呼び出すことができます。</p>
<p class="auto-style9">本ライブラリを使用するためには、LazuriteIDE上の左ペイン(ライブラリ)から、"RTC"のチェックボックスを有効にしてください。
<br><a href="SD.html">SDカード</a>ライブラリはファイル/フォルダの操作でタイムスタンプが必要で、本ライブラリを使用しています。</p>

<p class="auto-style1">&nbsp;</p>
<h3 class="auto-style8">関数</h3>
<table class="auto-style2" style="width: 90%">
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.begin();</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">RTCの使用を開始するための関数です。本関数を実行するとRTCは定期更新を開始します。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.setTime(hours, minutes, seconds);</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">時刻を設定する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.setDate(day, month, year)</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">日付を設定する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getHours()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">時を取得する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getMinutes()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">分を取得する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getSeconds()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">秒を取得する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getYear()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">年を取得する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getMonth()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">月を取得する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">unsigned char RTC.getDay()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">日を取得する関数です。</p>
</td>
</tr>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.setAlarmTime(hours, minutes, seconds);</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームの時刻を設定する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.setAlarmDate(day, month, year)</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームの日付を設定する関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.enableAlarm(alarmMatch)</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームをalarmMatchタイプで有効にする関数です。タイプは以下が利用できます。<br>
<ul class="auto-style7">
<li>MATCH_SS&nbsp;=秒が一致</li>
<li>MATCH_MMSS&nbsp;=分/秒が一致</li>
<li>MATCH_HHMMSS&nbsp;=時/分/秒が一致</li>
<li>MATCH_DDHHMMSS&nbsp;=日/時/分/秒が一致</li>
<li>MATCH_MMDDHHMMSS&nbsp;=月/日/時/分/秒が一致</li>
<li>MATCH_YYMMDDHHMMSS&nbsp;=年/月/日/時/分/秒が一致</li>
</ul>
</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.disableAlarm()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームを無効にする関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.attachInterrupt(callback)</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームが一致したときに実行するcallback関数を割り付ける関数です。</p>
</td>
</tr>
<tr>
<td class="auto-style11" style="width: 34px; height: 18px">
<p></p>
</td>
<td class="auto-style3" style="width: 467px; height: 18px">
<p class="auto-style12">RTC.detachInterrupt()</p>
</td>
<td class="auto-style3" style="width: 673px; height: 18px">
<p class="auto-style8">アラームが一致したときに実行する関数の割り付けを無効にする関数です。disableAlarm()を内部で呼び出し、アラームは無効になりますので、再度割り付ける際にはenableAlarm()を実行する必要があります。</p>
</td>
</tr>
</table>
<p class="auto-style8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Arduinoと差異がある関数です。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; Arduinoになく、Lazuriteにある関数です。&nbsp; </p>
<p class="auto-style1">&nbsp;</p>
<h3 class="auto-style8">サンプル</h3>
<p class="auto-style9">SimpleRTC</p>
<p class="auto-style9">本サンプルは、RTCの日時を設定し、RTC情報をシリアルモニタに表示します。</p>
<p>&nbsp;</p>
<p class="auto-style9">SimpleRTCAlarm</p>
<p class="auto-style9">本サンプルは、RTCの日時とアラームの時刻を設定し、MATCH_HHMMSSで有効にします。時/分/秒が一致したらalarmMatch関数が実行されて、シリアルモニタに"Alarm Match!"と表示されます。</p>
<p>&nbsp;</p>
</div>
</body>

</html>

0 comments on commit c8d00ff

Please sign in to comment.