summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2012-05-20 16:16:50 +0200
committerBertrik Sikken <bertrik@sikken.nl>2012-05-20 16:16:50 +0200
commit620982a0f3b8985c9fd30a558d24355e53968ba5 (patch)
tree07d077d836dde5c959cff47886d46001e7e498bd /bootloader
parentc029c77796e88ee991af09ffe094309e4df528e6 (diff)
downloadrockbox-620982a0f3b8985c9fd30a558d24355e53968ba5.tar.gz
rockbox-620982a0f3b8985c9fd30a558d24355e53968ba5.tar.bz2
rockbox-620982a0f3b8985c9fd30a558d24355e53968ba5.zip
Make Meizu M3 compile again
Change-Id: I44436068cf6f2c3942fb63f988bf627eaa9abb97
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/meizu_m3.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c
index 7c0a5bca2d..5ecc92f369 100644
--- a/bootloader/meizu_m3.c
+++ b/bootloader/meizu_m3.c
@@ -53,6 +53,7 @@
#include "pcm.h"
#include "audiohw.h"
#include "rtc.h"
+#include "time.h"
#define LONG_DELAY 200000
#define SHORT_DELAY 50000
@@ -105,12 +106,17 @@ void bl_debug_int(unsigned int input,unsigned int count)
delay(SHORT_DELAY*6);
}
+void post_mortem_stub(void)
+{
+}
+
void main(void)
{
char mystring[64];
int i;
unsigned short data = 0;
char write_data[2], read_data[16];
+ struct tm tm;
//Set backlight pin to output and enable
int oldval = PCON0;
@@ -180,10 +186,10 @@ void main(void)
#endif
#if 1 /* enable this to see info about the RTC */
- rtc_read_datetime(read_data);
- for (i = 0; i < 7; i++) {
- snprintf(mystring + 2 * i, 64, "%02X", read_data[i]);
- }
+ rtc_read_datetime(&tm);
+ snprintf(mystring, 64, "%04d-%02d-%02d %02d:%02d:%02d",
+ tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec);
lcd_puts(0, 10, mystring);
#endif
@@ -199,11 +205,11 @@ void main(void)
#endif
#if 1 /* enable this to see info about IODMA channel 0 (PCM) */
- snprintf(mystring, 64, "DMA: %08X %08X", DMACADDR0, DMACTCNT0);
+ snprintf(mystring, 64, "DMA: %08X %08X", (int)DMACADDR0, (int)DMACTCNT0);
lcd_puts(0, 12, mystring);
#endif
#if 1 /* enable this to see info about IIS */
- snprintf(mystring, 64, "IIS: %08X", I2SSTATUS);
+ snprintf(mystring, 64, "IIS: %08X", (int)I2SSTATUS);
lcd_puts(0, 13, mystring);
#endif