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.
Diff: main.cpp
- Revision:
- 2:3be003301107
- Parent:
- 1:6dbe51fe0737
- Child:
- 3:efb21ee0d7dd
--- 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");