Skip to content

Commit

Permalink
Fix temperature() function for ARM architecture.
Browse files Browse the repository at this point in the history
(int is 16 bits for AVR, 32 bits for ARM.)
  • Loading branch information
JChristensen committed Sep 9, 2019
1 parent 4bf7861 commit cf82d43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DS3232RTC
version=1.2.6
version=1.2.7
author=Jack Christensen <jack.christensen@outlook.com>
maintainer=Jack Christensen <jack.christensen@outlook.com>
sentence=Arduino Library for Maxim Integrated DS3232 and DS3231 Real-Time Clocks.
Expand Down
4 changes: 2 additions & 2 deletions src/DS3232RTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ bool DS3232RTC::oscStopped(bool clearOSF)
}

// Returns the temperature in Celsius times four.
int DS3232RTC::temperature()
int16_t DS3232RTC::temperature()
{
union int16_byte {
int i;
int16_t i;
byte b[2];
} rtcTemp;

Expand Down
2 changes: 1 addition & 1 deletion src/DS3232RTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class DS3232RTC
bool alarm(byte alarmNumber);
void squareWave(SQWAVE_FREQS_t freq);
bool oscStopped(bool clearOSF = false);
int temperature();
int16_t temperature();
static byte errCode;

private:
Expand Down

0 comments on commit cf82d43

Please sign in to comment.