![](/media/cache/profiles/bd1ce36d68a5c2bea97fe45863673b20.jpg.50x50_q85.jpg)
reloj con ds1307 y LCD de 20x4
Dependencies: RTC-DS1307 TextLCD mbed
Fork of Rtc_Ds1307_Sample by
Diff: main.cpp
- Revision:
- 2:3be003301107
- Parent:
- 1:6dbe51fe0737
- Child:
- 3:fda6508b1efc
--- 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");