diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/common/stubs.c | 9 | ||||
-rw-r--r-- | uisimulator/win32/Makefile | 6 | ||||
-rw-r--r-- | uisimulator/win32/timefuncs.h | 3 | ||||
-rw-r--r-- | uisimulator/x11/Makefile | 5 | ||||
-rw-r--r-- | uisimulator/x11/timefuncs.h | 3 |
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) (void)beep; } -/* original is in firmware/common/timefuncs.c */ -struct tm *get_time(void) -{ - time_t now = time(NULL); - return localtime(&now); -} - int rtc_read(int address) { time_t now = time(NULL); @@ -161,7 +154,7 @@ int rtc_read(int address) int rtc_write(int address, int value) { - DEBUGF("write %x to address %x\n", value, address); + DEBUGF("write %02x to address %02x\n", value, address); return 0; } 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 LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c endif FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \ - powermgmt.c power.c sprintf.c buffer.c lcd-common.c strtok.c random.c + powermgmt.c power.c sprintf.c buffer.c lcd-common.c strtok.c random.c \ + timefuncs.c APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \ playlist.c wps.c wps-display.c settings.c status.c \ @@ -284,6 +285,9 @@ $(OBJDIR)/sprintf.o: $(COMMON)/sprintf.c $(OBJDIR)/strtok.o: $(COMMON)/strtok.c $(CC) $(CFLAGS) -c $< -o $@ +$(OBJDIR)/timefuncs.o: $(COMMON)/timefuncs.c + $(CC) $(CFLAGS) -c $< -o $@ + $(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c $(CC) $(CFLAGS) -c $< -o $@ 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 @@ #include <time.h> +#include <stdbool.h> /* struct tm defined */ struct tm *get_time(void); +int set_time(struct tm *tm); +bool 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 LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c endif FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ - powermgmt.c panic.c mp3data.c sprintf.c buffer.c + powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c APPS = main.c tree.c menu.c credits.c main_menu.c language.c\ playlist.c wps.c wps-display.c settings.c status.c icons.c\ @@ -264,6 +264,9 @@ $(OBJDIR)/buffer.o: $(FIRMWAREDIR)/buffer.c $(OBJDIR)/ctype.o: $(COMMON)/ctype.c $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@ +$(OBJDIR)/timefuncs.o: $(COMMON)/timefuncs.c + $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@ + $(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c $(CC) $(APPCFLAGS) -c $< -o $@ 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 @@ #include <time.h> +#include <stdbool.h> /* struct tm defined */ struct tm *get_time(void); +int set_time(struct tm *tm); +bool valid_time(struct tm *tm); |