Skip to content

Commit

Permalink
Bugfix: error on consecutive reads.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafacouto committed Jun 19, 2019
1 parent 7b228ce commit 11fe2dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Bugs, feature requests, contributions are welcome: [Ds1302 issue tracker][ISU01]

## Changelog

### 1.0.3

- Bugfix: error on consecutive reads (thanks Reinhard Kopka).

### 1.0.2

- Bugfix: unable to set date 31, dow 7 and month 12.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Ds1302",
"version": "1.0.2",
"version": "1.0.3",
"keywords": "library, C, C++, RTC, DS1302, clock, date, time, datetime",
"description": "A C/C++ library to use DS1302 RTC chip.",
"license": "AGPL-3.0",
Expand Down
5 changes: 3 additions & 2 deletions src/Ds1302.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Ds1302 class.
*
* @version 1.0.1
* @version 1.0.3
* @author Rafa Couto <[email protected]>
* @license GNU Affero General Public License v3.0
* @see https://github.com/Treboada/Ds1302
Expand Down Expand Up @@ -96,10 +96,11 @@ void Ds1302::halt()

void Ds1302::_prepareRead(uint8_t address)
{
_setDirection(INPUT);
_setDirection(OUTPUT);
digitalWrite(_pin_ena, HIGH);
uint8_t command = 0b10000001 | address;
_writeByte(command);
_setDirection(INPUT);
}


Expand Down
2 changes: 1 addition & 1 deletion src/Ds1302.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Ds1302 class.
*
* @version 1.0.1
* @version 1.0.3
* @author Rafa Couto <[email protected]>
* @license GNU Affero General Public License v3.0
* @see https://github.com/Treboada/Ds1302
Expand Down

0 comments on commit 11fe2dd

Please sign in to comment.