Skip to content

Commit

Permalink
Merge pull request #6 from bmbove/warnings
Browse files Browse the repository at this point in the history
fix up some not-very-serious compiler warnings
  • Loading branch information
nseidle committed May 10, 2018
2 parents cde0e4a + d3079e8 commit bc83d73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/SparkFunDS3234RTC.cpp
Expand Up @@ -130,7 +130,7 @@ void DS3234::setTime(uint8_t * time, uint8_t len)
}

// autoTime -- Fill DS3234 time registers with compiler time/date
bool DS3234::autoTime()
void DS3234::autoTime()
{
_time[TIME_SECONDS] = DECtoBCD(BUILD_SECOND);
_time[TIME_MINUTES] = DECtoBCD(BUILD_MINUTE);
Expand Down Expand Up @@ -161,7 +161,8 @@ bool DS3234::autoTime()

_time[TIME_MONTH] = DECtoBCD(BUILD_MONTH);
_time[TIME_DATE] = DECtoBCD(BUILD_DATE);
_time[TIME_YEAR] = DECtoBCD(BUILD_YEAR - 2000); //! Not Y2K (or Y2.1K)-proof :\
//! Not Y2K (or Y2.1K)-proof :
_time[TIME_YEAR] = DECtoBCD(BUILD_YEAR - 2000);

// Calculate weekday (from here: http://stackoverflow.com/a/21235587)
// Result: 0 = Sunday, 6 = Saturday
Expand Down Expand Up @@ -671,7 +672,6 @@ uint8_t DS3234::spiReadByte(DS3234_registers reg)
// spiWriteBytes -- read a set number of bytes from an spi device, incrementing from a register
void DS3234::spiReadBytes(DS3234_registers reg, uint8_t * dest, uint8_t len)
{
uint8_t retVal = 0;
SPI.beginTransaction(DS3234SPISettings);
digitalWrite(_csPin, LOW);
SPI.transfer(reg);
Expand All @@ -694,4 +694,4 @@ uint8_t DS3234::readFromSRAM(uint8_t address){
}


DS3234 rtc; // Use rtc in sketches
DS3234 rtc; // Use rtc in sketches
4 changes: 2 additions & 2 deletions src/SparkFunDS3234RTC.h
Expand Up @@ -128,7 +128,7 @@ class DS3234
// setTime -- Set time and date/day registers of DS3234 (using data array)
void setTime(uint8_t * time, uint8_t len);
// autoTime -- Set time with compiler time/date
bool autoTime();
void autoTime();

// To set specific values of the clock, use the set____ functions:
void setSecond(uint8_t s);
Expand Down Expand Up @@ -233,4 +233,4 @@ class DS3234

extern DS3234 rtc;

#endif // SPARKFUNDS3234RTC_H
#endif // SPARKFUNDS3234RTC_H

0 comments on commit bc83d73

Please sign in to comment.