trabajo de creacion de un despertador por i2c configurado por un encoder

Dependencies:   DebouncedIn QEI RTC-DS1307 mbed

Fork of I2C by German Camilo Diaz Mejia

Revision:
2:3be003301107
Parent:
1:6dbe51fe0737
Child:
3:9e5e0b8d0e2a
--- a/main.cpp	Wed Jun 05 20:43:13 2013 +0000
+++ b/main.cpp	Wed Jun 26 21:07:13 2013 +0000
@@ -1,7 +1,8 @@
 #include "mbed.h"
 #include "Rtc_Ds1307.h"
 
-Rtc_Ds1307 rtc(p9, p10);
+//RtcCls rtc(p28, p27, p29, true);
+Rtc_Ds1307 rtc(p28, p27);
 
 Serial pc(USBTX, USBRX, "pc");
 
@@ -10,7 +11,7 @@
 
 int main() {
     char c;
-    Time tm = {};
+    Rtc_Ds1307::Time_rtc tm = {};
     
     while(1) {
         pc.printf("*************************************\n");
@@ -71,11 +72,11 @@
             pc.printf("Please specify the frequency : [0 = 1Hz, 1 = 4.096kHz, 2 = 8.192kHz, 3 = 32.768kHz] ");
             scanf("%d", &rs);
             pc.printf("Enabling the output with %d option\n", rs);
-            rtc.setSquareWaveOutput(true, (RateSelect_t)rs);
+            rtc.setSquareWaveOutput(true, (Rtc_Ds1307::SqwRateSelect_t)rs);
         }
         else if (strncmp(buffer, "dis", 3) == 0) {
             pc.printf("Disableing square wave output\n");
-            rtc.setSquareWaveOutput(false, RS_1Hz);
+            rtc.setSquareWaveOutput(false, Rtc_Ds1307::RS1Hz);
         }
         else {
             pc.printf("syntax error\n");