Skip to content

Commit 586ab3b

Browse files
committed
Add temperature() method to the base class.
1 parent 2b90bb7 commit 586ab3b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=MCP79412RTC
2-
version=3.1.0
2+
version=3.1.1
33
author=Jack Christensen <jack.christensen@outlook.com>
44
maintainer=Jack Christensen <jack.christensen@outlook.com>
55
sentence=Arduino library for the Microchip MCP79411/12 Real-Time Clock/Calendar.

src/GenericRTC.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Copyright (C) 2025 by Jack Christensen and licensed under
55
// GNU GPL v3.0, https://www.gnu.org/licenses/gpl.html
66
//
7-
// Allows a sketch to work with either type of RTC, determined at run time.
7+
// Allows a sketch to work with either type of RTC, can be determined at run time.
88

99
#ifndef GENERIC_RTC_H_INCLUDED
1010
#define GENERIC_RTC_H_INCLUDED
@@ -20,10 +20,11 @@ class GenericRTC
2020
virtual void begin() = 0;
2121
virtual time_t get() = 0;
2222
virtual uint8_t set(const time_t t) = 0;
23-
virtual uint8_t writeRTC(const uint8_t addr, const uint8_t* values, const uint8_t nBytes) =0;
23+
virtual uint8_t writeRTC(const uint8_t addr, const uint8_t* values, const uint8_t nBytes) = 0;
2424
virtual uint8_t writeRTC(const uint8_t addr, const uint8_t value) = 0;
2525
virtual uint8_t readRTC(const uint8_t addr, uint8_t* values, const uint8_t nBytes) = 0;
2626
virtual uint8_t readRTC(const uint8_t addr) = 0;
27+
virtual int16_t temperature() {return 0;};
2728

2829
protected:
2930
TwoWire& wire; // reference to Wire, Wire1, etc.

0 commit comments

Comments
 (0)