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.
Dependencies: SDFileSystem mbed-rtos mbed
Fork of CDMS_RTOS by
Revision 9:d6623702495b, committed 2015-02-27
- Comitter:
- sakthipriya
- Date:
- Fri Feb 27 19:09:51 2015 +0000
- Parent:
- 8:4acac3bf5e9b
- Commit message:
- jhjj
Changed in this revision
| hk.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/hk.cpp Fri Feb 06 18:12:16 2015 +0000
+++ b/hk.cpp Fri Feb 27 19:09:51 2015 +0000
@@ -58,6 +58,7 @@
spiwrite(0x84); //write day of month to 01
spiwrite(0x85); //write month to 01
spiwrite(0x86); //write year to 01
+ printf("init rtc done");
}
void storedata(char * data)
{
@@ -69,7 +70,7 @@
int seconds=spiread(0x00); //read seconds
int minutes =spiread(0x01); //read minutes
int hours =spiread(0x02); //read hours
- int day =spi.write(0x03); //read day of the week
+ int day =spiread(0x03); //read day of the week
int date =spiread(0x04); //read day of the month
int month =spiread(0x05); //read month
int year =spiread(0x06); //read year
@@ -108,6 +109,6 @@
{
fprintf(fp, "%s ", data);
fclose(fp);
- printf("%s",getname(year,month,date,day,hours,minutes,seconds));
+ printf("File stored");
}
}
\ No newline at end of file
