Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adafruit/RTClib
/ functions
Functions
96 in github.com/adafruit/RTClib
⨍
Functions
96
◇
Types & classes
19
↓ 16 callers
Function
conv2d
/ ! @brief Convert a string containing two digits to uint8_t, e.g. "09" returns 9 @param p Pointer to a string containing two digits */ /
src/RTClib.cpp:231
↓ 9 callers
Method
day
! @brief Return the day of the month. @return Day of the month (1--31). */
src/RTClib.h:169
↓ 9 callers
Method
hour
! @brief Return the hour @return Hour (0--23). */
src/RTClib.h:174
↓ 9 callers
Method
minute
! @brief Return the minute. @return Minute (0--59). */
src/RTClib.h:186
↓ 7 callers
Method
month
! @brief Return the month. @return Month number (1--12). */
src/RTClib.h:164
↓ 7 callers
Method
second
! @brief Return the second. @return Second (0--59). */
src/RTClib.h:191
↓ 7 callers
Method
year
! @brief Return the year. @return Year (range: 2000--2099). */
src/RTClib.h:159
↓ 3 callers
Function
date2days
/ ! @brief Given a date, return number of days since 2000/01/01, valid for 2000--2099 @param y Year @param m Month @param
src/RTClib.cpp:107
↓ 3 callers
Method
dayOfTheWeek
/ ! @brief Return the day of the week. @return Day of week as an integer from 0 (Sunday) to 6 (Saturday). */ /
src/RTClib.cpp:553
↓ 3 callers
Method
unixtime
/ ! @brief Return Unix time: seconds since 1 Jan 1970. @see The `DateTime::DateTime(uint32_t)` constructor is the converse of this m
src/RTClib.cpp:568
↓ 2 callers
Function
time2ulong
/ ! @brief Given a number of days, hours, minutes, and seconds, return the total seconds @param days Days @param h Hours @param m
src/RTClib.cpp:129
↓ 2 callers
Method
totalseconds
! @brief Total number of seconds in the TimeSpan, e.g. 358027 @return int32_t seconds */
src/RTClib.h:312
Method
DateTime
/ ! @brief Constructor from [Unix time](https://en.wikipedia.org/wiki/Unix_time). This builds a DateTime from an integer specifying
src/RTClib.cpp:161
Method
TimeSpan
/ ! @brief Create a new TimeSpan object in seconds @param seconds Number of seconds */ /
src/RTClib.cpp:719
Method
adjust
/ ! @brief Set the date and time @param dt DateTime to set */ /
src/RTC_PCF8563.cpp:47
Method
adjust
/ ! @brief Set the current date/time of the RTC_Millis clock. @param dt DateTime object with the desired date and time */ /
src/RTC_Millis.cpp:9
Method
adjust
/ ! @brief Set the date and time, set battery switchover mode @param dt DateTime to set */ /
src/RTC_PCF8523.cpp:61
Method
adjust
/ ! @brief Set the date and time in the DS1307 @param dt DateTime object containing the desired date/time */ /
src/RTC_DS1307.cpp:37
Method
adjust
/ ! @brief Set the date and flip the Oscillator Stop Flag @param dt DateTime object containing the date/time to set */ /
src/RTC_DS3231.cpp:47
Method
adjust
/ ! @brief Set the current date/time of the RTC_Micros clock. @param dt DateTime object with the desired date and time */ /
src/RTC_Micros.cpp:9
Method
adjustDrift
/ ! @brief Adjust the RTC_Micros clock to compensate for system clock drift @param ppm Adjustment to make. A positive adjustment makes the cl
src/RTC_Micros.cpp:20
Method
alarmFired
/ ! @brief Get status of alarm @param alarm_num Alarm number to check status of @return True if alarm has been fired otherwise f
src/RTC_DS3231.cpp:348
Method
bcd2bin
! @brief Convert a binary coded decimal value to binary. RTC stores time/date values as BCD. @param val BCD value @return Binar
src/RTClib.h:334
Method
begin
/ ! @brief Start I2C for the PCF8563 and test succesful connection @param wireInstance pointer to the I2C bus @return True if Wire can f
src/RTC_PCF8563.cpp:17
Method
begin
! @brief Start the RTC @param dt DateTime object with the date/time to set */
src/RTClib.h:458
Method
begin
! @brief Start the RTC @param dt DateTime object with the date/time to set */
src/RTClib.h:496
Method
begin
/ ! @brief Start I2C for the PCF8523 and test succesful connection @param wireInstance pointer to the I2C bus @return True if Wire can f
src/RTC_PCF8523.cpp:20
Method
begin
/ ! @brief Start I2C for the DS1307 and test succesful connection @param wireInstance pointer to the I2C bus @return True if Wire can fi
src/RTC_DS1307.cpp:14
Method
begin
/ ! @brief Start I2C for the DS3231 and test succesful connection @param wireInstance pointer to the I2C bus @return True if Wire can fi
src/RTC_DS3231.cpp:20
Method
bin2bcd
! @brief Convert a binary value to BCD format for the RTC registers @param val Binary value @return BCD value */
src/RTClib.h:340
Method
calibrate
/ ! @brief Compensate the drift of the RTC. @details This method sets the "offset" register of the PCF8523, which can be used to correct
src/RTC_PCF8523.cpp:290
Method
clearAlarm
/ ! @brief Clear status of alarm @param alarm_num Alarm number to clear */ /
src/RTC_DS3231.cpp:335
Method
days
! @brief Number of days in the TimeSpan e.g. 4 @return int16_t days */
src/RTClib.h:286
Method
deconfigureAllTimers
/ ! @brief Stop all timers, clear their flags and settings on the PCF8523. @details This includes the Countdown Timer, Second Timer, and any
src/RTC_PCF8523.cpp:250
Method
disable32K
/ ! @brief Disable 32KHz Output */ /
src/RTC_DS3231.cpp:370
Method
disableAlarm
/ ! @brief Disable alarm @param alarm_num Alarm number to disable */ /
src/RTC_DS3231.cpp:323
Method
disableCountdownTimer
/ ! @brief Disable the Countdown Timer Interrupt on the PCF8523. @details For simplicity, this function strictly disables Timer B by setting
src/RTC_PCF8523.cpp:237
Method
disableSecondTimer
/ ! @brief Disable the Second Timer (1Hz) Interrupt on the PCF8523. */ /
src/RTC_PCF8523.cpp:166
Method
dowToDS3231
in Celsius degree ! @brief Convert the day of the week to a representation suitable for storing in the DS3231: from 1 (Monday) to
src/RTClib.h:398
Method
enable32K
/ ! @brief Enable 32KHz Output @details The 32kHz output is enabled by default. It requires an external pull-up resistor to function corr
src/RTC_DS3231.cpp:359
Method
enableCountdownTimer
/ ! @brief Enable the Countdown Timer Interrupt on the PCF8523. @details The INT/SQW pin will be pulled low at the end of a specified coun
src/RTC_PCF8523.cpp:186
Method
enableSecondTimer
/ ! @brief Enable the Second Timer (1Hz) Interrupt on the PCF8523. @details The INT/SQW pin will pull low for a brief pulse once per second.
src/RTC_PCF8523.cpp:152
Method
getAlarm1
/ ! @brief Get the date/time value of Alarm1 @return DateTime object with the Alarm1 data set in the day, hour, minutes, and seco
src/RTC_DS3231.cpp:191
Method
getAlarm1Mode
/ ! @brief Get the mode for Alarm1 @return Ds3231Alarm1Mode enum value for the current Alarm1 mode */ /
src/RTC_DS3231.cpp:263
Method
getAlarm2
/ ! @brief Get the date/time value of Alarm2 @return DateTime object with the Alarm2 data set in the day, hour, and minutes field
src/RTC_DS3231.cpp:228
Method
getAlarm2Mode
/ ! @brief Get the mode for Alarm2 @return Ds3231Alarm2Mode enum value for the current Alarm2 mode */ /
src/RTC_DS3231.cpp:294
Method
getTemperature
/ ! @brief Get the current temperature from the DS3231's temperature sensor @return Current temperature (float) */ /
src/RTC_DS3231.cpp:114
Method
hours
! @brief Number of hours in the TimeSpan This is not the total hours, it includes the days e.g. 4 days, 3 hours - N
src/RTClib.h:293
Method
initialized
/ ! @brief Check control register 3 to see if we've run adjust() yet (setting the date/time and battery switchover mode) @return True if t
src/RTC_PCF8523.cpp:51
Method
isEnabled32K
/ ! @brief Get status of 32KHz Output @return True if enabled otherwise false */ /
src/RTC_DS3231.cpp:382
Method
isPM
! @brief Return whether the time is PM. @return 0 if the time is AM, 1 if it's PM. */
src/RTClib.h:181
Method
isValid
/ ! @brief Check whether this DateTime is valid. @return true if valid, false if not. */ /
src/RTClib.cpp:386
Method
isrunning
/ ! @brief Is the PCF8563 running? Check the STOP bit in register Control_1 @return 1 if the RTC is running, 0 if not */ /
src/RTC_PCF8563.cpp:100
Method
isrunning
/ ! @brief Is the PCF8523 running? Check the STOP bit in register Control_1 @return 1 if the RTC is running, 0 if not */ /
src/RTC_PCF8523.cpp:119
Method
isrunning
/ ! @brief Is the DS1307 running? Check the Clock Halt bit in register 0 @return 1 if the RTC is running, 0 if not */ /
src/RTC_DS1307.cpp:29
Method
lostPower
/ ! @brief Check the status of the VL bit in the VL_SECONDS register. @details The PCF8563 has an on-chip voltage-low detector. When VDD drop
src/RTC_PCF8563.cpp:37
Method
lostPower
/ ! @brief Check the status register Oscillator Stop flag to see if the PCF8523 stopped due to power loss @details When battery or externa
src/RTC_PCF8523.cpp:40
Method
lostPower
/ ! @brief Check the status register Oscillator Stop Flag to see if the DS3231 stopped due to power loss @return True if the bit is set (o
src/RTC_DS3231.cpp:37
Method
minutes
! @brief Number of minutes in the TimeSpan This is not the total minutes, it includes days/hours e.g. 4 days, 3 hou
src/RTClib.h:300
Method
now
/ ! @brief Get the current date/time @return DateTime object containing the current date/time */ /
src/RTC_PCF8563.cpp:62
Method
now
/ ! @brief Return a DateTime object containing the current date/time. Note that computing (millis() - lastMillis) is rollover-safe as
src/RTC_Millis.cpp:22
Method
now
/ ! @brief Get the current date/time @return DateTime object containing the current date/time */ /
src/RTC_PCF8523.cpp:82
Method
now
/ ! @brief Get the current date and time from the DS1307 @return DateTime object containing the current date and time */ /
src/RTC_DS1307.cpp:55
Method
now
/ ! @brief Get the current date/time @return DateTime object with the current date/time */ /
src/RTC_DS3231.cpp:69
Method
now
/ ! @brief Get the current date/time from the RTC_Micros clock. @return DateTime object containing the current date/time */ /
src/RTC_Micros.cpp:28
Method
operator!=
! @brief Test if two DateTime objects are not equal. @warning if one or both DateTime objects are invalid, returned value is mean
src/RTClib.h:259
Method
operator+
/ ! @brief Add a TimeSpan to the DateTime object @param span TimeSpan object @return New DateTime object with span added to it. */ /
src/RTClib.cpp:604
Method
operator-
/ ! @brief Subtract a TimeSpan from the DateTime object @param span TimeSpan object @return New DateTime object with span subtracted from
src/RTClib.cpp:615
Method
operator<
/ ! @author Anton Rieutskyi @brief Test if one DateTime is less (earlier) than another. @warning if one or both DateTime objects are inva
src/RTClib.cpp:647
Method
operator<=
! @brief Test if one DateTime is less (earlier) than or equal to another @warning if one or both DateTime objects are invalid, returned v
src/RTClib.h:237
Method
operator==
/ ! @author Anton Rieutskyi @brief Test if two DateTime objects are equal. @warning if one or both DateTime objects are invalid, returned
src/RTClib.cpp:671
Method
operator>
! @brief Test if one DateTime is greater (later) than another. @warning if one or both DateTime objects are invalid, returned value is
src/RTClib.h:226
Method
operator>=
! @brief Test if one DateTime is greater (later) than or equal to another @warning if one or both DateTime objects are invalid, returned
src/RTClib.h:248
Method
readSqwPinMode
/ ! @brief Read the mode of the CLKOUT pin on the PCF8563 @return CLKOUT pin mode as a #Pcf8563SqwPinMode enum */ /
src/RTC_PCF8563.cpp:110
Method
readSqwPinMode
/ ! @brief Read the mode of the INT/SQW pin on the PCF8523 @return SQW pin mode as a #Pcf8523SqwPinMode enum */ /
src/RTC_PCF8523.cpp:129
Method
readSqwPinMode
/ ! @brief Read the current mode of the SQW pin @return Mode as Ds1307SqwPinMode enum */ /
src/RTC_DS1307.cpp:71
Method
readSqwPinMode
/ ! @brief Read the SQW pin mode @return Pin mode, see Ds3231SqwPinMode enum */ /
src/RTC_DS3231.cpp:85
Method
read_register
/ ! @brief Read value from register. @param reg register address @return value of register */ /
src/RTClib.cpp:78
Method
readnvram
/ ! @brief Read data from the DS1307's NVRAM @param buf Pointer to a buffer to store the data - make sure it's large enough to hold size b
src/RTC_DS1307.cpp:94
Method
seconds
! @brief Number of seconds in the TimeSpan This is not the total seconds, it includes the days/hours/minutes e.g. 4
src/RTClib.h:307
Method
secondstime
/ ! @brief Convert the DateTime to seconds since 1 Jan 2000 The result can be converted back to a DateTime with: ```cpp DateTime(SE
src/RTClib.cpp:590
Method
setAlarm1
/ ! @brief Set alarm 1 for DS3231 @param dt DateTime object @param alarm_mode Desired mode, see Ds3231Alarm1Mode enum @retu
src/RTC_DS3231.cpp:128
Method
setAlarm2
/ ! @brief Set alarm 2 for DS3231 @param dt DateTime object @param alarm_mode Desired mode, see Ds3231Alarm2Mode enum @retu
src/RTC_DS3231.cpp:161
Method
start
/ ! @brief Resets the STOP bit in register Control_1 */ /
src/RTC_PCF8563.cpp:77
Method
start
/ ! @brief Resets the STOP bit in register Control_1 */ /
src/RTC_PCF8523.cpp:97
Method
stop
/ ! @brief Sets the STOP bit in register Control_1 */ /
src/RTC_PCF8563.cpp:88
Method
stop
/ ! @brief Sets the STOP bit in register Control_1 */ /
src/RTC_PCF8523.cpp:108
Method
timestamp
/ ! @brief Return a ISO 8601 timestamp as a `String` object. The generated timestamp conforms to one of the predefined, ISO 8601-compati
src/RTClib.cpp:692
Method
toString
src/RTClib.cpp:441
Method
twelveHour
/ ! @brief Return the hour in 12-hour format. @return Hour (1--12). */ /
src/RTClib.cpp:537
Method
writeSqwPinMode
/ ! @brief Set the CLKOUT pin mode on the PCF8563 @param mode The mode to set, see the #Pcf8563SqwPinMode enum for options */ /
src/RTC_PCF8563.cpp:121
Method
writeSqwPinMode
/ ! @brief Set the INT/SQW pin mode on the PCF8523 @param mode The mode to set, see the #Pcf8523SqwPinMode enum for options */ /
src/RTC_PCF8523.cpp:142
Method
writeSqwPinMode
/ ! @brief Change the SQW pin mode @param mode The mode to use */ /
src/RTC_DS1307.cpp:81
Method
writeSqwPinMode
/ ! @brief Set the SQW pin mode @param mode Desired mode, see Ds3231SqwPinMode enum */ /
src/RTC_DS3231.cpp:99
Method
write_register
/ ! @brief Write value to register. @param reg register address @param val value to write */ /
src/RTClib.cpp:66
Method
writenvram
/ ! @brief Write data to the DS1307 NVRAM @param address Starting NVRAM address, from 0 to 55 @param buf Pointer to buffer containing the
src/RTC_DS1307.cpp:107