WaspRTC.h File Reference

Library for managing the RTC. More...

#include <inttypes.h>

Include dependency graph for WaspRTC.h:

Go to the source code of this file.

Data Structures

class  WaspRTC
 WaspRTC Class. More...

Defines

#define RTC_SECONDS_ADDRESS   0x00
 RTC Addresses constants. Seconds register in this case.
#define RTC_MINUTES_ADDRESS   0x01
 RTC Addresses constants. Minutes register in this case.
#define RTC_HOURS_ADDRESS   0x02
 RTC Addresses constants. Hours register in this case.
#define RTC_DAYS_ADDRESS   0x03
 RTC Addresses constants. Days register in this case.
#define RTC_DATE_ADDRESS   0x04
 RTC Addresses constants. Date register in this case.
#define RTC_MONTH_ADDRESS   0x05
 RTC Addresses constants. Month register in this case.
#define RTC_YEAR_ADDRESS   0x06
 RTC Addresses constants. Year register in this case.
#define RTC_ALM1_START_ADDRESS   0x07
 RTC Addresses constants. Alarm1 start address in this case.
#define RTC_ALM1_SECONDS_ADDRESS   0x07
 RTC Addresses constants. Alarm1 seconds register in this case.
#define RTC_ALM1_MINUTES_ADDRESS   0x08
 RTC Addresses constants. Alarm1 minutes register in this case.
#define RTC_ALM1_HOURS_ADDRESS   0x09
 RTC Addresses constants. Alarm1 hours register in this case.
#define RTC_ALM1_DAYS_ADDRESS   0x0A
 RTC Addresses constants. Alarm1 days register in this case.
#define RTC_ALM2_START_ADDRESS   0x0B
 RTC Addresses constants. Alarm2 start address in this case.
#define RTC_ALM2_MINUTES_ADDRESS   0x0B
 RTC Addresses constants. Alarm2 minutes register in this case.
#define RTC_ALM2_HOURS_ADDRESS   0x0C
 RTC Addresses constants. Alarm2 hours register in this case.
#define RTC_ALM2_DAYS_ADDRESS   0x0D
 RTC Addresses constants. Alarm2 days register in this case.
#define RTC_CONTROL_ADDRESS   0x0E
 RTC Addresses constants. Control register in this case.
#define RTC_STATUS_ADDRESS   0x0F
 RTC Addresses constants. Status register in this case.
#define RTC_MSB_TEMP_ADDRESS   0x11
 RTC Addresses constants. MSB Temperature register in this case.
#define RTC_LSB_TEMP_ADDRESS   0x12
 RTC Addresses constants. LSB Temperature register in this case.
#define RTC_START_ADDRESS   0x00
 RTC Addresses constants. Start address.
#define RTC_ADDRESS   0x68
 RTC Addresses constants. I2C RTC Address.
#define RTC_DATA_SIZE   0x12
 RTC Addresses constants. RTC Data size.
#define RTC_DATE_ADDRESS_2   6
 RTC Addresses constants to use in function 'readRTC'. Use when only time and date wants to be read from the RTC.
#define RTC_ALARM1_ADDRESS   10
 RTC Addresses constants to use in function 'readRTC'. Use when time, date and alarm1 wants to be read from the RTC.
#define RTC_ALARM2_ADDRESS   13
 RTC Addresses constants to use in function 'readRTC'. Use when time, date, alarm1 and alarm2 wants to be read from the RTC.
#define RTC_ALM1_MODE1   0
 RTC Alarm Modes. Day of the week,hours,minutes and seconds match.
#define RTC_ALM1_MODE2   1
 RTC Alarm Modes. Date,hours,minutes and seconds match.
#define RTC_ALM1_MODE3   2
 RTC Alarm Modes. Hours,minutes and seconds match.
#define RTC_ALM1_MODE4   3
 RTC Alarm Modes. Minutes and seconds match.
#define RTC_ALM1_MODE5   4
 RTC Alarm Modes. Seconds match.
#define RTC_ALM1_MODE6   5
 RTC Alarm Modes. Once per second.
#define RTC_ALM2_MODE1   0
 RTC Alarm Modes. Day of the week,hours and minutes match.
#define RTC_ALM2_MODE2   1
 RTC Alarm Modes. Date,hours and minutes match.
#define RTC_ALM2_MODE3   2
 RTC Alarm Modes. Hours and minutes.
#define RTC_ALM2_MODE4   3
 RTC Alarm Modes. Minutes match.
#define RTC_ALM2_MODE5   4
 RTC Alarm Modes. Once per minute.
#define RTC_OFFSET   0
 RTC Alarm Values. This option adds the time specified by the user to the actual time.
#define RTC_ABSOLUTE   1
 RTC Alarm Values. This option establishes the time specified by the user as the alarm time.
#define RTC_ALM1   1
 RTC Alarm Values. Specifies Alarm1.
#define RTC_ALM2   2
 RTC Alarm Values. Specifies Alarm2.
#define DAY_1   "Sunday"
 Days of the Week. Sunday in this case.
#define DAY_2   "Monday"
 Days of the Week. Monday in this case.
#define DAY_3   "Tuesday"
 Days of the Week. Tuesday in this case.
#define DAY_4   "Wednesday"
 Days of the Week. Wednesday in this case.
#define DAY_5   "Thursday"
 Days of the Week. Thursday in this case.
#define DAY_6   "Friday"
 Days of the Week. Friday in this case.
#define DAY_7   "Saturday"
 Days of the Week. Saturday in this case.
#define RTC_ON   1
 RTC Power Modes. ON in this case.
#define RTC_OFF   2
 RTC Power Modes. OFF in this case.

Variables

WaspRTC RTC


Detailed Description

Library for managing the RTC.

Copyright (C) 2009 Libelium Comunicaciones Distribuidas S.L. http://www.libelium.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Version: 0.6

Design: David Gascón

Implementation: Alberto Bielsa, David Cuartielles, Marcos Yarza

Definition in file WaspRTC.h.


Define Documentation

#define DAY_1   "Sunday"

Days of the Week. Sunday in this case.

Definition at line 241 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_2   "Monday"

Days of the Week. Monday in this case.

Definition at line 242 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_3   "Tuesday"

Days of the Week. Tuesday in this case.

Definition at line 243 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_4   "Wednesday"

Days of the Week. Wednesday in this case.

Definition at line 244 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_5   "Thursday"

Days of the Week. Thursday in this case.

Definition at line 245 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_6   "Friday"

Days of the Week. Friday in this case.

Definition at line 246 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define DAY_7   "Saturday"

Days of the Week. Saturday in this case.

Definition at line 247 of file WaspRTC.h.

Referenced by WaspRTC::getTimestamp().

#define RTC_ABSOLUTE   1

RTC Alarm Values. This option establishes the time specified by the user as the alarm time.

Definition at line 215 of file WaspRTC.h.

#define RTC_ADDRESS   0x68

RTC Addresses constants. I2C RTC Address.

Definition at line 138 of file WaspRTC.h.

Referenced by WaspRTC::readRTC(), WaspRTC::readRTCregister(), WaspRTC::writeRTC(), WaspRTC::writeRTCalarm1(), WaspRTC::writeRTCalarm2(), and WaspRTC::writeRTCregister().

#define RTC_ALARM1_ADDRESS   10

RTC Addresses constants to use in function 'readRTC'. Use when time, date and alarm1 wants to be read from the RTC.

Definition at line 152 of file WaspRTC.h.

Referenced by WaspRTC::getAlarm1().

#define RTC_ALARM2_ADDRESS   13

RTC Addresses constants to use in function 'readRTC'. Use when time, date, alarm1 and alarm2 wants to be read from the RTC.

Definition at line 153 of file WaspRTC.h.

Referenced by WaspRTC::begin(), and WaspRTC::getAlarm2().

#define RTC_ALM1   1

RTC Alarm Values. Specifies Alarm1.

Definition at line 216 of file WaspRTC.h.

#define RTC_ALM1_DAYS_ADDRESS   0x0A

RTC Addresses constants. Alarm1 days register in this case.

Definition at line 117 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm1().

#define RTC_ALM1_HOURS_ADDRESS   0x09

RTC Addresses constants. Alarm1 hours register in this case.

Definition at line 116 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm1().

#define RTC_ALM1_MINUTES_ADDRESS   0x08

RTC Addresses constants. Alarm1 minutes register in this case.

Definition at line 115 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm1().

#define RTC_ALM1_MODE1   0

RTC Alarm Modes. Day of the week,hours,minutes and seconds match.

Definition at line 188 of file WaspRTC.h.

Referenced by WaspRTC::setAlarm1().

#define RTC_ALM1_MODE2   1

RTC Alarm Modes. Date,hours,minutes and seconds match.

Definition at line 189 of file WaspRTC.h.

#define RTC_ALM1_MODE3   2

RTC Alarm Modes. Hours,minutes and seconds match.

Definition at line 190 of file WaspRTC.h.

#define RTC_ALM1_MODE4   3

RTC Alarm Modes. Minutes and seconds match.

Definition at line 191 of file WaspRTC.h.

#define RTC_ALM1_MODE5   4

RTC Alarm Modes. Seconds match.

Definition at line 192 of file WaspRTC.h.

#define RTC_ALM1_MODE6   5

RTC Alarm Modes. Once per second.

Definition at line 193 of file WaspRTC.h.

#define RTC_ALM1_SECONDS_ADDRESS   0x07

RTC Addresses constants. Alarm1 seconds register in this case.

Definition at line 114 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm1().

#define RTC_ALM1_START_ADDRESS   0x07

RTC Addresses constants. Alarm1 start address in this case.

Definition at line 113 of file WaspRTC.h.

Referenced by WaspRTC::writeRTCalarm1().

#define RTC_ALM2   2

RTC Alarm Values. Specifies Alarm2.

Definition at line 217 of file WaspRTC.h.

#define RTC_ALM2_DAYS_ADDRESS   0x0D

RTC Addresses constants. Alarm2 days register in this case.

Definition at line 121 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm2().

#define RTC_ALM2_HOURS_ADDRESS   0x0C

RTC Addresses constants. Alarm2 hours register in this case.

Definition at line 120 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm2().

#define RTC_ALM2_MINUTES_ADDRESS   0x0B

RTC Addresses constants. Alarm2 minutes register in this case.

Definition at line 119 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode(), and WaspRTC::writeRTCalarm2().

#define RTC_ALM2_MODE1   0

RTC Alarm Modes. Day of the week,hours and minutes match.

Definition at line 195 of file WaspRTC.h.

Referenced by WaspRTC::setAlarm2().

#define RTC_ALM2_MODE2   1

RTC Alarm Modes. Date,hours and minutes match.

Definition at line 196 of file WaspRTC.h.

#define RTC_ALM2_MODE3   2

RTC Alarm Modes. Hours and minutes.

Definition at line 197 of file WaspRTC.h.

#define RTC_ALM2_MODE4   3

RTC Alarm Modes. Minutes match.

Definition at line 198 of file WaspRTC.h.

#define RTC_ALM2_MODE5   4

RTC Alarm Modes. Once per minute.

Definition at line 199 of file WaspRTC.h.

#define RTC_ALM2_START_ADDRESS   0x0B

RTC Addresses constants. Alarm2 start address in this case.

Definition at line 118 of file WaspRTC.h.

Referenced by WaspRTC::writeRTCalarm2().

#define RTC_CONTROL_ADDRESS   0x0E

RTC Addresses constants. Control register in this case.

Definition at line 122 of file WaspRTC.h.

Referenced by WaspRTC::configureAlarmMode().

#define RTC_DATA_SIZE   0x12

RTC Addresses constants. RTC Data size.

Definition at line 139 of file WaspRTC.h.

Referenced by WaspRTC::getRTCarray(), and WaspRTC::readRTC().

#define RTC_DATE_ADDRESS   0x04

RTC Addresses constants. Date register in this case.

Definition at line 110 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_DATE_ADDRESS_2   6

RTC Addresses constants to use in function 'readRTC'. Use when only time and date wants to be read from the RTC.

Definition at line 151 of file WaspRTC.h.

Referenced by WaspRTC::getTime(), WaspRTC::setAlarm1(), and WaspRTC::setAlarm2().

#define RTC_DAYS_ADDRESS   0x03

RTC Addresses constants. Days register in this case.

Definition at line 109 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_HOURS_ADDRESS   0x02

RTC Addresses constants. Hours register in this case.

Definition at line 108 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_LSB_TEMP_ADDRESS   0x12

RTC Addresses constants. LSB Temperature register in this case.

Definition at line 125 of file WaspRTC.h.

Referenced by WaspRTC::getTemperature().

#define RTC_MINUTES_ADDRESS   0x01

RTC Addresses constants. Minutes register in this case.

Definition at line 107 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_MONTH_ADDRESS   0x05

RTC Addresses constants. Month register in this case.

Definition at line 111 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_MSB_TEMP_ADDRESS   0x11

RTC Addresses constants. MSB Temperature register in this case.

Definition at line 124 of file WaspRTC.h.

Referenced by WaspRTC::getTemperature().

#define RTC_OFF   2

RTC Power Modes. OFF in this case.

Definition at line 256 of file WaspRTC.h.

#define RTC_OFFSET   0

RTC Alarm Values. This option adds the time specified by the user to the actual time.

Definition at line 214 of file WaspRTC.h.

Referenced by WaspRTC::setAlarm1(), and WaspRTC::setAlarm2().

#define RTC_ON   1

#define RTC_SECONDS_ADDRESS   0x00

RTC Addresses constants. Seconds register in this case.

Definition at line 106 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().

#define RTC_START_ADDRESS   0x00

RTC Addresses constants. Start address.

Definition at line 137 of file WaspRTC.h.

Referenced by WaspRTC::readRTC(), and WaspRTC::writeRTC().

#define RTC_STATUS_ADDRESS   0x0F

RTC Addresses constants. Status register in this case.

Definition at line 123 of file WaspRTC.h.

Referenced by WaspRTC::clearAlarmFlag(), and WaspRTC::configureAlarmMode().

#define RTC_YEAR_ADDRESS   0x06

RTC Addresses constants. Year register in this case.

Definition at line 112 of file WaspRTC.h.

Referenced by WaspRTC::writeRTC().


Variable Documentation


Generated on Tue Jul 20 09:30:58 2010 for WaspmoteAPI by  doxygen 1.5.6