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.
Fork of ds3231 by
Revision 9:e57201ee8921, committed 2014-12-05
- Comitter:
- j3
- Date:
- Fri Dec 05 22:31:35 2014 +0000
- Parent:
- 8:c7484a65fcea
- Child:
- 10:3b55ed3f71d3
- Commit message:
- working on doxy format for mbed
Changed in this revision
| ds3231.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ds3231.h Fri Dec 05 21:11:26 2014 +0000
+++ b/ds3231.h Fri Dec 05 22:31:35 2014 +0000
@@ -78,11 +78,9 @@
#define BSY (1 << 2)
#define EN32KHZ (1 << 3)
#define OSF (1 << 7)
-
-
+
/**
-* !!!!!TEST!!!!!
-* enumerated registers
+* ds3231_regs_t - enumerated DS3231 registers
*/
typedef enum
{
@@ -125,11 +123,11 @@
*/
typedef struct
{
- uint8_t seconds; //Use decimal value. Member fx's convert to BCD
- uint8_t minutes; //Use decimal value. Member fx's convert to BCD
- uint8_t hours; //Use decimal value. Member fx's convert to BCD
- bool am_pm; //TRUE for PM, same logic as datasheet
- bool mode; //TRUE for 12 hour, same logic as datasheet
+ uint8_t seconds;
+ uint8_t minutes;
+ uint8_t hours;
+ bool am_pm;
+ bool mode;
}ds3231_time_t;
@@ -148,10 +146,10 @@
*/
typedef struct
{
- uint8_t day; //Use decimal value. Member fx's convert to BCD
- uint8_t date; //Use decimal value. Member fx's convert to BCD
- uint8_t month; //Use decimal value. Member fx's convert to BCD
- uint8_t year; //Use decimal value. Member fx's convert to BCD
+ uint8_t day;
+ uint8_t date;
+ uint8_t month;
+ uint8_t year;
}ds3231_calendar_t;
@@ -187,18 +185,18 @@
typedef struct
{
//Seconds and am1 not used for alarm2
- uint8_t seconds; //Use decimal value. Member fx's convert to BCD
- uint8_t minutes; //Use decimal value. Member fx's convert to BCD
- uint8_t hours; //Use decimal value. Member fx's convert to BCD
- uint8_t day; //Use decimal value. Member fx's convert to BCD
- uint8_t date; //Use decimal value. Member fx's convert to BCD
+ uint8_t seconds;
+ uint8_t minutes;
+ uint8_t hours;
+ uint8_t day;
+ uint8_t date;
bool am1;
bool am2;
bool am3;
bool am4;
- bool am_pm; //TRUE for PM, same logic as datasheet
- bool mode; //TRUE for 12 hour, same logic as datasheet
- bool dy_dt; //TRUE for Day, same logic as datasheet
+ bool am_pm;
+ bool mode;
+ bool dy_dt;
}ds3231_alrm_t;
@@ -214,11 +212,11 @@
*/
typedef struct
{
- uint8_t control; //binary data
- uint8_t status; //binary data
+ uint8_t control;
+ uint8_t status;
}ds3231_cntl_stat_t;
-
-
+
+
/******************************************************************//**
* Ds3231 Class
**********************************************************************/
@@ -252,6 +250,7 @@
uint8_t bcd_2_uchar(uint8_t bcd);
public:
+
/**********************************************************//**
* Constructor for Ds3231 Class
*
