Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ard2pmod DS3231_Alarm_Demo MAXREFDES130_131_Demo MAXREFDES130_Demo
Fork of ds3231 by
Revision 16:e1c0f63595d9, committed 2016-08-21
- Comitter:
- j3
- Date:
- Sun Aug 21 01:39:50 2016 +0000
- Parent:
- 15:16ca4c747252
- Commit message:
- fixed reading of alarm 2 hour parameter
Changed in this revision
| ds3231.cpp | Show annotated file Show diff for this revision Revisions of this file |
| ds3231.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ds3231.cpp Mon Mar 28 19:17:34 2016 +0000
+++ b/ds3231.cpp Sun Aug 21 01:39:50 2016 +0000
@@ -417,11 +417,11 @@
if(alarm->mode)
{
- alarm->hours = bcd_2_uchar((data[2]&0x1F));
+ alarm->hours = bcd_2_uchar((data[1]&0x1F));
}
else
{
- alarm->hours = bcd_2_uchar((data[2]&0x3F));
+ alarm->hours = bcd_2_uchar((data[1]&0x3F));
}
if(data[2] & DY_DT)
--- a/ds3231.h Mon Mar 28 19:17:34 2016 +0000
+++ b/ds3231.h Sun Aug 21 01:39:50 2016 +0000
@@ -151,7 +151,10 @@
uint8_t status;
}ds3231_cntl_stat_t;
-
+
+/**
+* @brief DS3231 Class
+*/
class Ds3231
{
public:
