summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/stubs.c9
-rw-r--r--uisimulator/win32/Makefile6
-rw-r--r--uisimulator/win32/timefuncs.h3
-rw-r--r--uisimulator/x11/Makefile5
-rw-r--r--uisimulator/x11/timefuncs.h3
5 files changed, 16 insertions, 10 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 98c574ffaa..fab61b8ed3 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -124,13 +124,6 @@ void backlight_set_on_when_charging(bool beep)
124 (void)beep; 124 (void)beep;
125} 125}
126 126
127/* original is in firmware/common/timefuncs.c */
128struct tm *get_time(void)
129{
130 time_t now = time(NULL);
131 return localtime(&now);
132}
133
134int rtc_read(int address) 127int rtc_read(int address)
135{ 128{
136 time_t now = time(NULL); 129 time_t now = time(NULL);
@@ -161,7 +154,7 @@ int rtc_read(int address)
161 154
162int rtc_write(int address, int value) 155int rtc_write(int address, int value)
163{ 156{
164 DEBUGF("write %x to address %x\n", value, address); 157 DEBUGF("write %02x to address %02x\n", value, address);
165 return 0; 158 return 0;
166} 159}
167 160
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile
index fe7086391b..05acb9c41c 100644
--- a/uisimulator/win32/Makefile
+++ b/uisimulator/win32/Makefile
@@ -97,7 +97,8 @@ else
97 LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c 97 LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c
98endif 98endif
99FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \ 99FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \
100 powermgmt.c power.c sprintf.c buffer.c lcd-common.c strtok.c random.c 100 powermgmt.c power.c sprintf.c buffer.c lcd-common.c strtok.c random.c \
101 timefuncs.c
101 102
102APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \ 103APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \
103 playlist.c wps.c wps-display.c settings.c status.c \ 104 playlist.c wps.c wps-display.c settings.c status.c \
@@ -284,6 +285,9 @@ $(OBJDIR)/sprintf.o: $(COMMON)/sprintf.c
284$(OBJDIR)/strtok.o: $(COMMON)/strtok.c 285$(OBJDIR)/strtok.o: $(COMMON)/strtok.c
285 $(CC) $(CFLAGS) -c $< -o $@ 286 $(CC) $(CFLAGS) -c $< -o $@
286 287
288$(OBJDIR)/timefuncs.o: $(COMMON)/timefuncs.c
289 $(CC) $(CFLAGS) -c $< -o $@
290
287$(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c 291$(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c
288 $(CC) $(CFLAGS) -c $< -o $@ 292 $(CC) $(CFLAGS) -c $< -o $@
289 293
diff --git a/uisimulator/win32/timefuncs.h b/uisimulator/win32/timefuncs.h
index c1b6ef8196..59e8b249eb 100644
--- a/uisimulator/win32/timefuncs.h
+++ b/uisimulator/win32/timefuncs.h
@@ -1,4 +1,7 @@
1#include <time.h> 1#include <time.h>
2#include <stdbool.h>
2 3
3/* struct tm defined */ 4/* struct tm defined */
4struct tm *get_time(void); 5struct tm *get_time(void);
6int set_time(struct tm *tm);
7bool valid_time(struct tm *tm);
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile
index fb609ea2c3..6fbc413a3c 100644
--- a/uisimulator/x11/Makefile
+++ b/uisimulator/x11/Makefile
@@ -97,7 +97,7 @@ else
97 LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c 97 LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c
98endif 98endif
99FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ 99FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\
100 powermgmt.c panic.c mp3data.c sprintf.c buffer.c 100 powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c
101 101
102APPS = main.c tree.c menu.c credits.c main_menu.c language.c\ 102APPS = main.c tree.c menu.c credits.c main_menu.c language.c\
103 playlist.c wps.c wps-display.c settings.c status.c icons.c\ 103 playlist.c wps.c wps-display.c settings.c status.c icons.c\
@@ -264,6 +264,9 @@ $(OBJDIR)/buffer.o: $(FIRMWAREDIR)/buffer.c
264$(OBJDIR)/ctype.o: $(COMMON)/ctype.c 264$(OBJDIR)/ctype.o: $(COMMON)/ctype.c
265 $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@ 265 $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@
266 266
267$(OBJDIR)/timefuncs.o: $(COMMON)/timefuncs.c
268 $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@
269
267$(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c 270$(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c
268 $(CC) $(APPCFLAGS) -c $< -o $@ 271 $(CC) $(APPCFLAGS) -c $< -o $@
269 272
diff --git a/uisimulator/x11/timefuncs.h b/uisimulator/x11/timefuncs.h
index c1b6ef8196..59e8b249eb 100644
--- a/uisimulator/x11/timefuncs.h
+++ b/uisimulator/x11/timefuncs.h
@@ -1,4 +1,7 @@
1#include <time.h> 1#include <time.h>
2#include <stdbool.h>
2 3
3/* struct tm defined */ 4/* struct tm defined */
4struct tm *get_time(void); 5struct tm *get_time(void);
6int set_time(struct tm *tm);
7bool valid_time(struct tm *tm);