aboutsummaryrefslogtreecommitdiffstats
path: root/ds3231.c
diff options
context:
space:
mode:
Diffstat (limited to 'ds3231.c')
-rwxr-xr-xds3231.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ds3231.c b/ds3231.c
index b70a09b..38d1edd 100755
--- a/ds3231.c
+++ b/ds3231.c
@@ -71,6 +71,14 @@ void Set_DayOfWeek(int dow) {
I2C_Master_Stop();
}
+void Set_Sqwe(int contvalue) {
+ I2C_Master_Start(); // Start I2C
+ I2C_Master_Write(0xD0); // RTC Chip address
+ I2C_Master_Write(0x0E); // Control register address
+ I2C_Master_Write(contvalue); // Data to control register
+ I2C_Master_Stop();
+}
+
void Set_Time() {
I2C_Master_Start(); // Start I2C
I2C_Master_Write(0xD0); // RTC Chip address