diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-10-15 12:24:09 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-10-15 12:24:09 +0000 |
commit | 6e0a75c596a6c4ec5ec2820e1873c8527aec5007 (patch) | |
tree | 45b60e40a510a5eb920b6970e944bb5ed3cf28f7 /uisimulator | |
parent | ec7b5cde2ee33f1c3e40fad8892716907d58c39b (diff) | |
download | rockbox-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
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/common/stubs.c | 12 |
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) | |||
184 | 184 | ||
185 | case 2: /* minute */ | 185 | case 2: /* minute */ |
186 | return (teem->tm_min%10) | ((teem->tm_min/10) << 4); | 186 | return (teem->tm_min%10) | ((teem->tm_min/10) << 4); |
187 | |||
188 | case 1: /* seconds */ | ||
189 | return (teem->tm_sec%10) | ((teem->tm_sec/10) << 4); | ||
190 | |||
191 | case 7: /* year */ | ||
192 | return ((teem->tm_year-100)%10) | (((teem->tm_year-100)/10) << 4); | ||
193 | |||
194 | case 6: /* month */ | ||
195 | return ((teem->tm_mon+1)%10) | (((teem->tm_mon+1)/10) << 4); | ||
196 | |||
197 | case 5: /* day */ | ||
198 | return (teem->tm_mday%10) | ((teem->tm_mday/10) << 4); | ||
187 | } | 199 | } |
188 | 200 | ||
189 | return address ^ 0x55; | 201 | return address ^ 0x55; |