summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-15 12:24:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-15 12:24:09 +0000
commit6e0a75c596a6c4ec5ec2820e1873c8527aec5007 (patch)
tree45b60e40a510a5eb920b6970e944bb5ed3cf28f7
parentec7b5cde2ee33f1c3e40fad8892716907d58c39b (diff)
downloadrockbox-6e0a75c596a6c4ec5ec2820e1873c8527aec5007.tar.gz
rockbox-6e0a75c596a6c4ec5ec2820e1873c8527aec5007.zip
better rtc_read() simulation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2657 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--uisimulator/common/stubs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 741d4bc977..ad334f5561 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -184,6 +184,18 @@ int rtc_read(int address)
case 2: /* minute */
return (teem->tm_min%10) | ((teem->tm_min/10) << 4);
+
+ case 1: /* seconds */
+ return (teem->tm_sec%10) | ((teem->tm_sec/10) << 4);
+
+ case 7: /* year */
+ return ((teem->tm_year-100)%10) | (((teem->tm_year-100)/10) << 4);
+
+ case 6: /* month */
+ return ((teem->tm_mon+1)%10) | (((teem->tm_mon+1)/10) << 4);
+
+ case 5: /* day */
+ return (teem->tm_mday%10) | ((teem->tm_mday/10) << 4);
}
return address ^ 0x55;